Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » [Solved] Compiler level not applied automatically
[Solved] Compiler level not applied automatically [message #1758544] Wed, 29 March 2017 21:04 Go to next message
Erwin De Ley is currently offline Erwin De LeyFriend
Messages: 52
Registered: August 2013
Member
Without deep prior knowledge, and a couple of hours of reading tutorials and browsing the forum etc I've managed to define a project setup and it almost all just works. So thanks for a great tool and extensive online info and examples!

The setup includes a number of workspace preferences (e.g. customized java code formatter, compiler level etc), dynamic working sets, a workspace JRE 1.7 while using 1.8 for the Neon installation itself etc.

I've updated just before, to the latest Eclipse Installer 1.7.0 build 2932.

Everything works fine form start to finish, except :
1. the compiler level 1.7 is not set, it sticks to 1.8 (on the configured JRE 1.7)
2. in the package explorer the toplevel is not set directly to working sets, I need to do that still manually (will describe that in a separate post)

For the compiler level, I've used the preferences recorder to capture the switch to 1.7. I've tried to store that in 1 project-wide preferences section, and alternatively within the trunk stream (SVN lingo), as we'll probably evolve to having different java levels for different branches in the future. In both cases the level is not applied during the startup tasks, while the other prefs are correctly applied.

The setup model is in attach (just disabled the link to our SVN repo), and in this shot :
index.php/fa/28920/0/

When looking at the triggered tasks in the started installation (Help > Perform setup tasks) it shows (I think) that the preferences were indeed not applied. I can then trigger that manually and it goes fine then.

index.php/fa/28918/0/

What could cause this, i.e. that they are not set directly during the first installation?

thanks!

erwin

[Updated on: Thu, 30 March 2017 14:51]

Report message to a moderator

Re: Compiler level not applied automatically [message #1758566 is a reply to message #1758544] Thu, 30 March 2017 07:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Is it possible that your target definition specifies a JRE (it has Java 6 in the name) and that activating this target platform changes the current JRE and that in doing so, also changes the compiler settings perhaps as a side effect?

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Compiler level not applied automatically [message #1758572 is a reply to message #1758566] Thu, 30 March 2017 08:31 Go to previous messageGo to next message
Erwin De Ley is currently offline Erwin De LeyFriend
Messages: 52
Registered: August 2013
Member
Ed,

The name of the target definition is indeed unfortunate (I need to check with our build guy why that one is used), but there's no JRE defined in there. It refers to the default JRE.
I also checked the launch configuration in the setup, to see if that one could cause something similar to what you suggest, but that one also refers to the default JRE.

Is there a way to have some detailed logs of each configured setup task and when it's triggered or failed?

cheers
erwin
Re: Compiler level not applied automatically [message #1758582 is a reply to message #1758572] Thu, 30 March 2017 09:33 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
There is only the log. It would be interesting to know if the task performed during the initial startup. You could see that in the log history (Navigate - Open Setup Log). You could also add -Doomph.setup.skip=true to the eclipse.ini before you launch the new installation, and then the tasks won't perform automatically so you can do them manually, and see which tasks are listed on the confirmation page.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Compiler level not applied automatically [message #1758587 is a reply to message #1758582] Thu, 30 March 2017 11:04 Go to previous messageGo to next message
Erwin De Ley is currently offline Erwin De LeyFriend
Messages: 52
Registered: August 2013
Member
Ed,

I've attached the installation log (bootstrap & startup) for a fresh try.
(I deleted large sets of repetitive lines about the SVN checkout, mvn build etc but all that is relevant should still be in)

It shows from line 1420 that the compiler level tasks are executed :

...

[2017-03-30 11:54:28] Performing Preference /instance/org.eclipse.team.core/ignore_files = *.pyc...
[2017-03-30 11:54:28] *.pyc
true
.classpath
false
.project
false
.settings
true
bin
true
target
true

[2017-03-30 11:54:28] Performing Preference /instance/org.eclipse.ui/SHOW_MEMORY_MONITOR = true
[2017-03-30 11:54:28] Performing Preference /instance/org.eclipse.ui/showIntro = false
[2017-03-30 11:54:28] Performing Preference /instance/org.eclipse.ui.editors/printMargin = true
[2017-03-30 11:54:28] Performing Preference /instance/org.eclipse.ui.editors/printMarginColumn = 120
[2017-03-30 11:54:28] Performing Preference /instance/org.eclipse.ui.editors/spacesForTabs = true
[2017-03-30 11:54:28] Performing Preference tabWidth = 2
[2017-03-30 11:54:28] Performing Preference /instance/org.eclipse.ui.workbench/HeapStatus.showMax = true
[2017-03-30 11:54:28] Performing Preference /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.codegen.targetPlatform = 1.7
[2017-03-30 11:54:28] Performing Preference /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.compliance = 1.7
[2017-03-30 11:54:28] Performing Preference /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.source = 1.7
[2017-03-30 11:54:28] Performing Preference /instance/org.eclipse.jdt.ui/formatter_profile = _Triquetrum preferences
[2017-03-30 11:54:28] Performing JRE for JavaSE-1.7 = C:\Program Files\Java\jdk1.7.0_75
[2017-03-30 11:54:28] Creating JRE for JavaSE-1.7 with location C:\Program Files\Java\jdk1.7.0_75
[2017-03-30 11:54:29] Setting the default execution environment to JRE for JavaSE-1.7

...

But in the end I see that the other prefs are indeed set, but not the 1.7 level stuff...

And those are still shown in the list of to-be-triggered tasks in Help > Perform setup tasks (as mentioned before). When I trigger them from there, they get applied correctly.
Re: Compiler level not applied automatically [message #1758603 is a reply to message #1758587] Thu, 30 March 2017 13:35 Go to previous messageGo to next message
Erwin De Ley is currently offline Erwin De LeyFriend
Messages: 52
Registered: August 2013
Member
Found it! It would seem that the exported formatter definition also contains java 1.8 settings !? And that one is applied after the 1.7 setting....

Now I need to figure our how those end up in the formatter definition, but that will not be an oomph thing as far as I can imagine...

cheers
erwin
Re: Compiler level not applied automatically [message #1758614 is a reply to message #1758603] Thu, 30 March 2017 15:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Note that Oomph does a good job recording a named formatter profile and applying the choice of that profile (verses recording all the individual preferences set by the profile). So you might try recording into your project setup, making some trivial change to the formatter profile and changing it back after, and also switching the profile selected and back again...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Compiler level not applied automatically [message #1758658 is a reply to message #1758614] Fri, 31 March 2017 10:25 Go to previous message
Erwin De Ley is currently offline Erwin De LeyFriend
Messages: 52
Registered: August 2013
Member
Yes indeed, very nice approach to manage formatter settings!
Which is what I was doing without looking at the detailed contents of that profile.

I would not expect compiler level settings to be part of that, as they are nowhere in the formatter configuration panels...

When just doing a formatter export (outside of any Oomph handling, directly from the formatter preferences pages) I see that it also exports the 1.8 levels i.o. the 1.7 that I have configured under the Java>Compiler prefs. So there must be some issue in JDT formatter exporting or so.

thanks again for Oomph and your fast support reactions,

erwin
Previous Topic:Install Eclipse executable package silently via Chef
Next Topic:Oomph and .project files
Goto Forum:
  


Current Time: Sat Dec 07 17:27:49 GMT 2024

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

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

Back to the top