Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 213027 - [api tooling] validate system library usage based on EE level
Summary: [api tooling] validate system library usage based on EE level
Status: RESOLVED DUPLICATE of bug 253693
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: PDE API Tools Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-14 10:08 EST by Darin Wright CLA
Modified: 2008-11-24 10:06 EST (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 Darin Wright CLA 2007-12-14 10:08:53 EST
When a bundle specifies that it requires a specific execution environment (for example, J2SE-1.4), we should be able to verify that it only uses methods/types from that environment. In the IDE, a bundle might be compiled against a higher level EE and usage of a 1.5 JRE method would compile without errors, but cause a runtime problem.
Comment 1 Darin Wright CLA 2008-04-21 11:14:02 EDT
Marking assigned for future consideration.
Comment 2 Dani Megert CLA 2008-08-27 05:03:15 EDT
>we should be able to verify that it only uses methods/types from that 
>environment.
...and fields.
Now, is there an official list of such elements? If not, how would this reliably be defined?
Comment 3 Darin Wright CLA 2008-08-27 08:41:28 EDT
(In reply to comment #2)

> Now, is there an official list of such elements? If not, how would this
> reliably be defined?

We would generate the list by comparing JDKs. We could do a binary compare, or use source code looking at @since tags.

Comment 4 Markus Keller CLA 2008-08-27 09:30:38 EDT
Note that @since tags don't necessarily catch all visible changes, see e.g. last paragraph of http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@since

> should be able to verify that it only uses methods/types/fields

The unavailable members should no only not compile but already be filtered from content assist, organize imports, etc.

Another caveat: If the bundle specifies multiple execution environments, we should only allow members that are available in all the EEs.
Comment 5 Darin Wright CLA 2008-11-24 10:03:16 EST
This has been addresssed, marking as dup of newer bug. We still have not addressed the code assist issue - I will open a new bug for that.

*** This bug has been marked as a duplicate of bug 253693 ***
Comment 6 Darin Wright CLA 2008-11-24 10:06:03 EST
Opened new bug 256287 for code assist issue.