Bug 20059

Summary: project.isOnClassPath(project) result random
Product: [Eclipse Project] JDT Reporter: Dirk Baeumer <dirk_baeumer>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 F4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Dirk Baeumer CLA 2002-06-12 14:47:01 EDT
Build F3

We have code to test if a java element is on the class path of a project. If 
the java element is a project itself (we ask project.isOnClassPath(project)) 
the answer is somehow random (see bug 20051). Is this a deeper problem ?
Comment 1 Philipe Mulet CLA 2002-06-13 05:59:46 EDT
Indeed the implementation of this API is weak when dealing with project 
references. 

It is iterating the pkg fragment roots, instead of the classpath entries.

It only makes a difference for elements which are not directly part of the 
project elements (amongst its children).

How critical is this for you ?
Comment 2 Dirk Baeumer CLA 2002-06-13 06:18:48 EDT
We released a work around for F3. In the case of project.isOnClassPath(project) 
we assume true which works in the special case of the ActionUtil.isProcessable 
method.
Comment 3 Jerome Lanneluc CLA 2002-06-17 05:30:58 EDT
I'm not sure I understand where the problem is.
When proj!=src, the project is NOT on its classpath.
When proj==src, the project IS on its classpath.
Comment 4 Jerome Lanneluc CLA 2002-06-18 09:29:45 EDT
Since there is a workaround, will try to understand Dirk's problem post 2.0.
Comment 5 Dirk Baeumer CLA 2002-07-03 06:02:45 EDT
Jerome's explanations make the PR obsolete.

Closing
Comment 6 Jerome Lanneluc CLA 2002-07-03 06:19:30 EDT
Reopening to mark bug as WORKSFORME.
Comment 7 Jerome Lanneluc CLA 2002-07-03 06:20:14 EDT
Works for me.