Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Java Formatter profile export also exports (wrong) compiler levels
Java Formatter profile export also exports (wrong) compiler levels [message #1758660] Fri, 31 March 2017 10:53 Go to next message
erwin de ley is currently offline erwin de leyFriend
Messages: 49
Registered: August 2013
Member
I hope this is the right forum for questions on Java formatter exports?
(If not pls point me to the right place.)

In the Preferences pages for the Java Code Style formatter, you can configure an own formatter with all kinds of nice customized settings, and then export it to share it with a team.

Strangely, when looking at the details of the exported XML, also compiler/source level settings are in there. While these are not maintainabile via the formatter preference pages/tabs. And what's more, they don't seem to correspond with the actual levels I have configured in Java > Compiler.

E.g. on Neon running on a JDK 1.8, but with a workspace configured for 1.7 compatibility, the exported src/compiler levels are 1.8!

I've tried this on Neon and Mars, and have seen online examples of exported formatter profiles from older versions that also contain compiler level settings.

Is this a desired feature of the formatter export? If so, shouldn't this export the levels configured under Java > Compiler? But even better for me would be to not make this part of the formatter export...

This has caused me headaches/problems when preparing an Oomph installer where the 1.7 compiler level preferences were stored in the installer, together with an exported formatter profile. And the end result was that via the formatter profile I always end up with 1.8 workspace settings which is not what I need for that project setup.

It took me a while to find out this was due to the formatter xml and then I needed to manually change those compiler levels in there to get my workspace setup correctly with the Oomph installer...

regards
erwin

Re: Java Formatter profile export also exports (wrong) compiler levels [message #1759040 is a reply to message #1758660] Wed, 05 April 2017 13:44 Go to previous message
erwin de ley is currently offline erwin de leyFriend
Messages: 49
Registered: August 2013
Member
got a reply on the jdt-ui-dev mailing list : https://dev.eclipse.org/mhonarc/lists/jdt-ui-dev/msg01544.html

ticket created https://bugs.eclipse.org/bugs/show_bug.cgi?id=514769

thanks
erwin
Previous Topic:Reuse builder in multiple plugins
Next Topic:Problems when DS are referencing org.eclipse.core.resources
Goto Forum:
  


Current Time: Fri Nov 24 01:40:30 GMT 2017

Powered by FUDForum. Page generated in 0.01334 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software