10 opportunities to be more productive with Eclipse for Java developers

Many of you know how to effectively improves the performance of the use of hot keys, code patterns, and very cool search bar (Quick Access), but I'd like to tell you about the ten features that don't know everything.
1. Code Recommenders
Code Recommenders is a delightful smart plug-in code hinting when writing. Previously when we pressed Ctrl+Space, we have seen all the methods, variables, and templates, many of which could be completely useless; the plugin Code Recommenders chooses useful methods that are applicable in this case and orders them by relevance – probability with which we use the method in this context. And from the Code Recommenders SnipMatch and even allows you to insert whole blocks of boilerplate code. For details and installation here.


2. Type Filters
Type Filters remove recommendations for selected types everywhere. Just from everywhere. Eclipse PDE developers, for example, constantly in the way Label, Button, and other AWT classes, because they write to SWT, and certainly makes no sense to meet a List of AWT, if you're writing a library. So go into Preferences... no, not so. Press Ctrl+3 and start to enter “Type Filters”, go to the appropriate page settings and if necessary add java.awt* and javax.swing*.

3. Favorites
There is also another case – when you want to see some heart native static methods. For example, I often use preconditions from Guava libraries – Preconditions.checkArgument(boolean) and Preconditions.checkNotNull(T), which are very basic need that when configuring Eclipse I just go to Favorites and add to com.google.common.base.Preconditions.

4. Organize imports on save
Maybe someone already developed a reflex to press Ctrl+Shift+O to clean-up unnecessary imports in the form of yellow stripes at the top of the vertical scroll bar of the editor, and maybe someone clicks this shortcut of course before saving. But don't worry, you can do this – go to “Save Actions”, select “Perform the selected actions on save” and make sure “Organize imports” is selected – now unnecessary imports themselves will be deleted when saving. By the way there is many useful actions, such as placement of the missing Override annotations, removing unnecessary casts, remove dead code or format only the edited lines, and even there is such “fun” possibilities, as the transformation of the usual for in a foreach or unnamed classes in the lambda.

5. Display
Display – it is such a view (view) that gives you the power to use the debugger like a real ninja. Code from the view Display is started in the context of the current debugging. Write a line of code, pick it, press Ctrl+U and the code runs, press Ctrl+Shift+V code not only runs, but the result of his call is printed next to our code in the Display. In addition, the selected text can be sent in Watch Expressions. All of these actions are also available on the toolbar of the view.

Comments
the
-
the
- Any selected text can be sent in Watch Expressions with the command “Watch”. For this command, no hotkey by default, but you know that Eclipse any team, you can assign Kotka. the
- Ctrl+U and Ctrl+Shift+V work in that case, if you select the text directly in the code editor; in the case of pressing Ctrl+Shift+V the result will be shown in the departing window.
6. Show Logical Structure
One of the most unpleasant things when debugging is poking around with the contents of the LinkedList or TreeMap, because in the view Variables they are represented by the uncomfortable way that corresponds to their real structure, but does not match the logical structure. The button “Show Logical Structure” on the toolbar of the view Variables just makes it so that we saw the contents of such collections (and not only) in a convenient form. At the same time, this button changes the display of objects when hovering the mouse. This button looks like a picture of a tree, near which on the left yellow arrow.

7. Bookmarks
Bookmarks – in fact, a view to work with bookmarks. Is useful when you need to disassemble a ton of some code, because it allows you to go to the “selected locations” code and take notes on them – added to bookmarks, click on the area to the left of the editor, the “Add Bookmark...”, but better, of course, some assign hotkey (e.g. Ctrl+B – he's still useless, as designated on the “Build All” by default).

8. Split Editors
After 12 years, 200 votes, and 181 review, a division of editors has been implemented in Eclipse. Horizontal separation – Ctrl+_ (Ctrl+Shift+ -) and vertical – Ctrl+{ (Ctrl+Shift+[). Yay! We can edit two parts of the file at the same time! By the way, these two parts are perceived as different editors when switching between editors (by pressing Ctrl+F6 or Ctrl+Shift+E, but not when Ctrl+E).

9. FindBugs, Checkstyle, PMD Eclipse
Various code analyzers help to find copy-paste, deviations from coding standards and other potential problems in your code before these problems were leaked to the bug tracker (and, as a consequence, worsened the opinion of the customers about your company), moreover, these analyzers will inevitably help you better understand Java library and effektivnee to use the language itself. Naturally, for many of these useful tools, there is integration with Eclipse.

Notice that FindBugs, Checkstyle and PMD Eclipse everything is in the Eclipse Marketplace, so their installation is extremely simple using the Help → Eclipse Marketplace... without gugleniya and visiting any sites.
10. Plugins
The power of Eclipse in General the ability to use any plugins that you may need, this applies not only to the plugins check code. Need a disassembler of Java? Is JD-Eclipse. Need integration with Maven or Apache Ivy? There are m2e and Apache IvyDE. I can not understand 5000 lines of code build your project for Ant? There Are Ant Visualizer. Worried about dead code? There Is Unnecessary Code Detector. Want to “draw” the Windows of the SWT using the WYSIWYG editor? Is WindowBuilder.

11. Secret
Interested in productivity – interested in how to use the tools that you use and what innovations they are introduced.
What is possible increase your productivity in Eclipse?
Materials
-
the
- Eclipse for Java Developers. Navigation and editing – article on habré about shortcuts in Eclipse IDE for Java Develipers. By the way, Ctrl+Shift+L hotkey all hotkey. the
- My Top 10 Tips on how to be more productive with the Eclipse IDE — Jordi Böhme López
suggests 10 useful features of Eclipse.
the - Tips and Tricks (JDT) from the documentation of Eclipse – lots of easy tips, covering a large part of the JDT functionality. the
- Eclipse Luna — New And Noteworthy – some new features in Eclipse Luna, in particular opportunities for Java developers.
Комментарии
Отправить комментарий