Bug 474480 - Add additional quick fixes for execution environment not strictly compatible with build path
Summary: Add additional quick fixes for execution environment not strictly compatible ...
Status: NEW
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.12   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Vikas Chandra CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2015-08-07 04:51 EDT by Dennis Hendriks CLA
Modified: 2023-08-21 04:05 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Hendriks CLA 2015-08-07 04:51:33 EDT
I have a project with the execution environment set to 'J2SE-1.5'. Eclipse is running with Java 7. That Java 7 is configured as 'Installed JRE', and is the only one present.

I get a warning: "Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment." So far, so good.

Now, to fix this, I have to open the manifest editor, remove J2SE-1.5, and add JavaSE-1.7. There is a quick fix available on the warning, but is to open the execution environments preference page. That is the wrong solution in my case, as the project's execution environment should be changed.

I propose the following new quick fixes:

1. Quick fix to open the manifest 'Overview' page to configure the execution enviroments of the plug-in.

This is just to quickly go to the right place. The developer still has to manually change the execution environment.

2. Quick fix to change the execution environment of the plug-in to the default execution environment as configured in the 'Java - Installed JREs' part of the Eclipse Preferences dialog

This fixes the issue automatically.

I understand changing the execution environment is not always the right solution. However, consider the following use case. Our project has a lot of plug-ins, and we started development with Java 5. All developers had Java 5 installed, and properly configured in Eclipse. All projects have J2SE-1.5 as execution environment. Everything is properly configured, matches nicely, and there are no warnings. Then, the team switches to Java 7, to allow using Java 7 features. The end users will be required to switch to Java 7 as well, as the code will no longer run on Java 5. All developers install Java 7, and properly configure it as default JRE in the Eclipse Preferences dialog. Now all projects get warnings. This is good, as we then know we need to change them. It would then be nice if we could quick fix all those projects at once, to automatically switch to Java 7. We could then, after quick fix has changed them all, commit the manifests so that the rest of the team also gets the updated manifests.

(I found other bugs suggesting quick fixes for this problem, such as bug 281197, but none of them seem to suggest these exact quick fixes, and none of them suggest this use case as justification, as far as I could find)
Comment 1 Dennis Hendriks CLA 2015-08-07 04:54:29 EDT
Actually, it should change both the manifest and the '.classpath' file.
Comment 2 Eclipse Genie CLA 2019-09-05 14:55:26 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Dennis Hendriks CLA 2019-09-06 01:57:42 EDT
This issue is still present in Eclipse 2019-06 (4.12).
Comment 4 Dennis Hendriks CLA 2019-09-06 01:59:02 EDT
It is now an error, no longer a warning.
Comment 5 Eclipse Genie CLA 2021-08-27 16:09:18 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 Eclipse Genie CLA 2023-08-21 04:05:29 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.