/
IntelliJ tips and tricks

IntelliJ tips and tricks

Just a random collection of IntelliJ things.

Pass parameters to the Eclipse compiler

To make IntelliJ's Eclipse compiler use the settings as left by Eclipse in the .settings directory use the following:

  • Go to Settings → Build, Execution... → Compiler → Java compiler
  • Set "Use Compiler" to Eclipse
  • Add the following in Additional command line parameters:
    -properties $MODULE_DIR$/.settings/org.eclipse.jdt.core.prefs

IntelliJ opening with too small a window

Go to ~/.IntellJIdeaxxxx/config/options, then edit the file dimensions.xml by removing the window that is too small.

Disable automatic adding of Javadoc @param and @returns and @throws garbage

Go to Settings → Editor → General → Smart Keys, then disable "Insert documentation comment stub" under the "Enter" heading.

While Javadoc is important most of the time adding these extra tags is completely useless - even when generating documentation. For instance all idiotic getters and setters that we still code in 2017(!) just need a description of what they are FOR, and with that it's more than obvious what they return. The same goes for many methods: if you code well your parameter names make it quite obvious what is expected, and this means you should document what is exceptional, not what is obvious.

Documenting the obvious is a waste of your employer's time, and is wasting several times MORE time of all the poor people reading it. What is also quite noticable is that people document what they find easy (so its worth is negligible) but do not document what is hard (which is what is really needed). Javadoccing obvious data adds to the former behavior.