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

Bug 334055

Summary: Search for references in workspace/project for Javascript identifier returns 0 results
Product: [WebTools] JSDT Reporter: Missing name <st.kupr>
Component: GeneralAssignee: Chris Jaun <cmjaun>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: cmjaun
Version: unspecifiedFlags: thatnitind: review+
Target Milestone: 3.2.4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

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.