VSCode vs Eclipse IDE

Hi guys.

I’d like to know the differences between two IDE for openhab.

Which is better ? Or … there is one suggested ?

Actually i can setup them for compile the bindings and both works.

Both, which do you suggest ?

Thanks,

Luca

I am no developper but I believe from reading the forum that the Eclipse IDE is for binding and OH development and the VS Code is for openHAB files like rules, items… with the openHAB VS code extension.
It maybe possible to develop bindings in VS code but I am not aware of anyone doing that.

I can succesful compile binding from vscode… but probably missing the powerful of eclipse ide special for debuggind it.

On the other side… Eclipse it’s very slooooow and very often unmanageable !!!

I’ve been using VSCode (exclusively) for about 3 months now to modify my Sony binding. Works incredibly well (atleast alot better than Eclipse did). I find it much faster and the debugger to be more powerful than Eclipse. I’ve gone so far as to remove eclipse from my system at this point

Their are a few downsides. I find them minor but others may not…

  1. No support for Nullable annotations. Probably the biggest issue I have - you still get the errors when you do a compile but you won’t get errors interactively while editing (like Eclipse has).
  2. Less refactorings then Eclipse. The ones that are included probably do about 99% of what I need only miss a few specialized ones (surround javadoc mainly). This will probably catch up over time.
  3. The build process - the openHAB maven or bnd or whatever will generate XML file for OSGI annotations. Since VS runs maven to build, those XML files get recreated on every save and their is a small amount of time where you ‘wait’ for that to happen (because the IDE won’t do any of the nice suggestions until the build is done). Don’t think this is an IDE issue but more of an issue in our build process.
  4. Code formatting is not exactly the same - VSCode doesn’t quite support everything that Eclipse does but is pretty close.

All those are really minor in my mind and I’m quite happy with VSCode development for bindings. About 100x faster than Eclipse, starts up right away and the debugger is top notch

I didn’t know that it was posssible to use VS code to code bindings. I stand corrected.
Thanks @Luca_Calcaterra and @tmrobert8

The ability to use VSCode has become possible thanks to the new build system. There is even documentation on how to use VSCode: https://www.openhab.org/docs/developer/

Eclipse has always been the ide of openHAB as it was tightly bound to the eclipse build system so it is best supported. But the build system has changed, with, among other things, the idea that you can use whatever ide you’re best familiar with. It looks like more developers are starting to use VSCode with openHAB so experience and specific support is increasing.

To summarize. If you’re not familiar with either ide. Eclipse is probably the way to go. But if you’re familiar with java development with VSCode or you’re not afraid to try something new you should certainly give VSCode a try.

3 Likes

Good analysis !!! Thanks
Luca