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

Bug 329397

Summary: [index] Need way to wait for JSP index to be consistent
Product: [WebTools] WTP Source Editing Reporter: Ian Tewksbury <itewksbu>
Component: wst.sseAssignee: Ian Tewksbury <itewksbu>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: alecross, melickm, mmartire, nsand.dev
Version: 3.3Flags: thatnitind: review+
nsand.dev: review+
Target Milestone: 3.3 M5   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 333903    
Attachments:
Description Flags
New Indexer Patch
thatnitind: iplog+
Fix Patch - Update 1
none
Fix Patch - Update 3 nsand.dev: iplog+

Description Ian Tewksbury CLA 2010-11-03 16:47:36 EDT
The patch for this is slightly different then in 3.2.3.  This one includes new strings for more verbose progress reporting.

+++ This bug was initially created as a clone of Bug #323079 +++
We need a way to wait for the JSP index to be consistent before performing operations like searches.

Long story short, the best way to go about doing this was to re-in-vision the JSP indexer.  I took it a step further and wrote a generic Index manager that could manage tracking any type of file in the workspace and then wrote an implementation of it designed to track JSP pages.  This JSP tracker takes care of injecting JSPs into the JDT index and also calling the API to persist the translations.

The framework for this generic index manager was very much based of how the JSPTranslatorPersister worked.  Part of my changes were to rip out all the code the JSPTranslatorPersister used to track JSP changes and to just have the new JSPIndexManager use the JSPTranslatorPersister to persist the translations for the JSP files it finds.

I have only done some basic testing on this new indexer including running all the Junits.  Still needs much testing but its about time someone else take a gander at the code.
Comment 1 Ian Tewksbury CLA 2010-11-03 16:48:42 EDT
Created attachment 182329 [details]
New Indexer Patch

Patch.  Essentially the same patch that is attached to Bug 323079 except it includes new strings for more verbose progress reporting.
Comment 2 Ian Tewksbury CLA 2011-01-10 16:07:16 EST
Created attachment 186429 [details]
Fix Patch - Update 1

Updated the patch to apply cleaning to current HEAD as well as updated with the final changes that went into the 3.2.3 patch before it was omitted.
Comment 3 Ian Tewksbury CLA 2011-01-10 16:11:56 EST
Created attachment 186430 [details]
Fix Patch - Update 3

There was an issue with my last merge in that I lost some of the new strings from 3.3.  This one is good to go, I swear.
Comment 4 Nick Sandonato CLA 2011-01-10 17:49:34 EST
Thanks for your patch, Ian. Code has been released.