Alright it can be a lame question, but everybody uses these things differently. What's some of the best time savers out there for this IDE.
Tom
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Crtl+1 is my favorite. The quick fixes for the red-squiggles.
It is also located in the Edit Menu -> Quick Fix.
CTRL+SPACE, for anything, anywhere.
Generate getters and setters.
Create Constructors using Fields
Extract Method...
Refactor->Rename
CTRL+O for the quick outline. CTRL+O+CTRL+O for the inherited outline.
F4 to display a type hierarchy
Open Call Hierarchy to display where a method is called from.
CTRL+SHIFT+T to open a Java Type
CTRL+SHIFT+R to open any resource.
ALT + left or right to go forward or backwards through edit places in your documents (easy navigation)
Override/Implement methods if you know you're going to do a lot of methods (otherwise, CTRL+SPACE is better for one at a time selection.
Refactor->Extract Interface
Refactor->Pull up
Refactor->Push down
CTRL+SHIFT+O for organize imports (when typing the general class name such as Map, pressing CTRL+SPACE and then selecting the appropriate class will import it directly for you).
CTRL+SHIFT+F for formatting (although Eclipse's built in formatter can be a little braindead for long lines of code)
EDIT: Oh yeah, some debugging:
F5: Step into (show me the details!)
F6: Step over (I believe you, on to the next part...)
F7: Step out (I thought I cared about this method, but it turns out I don't, get me out of here!)
F8: Resume (go until the next breakpoint is reached)
CTRL+SHIFT+I: inspect an expression. CTRL+SHIFT+I+CTRL+SHIFT+I: create a watch expression on the inspected expression.
Conditional breakpoints: Right click a breakpoint and you may set a condition that occurs which triggers its breaking the execution of the program (context assist, with Ctrl+Space, is available here!)
F11 - Debug last launched (application)
CTRL+F11 - Run last launched (application)
F3 has been my favorite, opens the definition for the selected item.
Ctrl+Shift+R has an interesting feature, you can use just the uppercase camel letters from a class when searching (such as typing CWAR will show a result for ClassWithAReallyLongName).
Alt+Shift+W > Package Explorer makes life easier when browsing large projects.
Ctrl+Alt+H on a method to get the call hierarchy for it. Fast way to see where it is called from.
Ctrl-J starts an incremental find.
Hit Ctrl-J, then start typing. Use up/down to find previous/next instances of what you typed.
Ctrl-Shift-J searches backwards.
Clicking on the return type in a method's declaration highlights all exit points of the method.
for instance:
clicking on void will highlight the return on line 4 and the close } on line 7.
Update: It even works for try{} catch blocks. If you put cursor on exception in the catch block and eclipse will highlight the probable methods which may throw that exception.