Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352160 - [content assist] Use index to find global functions
Summary: [content assist] Use index to find global functions
Status: RESOLVED WONTFIX
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-14 16:17 EDT by Ian Tewksbury CLA
Modified: 2011-08-30 14:48 EDT (History)
1 user (show)

See Also:
cmjaun: review-
thatnitind: review-


Attachments
Fix Patch (255.11 KB, patch)
2011-07-14 16:19 EDT, Ian Tewksbury CLA
no flags Details | Diff
Updated Testing Zip (4.30 KB, application/zip)
2011-07-14 16:20 EDT, Ian Tewksbury CLA
no flags Details
Fix Patch - Update 1 (257.43 KB, patch)
2011-07-14 16:58 EDT, Ian Tewksbury CLA
no flags Details | Diff
Fix Patch - Update 2 (280.10 KB, patch)
2011-07-15 17:12 EDT, Ian Tewksbury CLA
no flags Details | Diff
Fix Patch - Update 3 (280.03 KB, patch)
2011-07-18 16:18 EDT, Ian Tewksbury CLA
no flags Details | Diff
Fix Patch - Update 4 (281.52 KB, patch)
2011-07-19 15:48 EDT, Ian Tewksbury CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Tewksbury CLA 2011-07-14 16:17:58 EDT
Currently the index is only used to find the location of global functions but then those functions and the fiels they are in still have to be parsed, inferred, and bound.  All the information to create a content assist suggestion should be stored in the index so that these functions do not need to be parsed, inferred, and bound every time content assist is invoked.
Comment 1 Ian Tewksbury CLA 2011-07-14 16:19:49 EDT
Created attachment 199703 [details]
Fix Patch

This patch primarily updates the MethodPattern to store all the information about a function that is needed to create a content assist proposal.  The rest of the changes are to then either help get that information to the MehtodPattern, or leverage the new information now stored in the index.

Have also added a bunch of new JUnits to test all of this.
Comment 2 Ian Tewksbury CLA 2011-07-14 16:20:53 EDT
Created attachment 199704 [details]
Updated Testing Zip

This is an updated testing zip for org.eclipse.wst.jsdt.ui.tests/testresources for the updated JUnits.
Comment 3 Ian Tewksbury CLA 2011-07-14 16:58:05 EDT
Created attachment 199712 [details]
Fix Patch - Update 1

same as last patch except I have added more documentation.

I have a bit more documentation to do.
Comment 4 Ian Tewksbury CLA 2011-07-15 17:12:25 EDT
Created attachment 199775 [details]
Fix Patch - Update 2

Finished documenting.  Also had to add code to BasicSearchEngine#searchAllFunctions to deal with working copies.
Comment 5 Ian Tewksbury CLA 2011-07-18 16:18:10 EDT
Created attachment 199862 [details]
Fix Patch - Update 3

Same as last patch except I removed a piece of code I commented out.
Comment 6 Chris Jaun CLA 2011-07-19 09:30:25 EDT
I think we are good to go on this.
Comment 7 Ian Tewksbury CLA 2011-07-19 15:05:39 EDT
Created bug 352499 to put this in head as well. merged patch there.
Comment 8 Ian Tewksbury CLA 2011-07-19 15:48:12 EDT
Created attachment 199943 [details]
Fix Patch - Update 4

Same as last patch except small fix in Methodpattern#matchesDecodedKey.  One of the lines was comparing the return qualificaiton to the return simple name rather then to the return qualification of the pattern to try and match.
Comment 9 Chris Jaun CLA 2011-08-08 16:27:00 EDT
Backed out the patch that was checked in on 07/20 because it breaks search and the SelectionEngine for functions.
Comment 10 Nitin Dahyabhai CLA 2011-08-30 14:48:28 EDT
Needs a lot more study to avoid breaking other functions.