zoukankan      html  css  js  c++  java
  • EV: eclipse 使用技巧

    1. Shortcusts

    alt+shift+up/dw: select/deselect element
    alt+shift+lf/rt: select previous/next element
    ctrl+shift+p: match brackets
    ctrl+shift+y/x: lower/upper case
    ctrl+shift+up/dw: previous/next element


    ctrl+shift+w: close all windows
    ctrl+shift+f: format codes
    ctrl+alt+up/dw: copy selected lines into above/below
    Alt+Enter: Properties window of current file
    ctrl+F11: Run

    Alt + Shift + a: vertical/column edit mode
    CTRL+3: Quick Access

    More...

    2. Build error caused by invalid reference path.

    1. Right click the package in Package Explore.

    2. Select "Build Path-->Configure Build Path..." from the context menu.

    3. Select "Java Build Path" node from the left node list.

    4. Make sure paths under Libraries tab are all correct. If not, fix it.

    3. File Search Error: xxx file skipped.

    Cause: The xxx file was removed from its original location while the workspace is closed in Eclipse.

    Resolution: Open the workspace in Eclipse, then add any file to workspace, then remove it. Restart eclipse. The search error will not occur.

    4. Show/open current/selected file in windows explorer.

    1. Select current file from Package Explorer (Link with Editor can be used).

    2. In the context menu, select Show In>System Explorer.

    Or

    1. Run->External Tools->External Tools Configurations

    2. Select Program node from the tree view at left of the window.

    3. Add a new configuration:

      Name: Explorer

      Location: C:Windowsexplorer.exe

      Arguments: /Select,"${resource_loc}"

    To launch it quickly, you can also assign a shortcut for "Run Last Launched External Tool".

    1. Window->Preferences->General->Keys

    2. Enter "Run Last Launched External Tool" in "type filter text" textbox

    3. Binding a shortcut, e.g., Shit+F2

    5. Copy path/directory of current/selected file.

    1). Select current file from Package Explorer (Link with Editor can be used). Shortcut: Alt+Enter

    2). In the context menu, select Properties>Resource>Location. Then, you can copy the full path in Location field.

    6. Open Java Build Path dialog

    Method#1: Right click project in Package Explorer or Project Explorer -> Build Path -> Configure Build Path...

    Method#2: In a file editor window of the project, Project (menu) -> Properties -> Java Build Path

    7.  Library Reference

    If a project depends on other projects. Those projects should be added in the build path of current project.

    There are two ways to refer a project.

    Method#1:

    1). Open Java Build Path dialog

    2). Switch to Libraries tab

    3). [Add External JARs...]

    Method#2:

    0). Import the referred project into current workspace

    1). Open Java Build Path dialog

    2). Switch to Projects tab

    3). [Add...]

    Comments:

    In method#1, you cannot debug into codes of referred projects if JARs are referred.

    In method#2, you can.

  • 相关阅读:
    艾伟_转载:学习 ASP.NET MVC (第三回)实战篇 狼人:
    艾伟_转载:40条ASP.NET开发Tip 狼人:
    艾伟_转载:20条.NET编码习惯 狼人:
    艾伟_转载:数组排序方法的性能比较(上):注意事项及试验 狼人:
    艾伟_转载:使用LINQ to SQL更新数据库(上):问题重重 狼人:
    艾伟_转载:学习 ASP.NET MVC (第四回)实战篇 狼人:
    艾伟_转载:学习 ASP.NET MVC (第五回)理论篇 狼人:
    艾伟_转载:ASP.NET MVC 2博客系列 狼人:
    艾伟_转载:Cookie是什么?用法是怎样?与SESSION有什么区别?(二) 狼人:
    艾伟_转载:ASP.NET MVC 2博客系列之一:强类型HTML辅助方法 狼人:
  • 原文地址:https://www.cnblogs.com/weihongji/p/eclipse.html
Copyright © 2011-2022 走看看