Bug 214977 - Ensure the BREE needed for compliation is listed first
Summary: Ensure the BREE needed for compliation is listed first
Status: RESOLVED INVALID
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: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks:
 
Reported: 2008-01-10 19:19 EST by Chris Aniszczyk CLA
Modified: 2008-12-16 09:38 EST (History)
2 users (show)

See Also:


Attachments
mylyn/context/zip (829 bytes, application/octet-stream)
2008-01-25 12:20 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 Chris Aniszczyk CLA 2008-01-10 19:19:41 EST
see bug 212228 and http://wiki.eclipse.org/index.php/Execution_Environments#Compiling_against_more_than_is_required why this is an awesome idea

I'd envision a warning and quickfix here to help people as this problem is annoying to debug.
Comment 1 Chris Aniszczyk CLA 2008-01-25 12:20:19 EST
adding context to help people
Comment 2 Chris Aniszczyk CLA 2008-01-25 12:20:23 EST
Created attachment 87883 [details]
mylyn/context/zip
Comment 3 Chris Aniszczyk CLA 2008-01-30 14:31:21 EST
Here's the bug Tom.
Comment 4 Thomas Watson CLA 2008-01-30 17:04:26 EST
Chris, can you give more details on the warning and quickfix you are proposing?

- When would you flag a warning?  anytime the highest EE is not listed first?
- What problem is hard (annoying) to debug?
- What about EEs that are not true subsets with one another?  Say Foundation is listed before J2SE-1.3 because the bundle really does need to compile against javax.microedition.io package but can run on J2SE-1.3.

Comment 5 Brian Bauman CLA 2008-01-30 18:01:04 EST
(In reply to comment #4)
> Chris, can you give more details on the warning and quickfix you are proposing?

We need a quick fix that would change the order of the EEs to place the lowest EE at the beginning of the list.

> - When would you flag a warning?  anytime the highest EE is not listed first?

Correct

> - What problem is hard (annoying) to debug?

Figuring out why your plug-in is failing to export (bug 212228) when you incorrectly set your EEs, which is the motivation behind this bug.

> - What about EEs that are not true subsets with one another?  Say Foundation is
> listed before J2SE-1.3 because the bundle really does need to compile against
> javax.microedition.io package but can run on J2SE-1.3.

For this, I think it is easiest to use ExecutionEnviornmentAnalyzer. In that class there is a map that represents EEs and the ones that are supersets.  We would need to create a new function that queries that map some how (that's where the fun comes in :) ).
Comment 6 Thomas Watson CLA 2008-01-31 12:40:17 EST
(In reply to comment #5)
> We need a quick fix that would change the order of the EEs to place the lowest
> EE at the beginning of the list.

I sure you mean to say highest EE at the beginning of the list.

> For this, I think it is easiest to use ExecutionEnviornmentAnalyzer. In that
> class there is a map that represents EEs and the ones that are supersets.  We
> would need to create a new function that queries that map some how (that's
> where the fun comes in :) ).
> 

But in the case of EEs which are not subsets then I think you have to give up.  How could you know which EE is the one you must use in that case?  It seems like the developer is the only one that could know this.

Isn't this really an error in the workspace configuration?  Seems like the check you really want is to make sure that there is a VM installed which provides a perfect match to the first EE specified in the BREE or the build.properties setting "jre.compilation.profile" which should override any setting in the BREE at PDE-Build time.

PDE team is flag happy this milestone :)
Comment 7 Brian Bauman CLA 2008-01-31 14:52:15 EST
> I sure you mean to say highest EE at the beginning of the list.

Yep, I got confused :)

> But in the case of EEs which are not subsets then I think you have to give up. 
> How could you know which EE is the one you must use in that case?  It seems
> like the developer is the only one that could know this.

With this enhancement we are trying to prevent the user from errors which lead to problems which are extremely difficult to debug.  Now you are right that their are cases where two profiles may not be subsets and in this case we can exit.  But there are many of cases were profiles are subsets and where we can save users from getting into bad situations.  

If we have knowledgeable eclipse users like Pascal running into the problem, we can try to save the rest of the community some time and offer help where we can.
Comment 8 Chris Aniszczyk CLA 2008-12-16 09:38:56 EST
I don't think we can really fix this issue as we can't read people's mind. In some cases, it doesn't matter.