Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-ui-dev] Java Formatter profile export also exports (wrong) compiler levels

Erwin,
this sSounds weird, please create a bug for that.
 
Kind regards,
Andrey Loskutov

http://google.com/+AndreyLoskutov
 
 
Gesendet: Mittwoch, 05. April 2017 um 09:39 Uhr
Von: "Erwin DL" <erwindl0@xxxxxxxxx>
An: jdt-ui-dev@xxxxxxxxxxx
Betreff: [jdt-ui-dev] Java Formatter profile export also exports (wrong) compiler levels

Dear JDT devs,

 

This is a copy of a message I posted on the “Eclipse Platform” forum last week, but got no response (see https://www.eclipse.org/forums/index.php/t/1085324/ ).

Maybe that forum is not the right place, so I’m trying here as well, my apologies for the duplication.

I hope this is the/a right place for this topic?

 

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

_______________________________________________ jdt-ui-dev mailing list jdt-ui-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jdt-ui-dev

Back to the top