Bug 176516 - [build path] Compiler Compliance should follow Execution Environment
Summary: [build path] Compiler Compliance should follow Execution Environment
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 236296
Blocks:
  Show dependency tree
 
Reported: 2007-03-06 12:58 EST by Markus Keller CLA
Modified: 2009-02-14 02:58 EST (History)
4 users (show)

See Also:


Attachments
Fix (85.81 KB, patch)
2009-02-14 02:56 EST, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2007-03-06 12:58:53 EST
From bug 134257 comment 2:

When a Java project is bound to an EE (via JRE container), changing
the EE should update the compliance setting. For example, I had a project bound
to J2SE1.5, and later changed it to J2SE1.4. The compliance settings remained
at 5.0 - I was confused when I could not run programs on a 1.4 VM due to
incompatible settings (i.e. running 1.5 code on 1.4 VM). I expected that the
compliance settings would have updated automatically.

Best would be a setting on the Compiler properties page that links the compiler compliance to the EE of the project (caveat: there's currently no default EE for a workspace).

The problem is again that JDT/Core does not know about EEs, so JDT/UI would have to listen to classpath changes to update the compiler settings.
Comment 1 Olivier Thomann CLA 2007-05-10 10:30:47 EDT
Who is changing the workspace settings according to the VM used when the workspace starts ?
Comment 2 Martin Aeschlimann CLA 2007-05-10 10:45:28 EDT
It's done in the launching plug-in. They detect the installed JRE and then set the corresponding compliance options.
Comment 3 Markus Keller CLA 2009-02-14 02:56:22 EST
Created attachment 125711 [details]
Fix
Comment 4 Markus Keller CLA 2009-02-14 02:58:41 EST
Fixed in HEAD.

We now set the compliance options from the EE whenever a new EE is added to the classpath in the UI.