Skip to content

Instantly share code, notes, and snippets.

@NetzwergX
Last active December 24, 2019 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NetzwergX/1350376e29ebd9e8cea6763cce6ab2c8 to your computer and use it in GitHub Desktop.
Save NetzwergX/1350376e29ebd9e8cea6763cce6ab2c8 to your computer and use it in GitHub Desktop.
Eclipse configuration

These are settings I found most helpful (start with Window > Preferences):

> Java > Code Style > Organize Imports > Number of static imports needed for .* (e.g. java.lang.Math.*): 1
Setting this to one prevents eclipse from messing up deliberately chosen static imports.

> Java > Editor > Syntax Coloring > Java > Type Variables > Enable [x]
(Choose bold and a good color e.g. cyan blue)

This allows one to use reasonable type variables, e.g. class Entity<Id> or MyMap<Key, Value>
instead of only non-descript single-letter type variables without confusing them for actual types.

> General > Editor > Text-Editor > Show whitespaces characters [x]
(Choose tab, space and ideographic space, disable breaks).

This allows you to see if tabs/spaces are wrong and if there are superfluos trailing chars and allows you to see if empty lines indented properly. This is mostly an OCD code-style thing of mine, I have an unfortunately complusory need for it to be clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment