Bug 7616

Summary: Unnecessary indexing when project is opened
Product: [Eclipse Project] JDT Reporter: Jerome Lanneluc <jerome_lanneluc>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: jared_burns
Version: 2.0   
Target Milestone: 2.0 M3   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Jerome Lanneluc CLA 2002-01-15 11:30:29 EST
Build 20020109

When a project is opened, all its libraries are requested to be indexed.
This is unnecessary and should be done only when the library is added.
Comment 1 Philipe Mulet CLA 2002-01-16 09:02:33 EST
Also look at 7441 which is a related issue. When switching JREs, all projects 
might references to rt.jar will be reindexed... we should also optimize this 
scenario (if taking out the library indexing from project opening). But then 
how do we deal with case where a non empty project is added from CVS at once. 
Its libraries must be detected as well for triggering indexing
Comment 2 Philipe Mulet CLA 2002-01-16 09:04:56 EST
*** Bug 7441 has been marked as a duplicate of this bug. ***
Comment 3 Jerome Lanneluc CLA 2002-01-17 06:52:09 EST
Removed indexing during JavaProject.openWhenClosed(...) and added it in the 
SetClasspathOperation.

Also added mechanism to queue the index request on startup (during the check 
index constency) and when a variable is updated (when switching JRE). The queue 
is a HashSet, thus if a request is added twice, it will be run only once.
Comment 4 Jerome Lanneluc CLA 2002-01-18 07:58:04 EST
Improved the mechanism to eliminate duplicates: when an index request is added 
to the job manager's queue, check if it is already there (with the same 
modification timestamp for the underlying resource). Thus the extra queue (i.e. 
the HasSet) is not needed any longer. Removed it.