Tips on Using Eclipse Effectively
Useful Eclipse Shortcut KeysALT + Left/Right Arrow | Move backward/forward in the editor navigation history |
CTRL+O | Show the quick outline for the editor input |
CTRL+K | Find next item, no need to ctrl+f, type some words, then search |
CTRL+1 | Activates the quick fix |
CTRL+SHIFT+T | Open Type |
CTRL+SPACE | Content Assist |
ALT+/ | Word completion |
ALR+SHIFT+R | Rename the selected element |
ALT+SHIFT+M | Extract statements into a new method and use the new method |
Ctrl + L | Go To Line |
CTRL+T | Show quick hierarchy of the selected element |
CTRL + SHIFT + F | Format code |
CTRL+SHIFT+O | Organize imports |
Ctrl+Shift+X | Change the selection to upper case, useful in declare final variable |
Ctrl+Shift+Y | Change the selection to lower case |
Ctrl+Shift+H | Open a type in the type hierarchy view |
Ctrl+Shift+S | Save all current contents |
Ctrl+Shift+W | Close all editors |
Ctrl+Shift+G | Search for references to the selected element in the workspace |
CTRL+E | Show a list of all open editors |
CTRL + D | Delete row |
CTRL+M | Toggle maximize/restore state of active view or editor |
CTRL+SHIFT+U Shows the Occurrences in File quick menu
Ctrl+Shift+R Open Resources
CTRL + I Corrects indentation
Ctrl+M Maximize Active View or Editor
Ctrl+Shift+Space
Context Information, If typing a method call with several parameters use this to show the applicable parameter types.Alt+Left/Right Backward/Forward History
CTRL + I Corrects indentation
CTL + N Open new type wizardCTRL + J Incremental search
CTRL + SHIFT + L Shows you a list of your currently defined shortcut keys
CTRL+F6 Use to move between open editors
CTRL+F7 Move between views
CTRL+F8 Move between perspectives
To configure the shortcut key, click Window --> Preferences --> General --> Keys
Associate editors with file types:
Window -> Preferences -> General -> Editors -> File Associations
Find: ^\s*\n
Replace with: (empty)
Eclipse plugins:
Code quality:
Checkstyle: http://eclipse-cs.sourceforge.net/update
It is used to enforce Coding Standards in Java Project, such as Naming conventions, Coding problems, Best Practices.
PMD http://pmd.sf.net/eclipse
PMD focuses more on preemptive defect detection.
FindBugs http://findbugs.cs.umd.edu/eclipse/
FindBugs concentrates on detecting potential bugs and performance issues.
Klocwork: http://developer.klocwork.com
Klocwork is aimed at improving software security, quality, and reliability. It is not free, but we can get 30 days free trail. And it is really very cool.
Mylyn: http://www.eclipse.org/mylyn/
Mylyn can integrate with issue management systems such as Bugzilla, and it also provides context management, which can hide much of the detail of projects that is irrelevant to the task at hand.
Mylyn is very helpful, especially your main job is to fix defects, or focus on one component of a big project.
ShellEd: http://sourceforge.net/projects/shelled/
EPIC - Perl Editor and IDE for Eclipse http://e-p-i-c.sf.net/updates
The PyDev Update Site http://pydev.sourceforge.net/updates/
Groovy Eclipse plugin http://dist.codehaus.org/groovy/distributions/update/
Aptana Studio http://update.aptana.com/install/studio/3.2/
http://www.aptana.com
Problem:
Recently, I re-downloaded and reinstalled jdk, and Eclipse always shows this error: 'UnsupportedEncodingException: GBK'. After google search, on http://dev.eclipse.org/newslists/news.eclipse.tools/msg30710.html, I found out this is because I installed a JRE only for US English, and I should choose to download and install Multi-language JRE.Problem:
When we save file, it may print out the error "Some characters can not be mapped using GBK character encoding". The solution is to change file encoding to 'utf-8': Select Window -> Preferences ->General Select Workspace , set Text file encoding to 'utf-8'. Select Content Types, set Default encoding to 'utf-8'Ignore white space when compare two files in Eclipse IDE
When compare two files in Eclipse, many times lines differ only in white spaces, and we don't want to notice this minor difference.
Solution:
Select Window -> Preference -> Compare/Path, and in 'General' tab, select the checkbox --'Ignore white space'.
Reference:
http://www.javaprogrammingforums.com/eclipse/19-useful-eclipse-shortcut-keys.html
http://www.rossenstoyanchev.org/write/prog/eclipse/eclipse3.html
http://tkramar.blogspot.com/search/label/eclipse
Java Power tools safari online book