Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 212763

Summary: Detection of running plug-ins not accurate
Product: [Eclipse Project] PDE Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: bartosz michalik <bartosz.michalik>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: baumanbr, darin.eclipse
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
partial solution + code refactoring none

Description Dani Megert CLA 2007-12-12 10:07:27 EST
I20071212-0010.

See bug 185502 for details.

The code which computes whether the imported plug-ins are used is not accurate. It also shows the dialog in cases where it's not needed.

1. import all *jdt* projects (without required ones)
2. import the *swt* projects
3. create a Java project
4. make the project depend on those SWT projects
5. paste an SWT snippet
6. run it as Java app
7. import all *jdt* projects (without required ones)
==> dialog warns

This is not needed as SWT itself isn't imported.
Comment 1 Brian Bauman CLA 2007-12-12 15:48:41 EST
Dani, is there a good way to find out what project's are referenced in a launch configuration for a Java Application?  To be more accurate we should see if we can figure out what plug-ins are running in a Java App and use that list.
Comment 2 Dani Megert CLA 2007-12-12 15:58:09 EST
I'm adding Darin - he's the master for launch configs.
Comment 3 Darin Wright CLA 2008-01-07 12:24:17 EST
By default, a Java Application's runtime classpath is derived from the project's buildpath (so classpath == buildpath). A user can modify the classpath manually though.

There is a utility method in JavaRuntime to retrieve a config's runtime classpath. To determine what projects are on a config's classpath, you have to look at the 'unresolved' runtime classpath (which refers to projects, rather than output locations). 

@see JavaRuntime.computeUnresolvedRuntimeClasspath(ILaunchConfiguration)

Next, you need to analyze the IRuntimeClasspathEntry's to collect those of type PROJECT. Note, you need to recursively consider IRuntimeClasspathEntry2's which can contain other IRuntimeClasspathEntry's.

Let me know if you need more :-)
Comment 4 bartosz michalik CLA 2008-01-29 21:52:56 EST
Created attachment 88234 [details]
partial solution + code refactoring

in this proposal safety check is done only for configurations provided by pde.ui plugin. I've left problem of java application launch for further invastigations. as there can by many configuration provided by various plugins (via extension point) which can lock some imported plugins there is the question how (and if) to implement check for these configurations.
Comment 5 Eclipse Webmaster CLA 2019-09-06 16:12:20 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.
Comment 6 Julian Honnen CLA 2019-09-09 02:20:11 EDT
Please remove the stalebug flag, if this issue is still relevant and can be reproduced on the latest release.