Skip to content

Eclipse

If only for the completion of the imports, . probably ONLY for that.

Eclipse is #1 at this moment because it is asked for almost every job. However we have 4 solutions as i see it at this moment :

  • eclipse
  • intellij
  • netbeans
  • jdeveloper because it is from Oracle

But i will log down all pro's and con's going along :

  • vim support is free on intellij (plugin) but a very annoying bug is that insert cannot be repeated with the '.' command (4 spaces does work!). eclipse plugin (vrapper) does this ok!.
  • intellij does not install maven dependencies automatically out of the box. And i cannot find a plugin that does. Again.. eclipse has a m2e plugin that seems to do this ok !

Installation

In a proxy environment you will not get the installer working, because there is no visible option to set a proxy. There is in the IDE itself, but you don't have that yet. So try to get the complete package, it is well hidden, but you are in the right direction if find a package without -inst- in the name or one that is larger than 100 MB (neon installer was 45MB, the complete package was 160MB)

Best guess at this time (neon) is : visit you get the different version there, choose the flavour you want.

After installing why not set the proxy right away.. :

  • Eclipse-> Preferences -> General -> Network Connections :
  • Active Provider : manual
  • You may now edit the values and check marks
  • Apply/Ok

Gradle

Of course i don't want to give up gradle, but use both. But you need to have a more rigid directory structure for eclipse. Roughly the difference for package org.klopt.tools, and tool stocks you would get :

main class

org.klopt.tools.stock

tree
1
2
3
4
├── src
   └── main
       └── java
           └── stock.java

Which leaves eclipse with the error :

Error

The declared package does not match the expected package “org.klopt.tools”

wrong
1
2
3
4
5
├── src
   └── org
       └── klopt
           └── tools
               └── stock.java

And this causes gradle to not compile the stock.java since it seems to only look in the main directory. This will compile but in the Fat Jar stock.class is just absent.

So a combination of these two works, leaving a complete directory structure that works both from eclipse and with gradle :

working tree
.
├── bin
   └── org
       └── klopt
           └── tools
               ├── SQLiteJDBC.class
               ├── Stats.class
               ├── stock$1.class
               └── stock.class
├── build.gradle
├── down.sh
├── gradle.properties
├── src
   └── main
       └── java
           └── org
               └── klopt
                   └── tools
                       └── stock.java
├── stocks.db
└── test.sql

troubleshooting

Error

System property https.proxyHost is not set but should be 10.10.1.13.

In the plugin, org.eclipse.core.net. You will see it right after starting up in the Error Log. If you open preferences, you can search for proxy and it will lead you to the network settings. This warning was in the way if you set the proxy manually. Trying the other two options 'native' and 'direct' both gave another message: see next chapter.

System property http.nonProxyHosts has been set to local|.local|169.254/16|.169.254/16 by an external source. This value will be overwritten using the values from the preferences

It seems to say a system setting overrides the eclipse one ? Well in the systems network-> proxy settings this line was set for "Bypass proxy.."

proxy
*.local, 169.254/16

So wiping that does solve this problem. But i keep that line here to see if anything else breaks.

Error

Unable to connect to repository http://download.eclipse.org/releases/neon/compositeContent.xml

Now we disabled the manual proxy, of course this happens. But if you set it to 'native' in the eclipse config i think it keeps working.

maven plugin not working

The automatic search for Classes via the m2e plugin has been removed !!

icons meaning

a small yellow cylinder means git version control !

There are various pages showing the icons and decorations, but since this one was added by git plugin it is not listed there :

See JDT icons and decorations/adornments : visit

See CDT icons here : visit

If you want to disable the icons go to window->preferences : General->Appearance->Label decorations.

Sadly it does not show the icons, but by enable/disable + "Apply" you can watch them switch on/off. When you disable "Git repository objects" you will see the yellow cylinder disappear. Go to window->preferences : Team-> Git -> Label decorations for all git decorations. If you now know their meaning they might be handy.

key bindings

A lot of combinations do not works from scratch, but there are some workarounds.

unbinding

This means the system has another default for the key in question. Go to Window->Preferences->General->Keys and find the combination in the list. Once found click 'unbind'.

remapping

The list

so i maintain a list here to get them working :

  • ctrl-p is print in most apps, but i want it for backward search. Unbinding will work for this.
  • ctrl-v is paste, and in vim it is visual block. I decided to favor the vim setting, and unmap ctrl-v. This is because i am really switched to vim mode once editing. In other editors it's rather easy to switch to 'paste' mode again.

by the way, seemingly this : visit is a list of keys you can unbind to get vim support.