Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 213750 - Removing the execution environment doesn't fix project errors because it doesn't update the classpath
Summary: Removing the execution environment doesn't fix project errors because it does...
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.4 M5   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-22 07:18 EST by Ed Merks CLA
Modified: 2008-02-05 16:29 EST (History)
5 users (show)

See Also:
baumanbr: review+


Attachments
org.eclipse.pde.ui.patch (3.69 KB, patch)
2007-12-27 19:16 EST, Chris Aniszczyk CLA
no flags Details | Diff
mylyn/context/zip (1.25 KB, application/octet-stream)
2007-12-27 19:16 EST, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Merks CLA 2007-12-22 07:18:32 EST
In an IDE that doesn't have a 6.0 JRE available, create an plug-in project with a JavaSE-1.6 Execution Environment using the wizard.  The project will have an error, but there is no error mark in the MANIFEST.MF itself so the user is left a little confused what needs to be changed to fix the problem.  Open the MANIFEST.MF to remove the Execution Environment dependency on JavaSE-1.6 and save the file.  The error in the project remains.  Apparently one needs to invoke Update Classpath, but it seems to me that step shouldn't be necessary since I clearly changed something that requires the classpath to be updated.

So I think there are two problems.  One is that the MANIFEST.MF should have an error marker for its unsatisfied execution environment dependency and changing that dependency should fix the problem without additional steps.
Comment 1 Chris Aniszczyk CLA 2007-12-27 19:08:59 EST
Hrmmm, I guess this enhancement wasn't "Ed proof" :/

The solution here will be to not allow users to select an EE if there are no compatible installed JRE matches. The update classpath action is invoked when you create a new project with the proper EE selection. What was going on is we were trying to update the classpath when there were no compatible installed JREs. 
Comment 2 Chris Aniszczyk CLA 2007-12-27 19:16:15 EST
Created attachment 85876 [details]
org.eclipse.pde.ui.patch

Adds more validation to the new plug-in project wizard. If a user selects an EE that doesn't have any compatible installed JRE matches, a proper error message will be displayed so people like Ed don't select bad EEs.
Comment 3 Chris Aniszczyk CLA 2007-12-27 19:16:19 EST
Created attachment 85877 [details]
mylyn/context/zip
Comment 4 Brian Bauman CLA 2008-01-03 16:49:06 EST
Looks good to me Chris.  Figured I would take a peak since the patch was not too long.
Comment 5 Chris Aniszczyk CLA 2008-01-04 12:58:48 EST
Fixed in Ed's honor.
Comment 6 Brian Bauman CLA 2008-02-05 16:29:15 EST
Verified on I20080204-0010