Open htreu opened 6 years ago
@Hilbrand I just realised you entered the original issue. Let's continue here.
It seems the documentation is outdated. The IDE setup instructions has been changed from Oxygen to Photon one month ago. I assume it would be not possible to use different formatter rules in one setup file. So, we should define the version we support officially. We decided not to update the documentation to 2018-09 (IIRC) because a change every 6 month could be hard to maintain.
@kaikreuzer WRT to the formatter rules and other settings, what do you think about the official IDE version?
@htreu You use "Eclipse Oxygen" in the title of that issue but
Eclipse IDE for Java Developers
Version: 2018-09 (4.9.0)
Build id: 20180917-1800
in your comment.
I don't understand which IDE version is affected, Oxygen or 2018-09 or both?
Oh sorry. Releases are so quick I'm still used to the other version. But the problem is with eclipse Photon.
I can confirm the problem also exists with Eclipse 2018-09.
The version @htreu mentions is the version I also have this problem with: SimRel 2018‑09. I was under the assumption Photon was still the latest. Sorry for the confusion. So i maybe it's also a problem with Photon, but I haven't tested that version.
I will inspect and try to fix the problem.
@kaikreuzer WRT to the formatter rules and other settings, what do you think about the official IDE version?
@kaikreuzer Can you answer the question above?
The formatter rules that are embedded to the Oomph setup file should reflect the settings of a given IDE version. If e.g. 2018-09 adds more options that should not be added to the formatter rules at least not as long as we don't know that old IDEs could handle more recent formatter rules.
@kaikreuzer Can you answer the question above?
Difficult, because I do not really understand it 😊 . But in general: We should make sure that OUR formatter is applied and working and no new fancy stuff interferes with it. Does that answer the question?
Not really :wink:
Assume some of us start using Eclipse 2018-09 but the official IDE documentation still states Photon. If there is a new formatter option in the new Eclipse IDE that is not set by the Oomph setup (because it does not exist in the old IDE) the default option is used. The default option could reformat the code. Now we could set the option that way that it result into the same look & feel as before. If we commit the new formatter rules to get applied for everyone we need to check if Photon is still working as expected. This check adds another overhead as we need to check against 2018-09 and Photon...
As Photon is the official IDE I will add formatting rules that works for Photon and don't care about (upward) compatibility to 2018-09. This way OUR formatter is applied and working with the official IDE version.
I can confirm the problem also exists with Eclipse 2018-09.
That's interesting at all because it works for me on 2018-09.
I tried (will try) different revisions of the setup file (targetplatform/EclipseSmartHome.setup
) and checked if I can open the formatter settings (Preferences, Java, Code Style, Formatter).
revision | Photon |
---|---|
7176f8961a4caba501fe38bab52a44c8705011c3 | success |
4610e3b9c7f3cadef0dc15e3b45142434963de6c | success |
@htreu Can you give it a try, too?
@J-N-K As you comment that you are affected of that problem, can you try to execute the ESH Eclipse IDE setup instructions using Photon and a newly created user profile on your machine? The new user should be used because there are some other folders used by the IDE or the setup (e.g. ${HOME}/.eclipse).
I don't see that problem with a new Photon-IDE on a fresh profile (Windows 10, 64bit).
@J-N-K Thanks a lot. So I would assume it is not a problem of the setup file but on the local machine setup.
@htreu Please comment
I did another test: The OpenHAB IDE (fresh install on a fresh profile) uses the wrong formatting. So you can ignore my comment as I was not using the ESH IDE.
The easy fix is: Go to preferences, select java formatter. ESH is selected, but not active. Select something else, apply, reselect ESH, apply. Now it is working again.
I tested the easy fix and it works. :+1: That was easy! :smile:
taken from the ESH Forum: https://www.eclipse.org/forums/index.php/t/1095926/
Original text:
I've installed the latest version of Eclipse Smart Home and it formats the JavaDoc wrong on save. For example it changes:
into:
When I try to open the Java -> Code Style -> Formatter and want to edit a template Eclipse hangs temporary and in the log file the following exception is thrown:
Eclipse IDE for Java Developers
Version: 2018-09 (4.9.0) Build id: 20180917-1800