Bug 426004 - [preferences][quick fix] Compiler compliance auto-detection
Summary: [preferences][quick fix] Compiler compliance auto-detection
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-17 11:27 EST by Patrick Julian CLA
Modified: 2014-01-24 09:43 EST (History)
3 users (show)

See Also:


Attachments
Current behaviour (53.14 KB, image/png)
2014-01-17 11:27 EST, Patrick Julian CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Julian CLA 2014-01-17 11:27:16 EST
Created attachment 239107 [details]
Current behaviour

Current behaviour:

I want to set the compiler compliance level in Preferences > Java > Compiler.
I set it to 1.6, for example.
Eclipse issues a warning (!) that I need a compatible JRE.


Expected behaviour:

- Eclipse should be able to autodetect whether the activated JRE is compatible with the given compiler compliance level or not.
- Eclipse should only warn me if the given combination really won't work.
- If there must be a warning, then it should be located next to the form element that causes it to appear (not be dangling somewhere at the bottom).


Best-case behaviour:

- Eclipse offers to auto-fix the problem by
-- checking whether a compatible JRE is installed (see above) and activating that JRE
-- if that is not possible, by issuing a valid link where the user can download a JRE that is known to be compatible to the desired compliance level.
Comment 1 Markus Keller CLA 2014-01-22 10:24:39 EST
Hint: If you use an "Execution environment" as JRE System Library, then the correct compiler compliance is automatically set when you change to a different EE.

I know that's not exactly what you asked for, but that's the recommended way.
Comment 2 Patrick Julian CLA 2014-01-24 09:43:48 EST
Hello Markus.

Yes, the dialog mentioned by you (assuming you mean this: http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2FgettingStarted%2Fqs-with-java7.htm) actually got me thinking about this issue.

So the detection logic seems to be present in Eclipse but as-for-now it is kind of "hidden" in the sub-dialog while the main JRE settings page remains as I have described initially.

I think it would be worth investing in usability improvements here, because the multitude of available Java, JRE and JDK versions can be pretty confusing for newbies and I bet it's helpful to have some assistance here. Especially as this is not going to become simpler in future, because even more (new) Java versions will become available over time.