| Summary: | Associate access restrictions with execution environments | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Gunnar Wagenknecht <gunnar> | ||||||
| Component: | Debug | Assignee: | Michael Rennie <Michael_Rennie> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | frederic_fusier, gorkem.ercan, jeffmcaffer, philippe_mulet, t.p.ellison, tjwatson, wassim.melhem | ||||||
| Version: | 3.3 | ||||||||
| Target Milestone: | 3.3 M4 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Gunnar Wagenknecht
Similar to bug 116656 We are investigating this for M4. The high level plan is to allow an execution environment to specify a default set of access rules (via runtime code/delegate). We would also need to support access rule "participants" for execution environments (for example, PDE may need to enhance the set of default access rules for an environment, based on plug-in project settings). *** Bug 116656 has been marked as a duplicate of this bug. *** Darin, the EE extensions and analyzer that currently reside in PDE could, as we discussed earlier, be pushed down to JDT to enable people to use an EE-based JRE with the dependency on PDE. Let me know when you want to proceed with that. It should be a trivial exercise. Wassim, we should push down the EE definitions to JDT launching in the next I-build. Could you point me to the appropriate plug-in to "move" the code from. We'll just have to co-ordinate the release, so we don't get duplicates. sounds good. I will give you a patch to jdt.launching later on today and will remove the pde counterpart as soon as you release. Created attachment 54044 [details]
patch
Here is the patch for execution environments for jdt.launching.
Thanks Wassim, I have released the patch. We want to associate access rules with execution environments. At the implementation level, this means creating a classpath container for an EE with access rules. However, there seems to be a limitation in JCore: When the classpath container initializer is called to initialize a container, the initializer is to call back to JavaCore.setClasspathContainer(IPath containerPath, IJavaProject[] affectedProjects, IClasspathContainer[] respectiveContainers, IProgressMonitor monitor). This does not allow access rules to be created when a container is initialized. It is possible to create rules on the entries in side the container, but for the case of the EE, this is not what we want - the rules are associated with the EE, not its libraries. Created attachment 54683 [details]
patch
initial API - work in progress
Released new API to head. Wassim/Tom, I'll need a description of the access rules, or a patch that adds them to JDT launching support (I assume the base rules should be defined with the execution environments in JDT lanuching). The API allows for multiple access rule participants. An EE can contribute a participant specific to the EE, which is considered first. After than any participant can add rules to an EE (based on project, VM, & libraries). I've re-ordered the 'access rule participant' order. The default participant is now considered last such that other participants can override the default rules. Updated execution environments with default access rules based on OSGi profiles. Filed bug 166519 so the build path page will display the rules for JRE containers. Fixed. Please verify, Mike. Darin, the code seems to generate new access rules all the time. Philippe would be much happier if you had an 'access rule recycling program' like PDE. I added a cache of access rules per execution environment, such that the rules can be re-used across projects. verified, I did notice though that there is no way remove access rules defined for the container itself (the user addable ones) filed bug 167241 with JDT UI about not being able to remove custom access rules on the container *** Bug 137393 has been marked as a duplicate of this bug. *** |