Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334055 - Search for references in workspace/project for Javascript identifier returns 0 results
Summary: Search for references in workspace/project for Javascript identifier returns ...
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.4   Edit
Assignee: Chris Jaun CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-11 23:59 EST by Missing name CLA
Modified: 2011-03-23 13:44 EDT (History)
1 user (show)

See Also:
thatnitind: review+


Attachments
patch (1.54 KB, patch)
2011-02-07 14:30 EST, Chris Jaun CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2011-01-11 23:59:08 EST
Build Identifier: 20101216-1529

When I try to search for references of an identifierin workspace or project (using either Ctrl-Shift-G, context menu, or main program menu), I always get 0 refences.
Although Search -> "JavaScript Search" returns correct results. But it requires that I manually enter identifier name, which is not very handy.

Reproducible: Always

Steps to Reproduce:
1. Open JS file with some cross-calling functions, simpliest example:

function test1() {
}

function test2() {
    test1();
}

function test3() {
    test1();
}

2. Place cursor on 'test1' identifier.
3. Press Ctrl-Shift-G
4. Expected result: 2 or 3 references displayed
   Actual result: "0 references in workspace"
Comment 1 Missing name CLA 2011-01-12 00:06:08 EST
Sorry, I was wrong, the specified scenario references search works fine.
But for larger projects that I have the bug is actual. I'll try to find minimal reproduction scenario.
Comment 2 Missing name CLA 2011-01-12 00:11:08 EST
Here goes the correct step 1:

Create the JavaScript project, which consists of two files:

test1.js:

function test1() {
}

test2.js:

function test2() {
	test1();
}

function test3() {
	test1();
}

Searching for test1 does not work.
Comment 3 Chris Jaun CLA 2011-02-07 14:30:54 EST
Created attachment 188467 [details]
patch
Comment 4 Chris Jaun CLA 2011-03-23 13:44:03 EDT
Checked into 3.2.4 and HEAD.