Bug 479807 - More extension for Find References (Ctrl+Shift+G)
Summary: More extension for Find References (Ctrl+Shift+G)
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Victor Rubezhny CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-14 20:08 EDT by Angelo ZERR CLA
Modified: 2018-11-22 17:32 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Angelo ZERR CLA 2015-10-14 20:08:34 EDT
I have started to implement Ctrl+Shift+G inside tern.java by implementing org.eclipse.wst.jsdt.ui.search.IQueryParticipant. See issue https://github.com/angelozerr/tern.java/issues/339

It works great for simple case like variable declaration:

---------------
var a a // here Ctrl+Shift+G shows references)
console.log(a);
---------------

But there are a lot of limitations with that, because JSDT doesn't support ES6 (you cannot do the same thing with let variable, JSDT doesn't care of the scope like node.js where file has her own scope).

In tern.java case I need:

 * file name
 * start offset of selection where Ctrl+Shift+G is lanched (not required)
 * end offset of selection where Ctrl+Shift+G is lanched

So it should be cool if we could have a IQueryParticipant2 which works not with JST AST but just with file name, end offset.

Do you think it's possible? Otherwise I will implement my own JavaSearchQuery (it will be very shame).