Java Debug Return Values
Test Source Folders
A source folder can be configured as one that “contains test sources”. This allows you to control how the folder is displayed, whether test code is visible in your primary code or by other projects, and even have separate test-only dependencies.
Vue has become a favorite framework for building websites and single-page applications, and you can have a great development experience in Eclipse when using Vue. Powerful IntelliSense, quick navigation, smart validation and linting, new project wizards and integrated debugging are all available.
Java 10 introduced var support. Hover over a local variable declared with var to instantly see the actual type. Use the quick fix action to convert the declaration to use the actual type, or vice-versa.
Git Revision History
Do you need to know exactly how a file in a Git repository has changed? Use the History view, or display revision information directly in the editor, colored by author/date as required.
For a truly dark Eclipse experience, across all operating systems, try either the Darkest Dark or Deep Black theme—both included with the DevStyle plugin. If you’re not a dark fan, there is a collection of fresh, light themes too. Dark or light, all themes have unique, customizable icon sets, as well as a number of editor color sets to choose from.
Remote System Explorer
If you need to deal with remote systems, use the Remote System Explorer. It supports SSH, FTP, Telnet, and several other OS-specific protocols. Manipulate files, and even launch a remote shell, without leaving the IDE.
Frontend development goes much faster when you can immediately see changes as you update code. With Live Preview, you see a preview of your application right next to your code editor, and for some projects, changes appear as you type without requiring a save. You can pass URL parameters to easily test your application, configure the preview layout to your liking, and even detach the browser.
Use a Launch Group to launch multiple configurations with a single click. You can set up each configuration to simply launch sequentially, wait for the previous launch to terminate, emit specific output, etc., before launching.
Don’t waste time stepping through code when you don’t have to. Create a Trigger Point to skip breakpoints, until the trigger point itself is hit. Watch points can now have conditions, ensuring that execution is suspended only when the specified condition is met.
Use IntelliSense in your package.json files to get recommendations for Node module names and versions. So if you can’t remember a module name, or want to upgrade your modules, this capability makes it super convenient.
With Code Recommenders, content assist suggestions are ordered based on what other developers have called in a similar context—no more alphabetical suggestions to sift through! There’s a lot more that Code Recommenders can do—including advanced templatized snippets for most file types using the Snipmatch snippet engine.
The Debug Console can be a significant debugging asset. Use this to inspect, or even modify values during your debugging session. If you’re debugging Java, these capabilities are present in the Debug Shell view (a.k.a. Display view prior to Eclipse Photon).
It’s no secret that running your code through a static analyzer can vastly improve its quality. Spotbugs (formerly Findbugs), Checkstyle, and PMD, are well known static analyzers for Java, all of which have Eclipse integrations.
With these plugins, you can see potential problems reported in the IDE itself, allowing you to navigate to, and correct issues easily—some can even be corrected with Quick Fixes!
Emacs and Vi Power
Is the potential loss of key bindings and commands the only thing stopping you from moving from Emacs or Vi to a full blown IDE like Eclipse?
Use the Emacs+ or Vrapper plugins to give you access to these same powerful capabilities in any Eclipse editor. And we’re not just talking about key bindings, commands work as well.
Preview on Hover
You don’t need to jump between source files to see how a method is implemented, or a field defined. Press Shift (Java) or Ctrl (CodeMix supported languages) when hovering over your code, to peek at the definition without leaving your current editing context!
Advanced Source Lookup & Decompilers
Even if you don’t have the source attached while debugging a Java application, the JDT’s “Advanced Source Lookup”, is capable of finding and attaching the source for you—even downloading it from remote repositories if required.
If the JDT can’t find it, there’s always the Enhanced Class Decompiler, which can use a Java decompilation engine of your choice to seamlessly deliver source you can step through.
Can’t remember what the difference is between > and ~ when working with CSS selectors? Fret not, hover over a selector to see an instant preview of the elements it would target—very handy when dealing with complex selectors and advanced CSS syntax!
Emmet is fantastic for quick abbreviation expansion, but did you know that is just a snippet of what Emmet commands can do? Use Emmet to create lists, update image sizes, do some math, and much more!
When you’re trying to find a simple string within files in your workspace, the Quick Search (Ctrl/Cmd+Shift+Alt + L) is much faster, and easier to use than the File Search dialog. You can limit the search to specific file types, but the best bit is the preview of the section of the file with the matched text.
Chain Template Proposals
The JDT’s Chain Template Proposals will traverse reachable fields, local variables and methods, to produce a call chain whose return type is compatible with the expected type.
How do you get a Document from DocumentBuilderFactory? Let the chain template proposal figure that out for you. Enable them at Preferences > Java > Editor > Content Assist > Advanced.
Explorer Font Size
Have you found the Project/Package Explorer font sizes to be too small? With the latest release of DevStyle, you can make them as large as you desire!
Help Us Improve This List of Eclipse Tips!
With so many cool ways to use Eclipse, we’re sure our list of Eclipse tips is incomplete. If you have a tip you’d like to see added, we’d love to hear from you. Send us an email! firstname.lastname@example.org