Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2021924
  • 博文数量: 413
  • 博客积分: 10926
  • 博客等级: 上将
  • 技术积分: 3862
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-09 18:14
文章分类

全部博文(413)

文章存档

2015年(5)

2014年(1)

2013年(5)

2012年(6)

2011年(138)

2010年(85)

2009年(42)

2008年(46)

2007年(26)

2006年(59)

分类: Java

2009-02-13 18:16:40

  1. Link to othere folder/file
    If project A and B contains the same files/folders, you can create maintain those objects in only one project, and create a link to them from another project in the following way:
    - Create File > New > Folder/File
    - Select the path to create folder/file
    - Input the name of folder/file
    - Click button Advanced>>
    - Select checkbox 'Link to folder/file in the system'
    - Select path to be linked
    - Click 'OK'
  2. View Project Path
    Right click project name on Navigator window, then select Properties > Resource, then the location is shown at the right of the window.
  3. Debug
    Click "Run" -> "Debug" or F11 to run application in Debug mode.
    F5: Step Into
    F6: Step Over
    F7: Step Return
    F8: Resume, run to next breakpoint
  4. Return Edit mode from Debug mode:
    Click "Window" -> "Open Perspective" -> "Java"
  5. Enable Content assist (Auto complete)
    Refer to http://www.cnblogs.com/8776/articles/1682682.html
    • Window -> preferences -> Java -> Editor -> Content assist
    • Select "Enable auto activation"
  6. Content assist (Auto complete)
    Auto complete doesn't take effective, and when to press "Alt + \", a dialog with messages “No Default Proposals” pops up。You can follow the instructions to resolve this issue:
    • Press Window -> Preferences -> Java -> Editor -> Content Assist -> Advanced
    • Select "Other Java Proposals" in「Select the proposal kinds contained in the 'default' content assist list」
  7. Hot keys
    • Ctrl + l: Go to the specified line
    • Ctrl + Q: Go to last edit place
    • Ctrl + D: Delete a line
    • Ctrl + Shift + F: Format code fast
    • Shift + Tab: Align code
    • Please refer to http://denver.blog.51cto.com/272871/52219 to get more details
  8. Change encoding
    1. Change the encoding for your entire Workbench
      Preferences > General > Workspace and select the Text File Encoding (such as UTF-8)
    2. Change the encoding for a single file
      Right click file, then select Properties > Resoueces and select the Text File Encoding (such as UTF-8)
    3. xxx
  9. Change Code Style
    Window -> Preferences -> Java -> Code Style -> Formatter, you can configure to replace TAB with Blanks, etc.
  10. Constructor
    In Java, you can invoke other constructors in a constructor, such as
    public MyConstructor (type a)
    {
        this(a, b, c);
    }

    Note: You can't do like this in C++.
  11. Comments
    1. Add comments
      Ctrl+shift+/
    2. Remove comments
      Ctrl+shift+\
  12. ...
阅读(860) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~