Bug 20059 - project.isOnClassPath(project) result random
Summary: project.isOnClassPath(project) result random
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 F4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-12 14:47 EDT by Dirk Baeumer CLA
Modified: 2002-07-25 07:43 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.