Bug 15945 - Creating new class causes most projects to be recompiled
Summary: Creating new class causes most projects to be recompiled
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-14 10:36 EDT by John Wiegand CLA
Modified: 2002-05-16 11:19 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 John Wiegand CLA 2002-05-14 10:36:31 EDT
50

I have a full source workspace.  I added a source folder to the xerces plugin, 
this caused the entire project to be rebuilt.

Then I added a new class into a new package (org.eclipse.apache.xerces.Helper)

Adding an additional class to the same package didn't cause any (visible) 
compilation

Adding another class (in another new package) 
(org.eclipse.apache.xerces2.Helper3) didn't cause any (visible) compilation.

Deleting all of these classes caused "everything" to be compiled.

Is the problem because I made up a package with a dangerous name 
(org.eclipse.apache.xerces)?  This is a totally new package that no one knows 
about.  Is the assumption about package name element uniqueness?
Comment 1 Kent Johnson CLA 2002-05-14 14:32:29 EDT
The problem is you've added the 
package 'org', 'org.eclipse', 'org.eclipse.apache', etc. to the xerces plugin & 
as a result every dependent project sees an 'added' delta for the package 'org'.

I need a known package list in each project's build state to know that I can 
ignore added/removed package deltas from a prereq project's binary delta.

Or we just scan the current project's qualified type table for all of the 
locally known packages.
Comment 2 Kent Johnson CLA 2002-05-14 16:33:50 EDT
Also the package name 'org.eclipse.apache' is also problematic because there is 
a package named 'org.apache'... so when 'apache' is added/removed 
from 'org.eclipse', we match it in 'org' if the project has a reference 
to 'org.apache'.

So now we only consider a package 'a', 'a.b' or 'a.b.c' added if no source 
types in the current project are from the same package (takes care of 'org' 
and 'org.eclipse')... when a remove delta for a package is found, we check to 
see if the package still exists on the classpath before considering removed.
Comment 3 Kent Johnson CLA 2002-05-15 19:19:56 EDT
released fix.