Bug 164121 - [search] Misses declarations of method parameters
Summary: [search] Misses declarations of method parameters
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.3 M4   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-10 09:55 EST by Raffi Khatchadourian CLA
Modified: 2007-07-29 09:21 EDT (History)
0 users

See Also:


Attachments
Proposed patch (16.52 KB, patch)
2006-11-10 16:34 EST, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Raffi Khatchadourian CLA 2006-11-10 09:55:20 EST
The search engine does not find the declaration of a method parameter. An example below.

int x(a)
{
     a = 2 + 2;
     //searching for the declaration of 'a' returns nothing.
}

All local variables (in this case 'a') should have declarations but the search engine returns none.
Comment 1 Olivier Thomann CLA 2006-11-10 10:27:48 EST
should not 'a' have a type?
This declaration looks invalid. Therefore I doubt that this is stored in the search engine.
Frederic, any comment?
Comment 2 Raffi Khatchadourian CLA 2006-11-10 10:44:03 EST
(In reply to comment #1)
> should not 'a' have a type?
> This declaration looks invalid. Therefore I doubt that this is stored in the
> search engine.
> Frederic, any comment?
> 

Sorry, yes, it should read void x(int a)
Comment 3 Raffi Khatchadourian CLA 2006-11-10 11:00:39 EST
Example revised:
class A
{
    void x(a)
    {
        a = 2 + 2;
        //searching for the declaration of 'a' returns nothing.
    }
}
Comment 4 Raffi Khatchadourian CLA 2006-11-10 11:04:17 EST
Example revised (again, sorry!):
class A
{
    void x(int a)
    {
        a = 2 + 2;
        //searching for the declaration of 'a' returns nothing.
    }
}
Comment 5 Frederic Fusier CLA 2006-11-10 11:11:24 EST
Search Engine should be able to find local variable declarations.
I'll investigate...
Comment 6 Frederic Fusier CLA 2006-11-10 16:34:14 EST
Created attachment 53655 [details]
Proposed patch
Comment 7 Frederic Fusier CLA 2006-11-10 16:39:33 EST
Released for 3.3 M4 in HEAD.
Comment 8 David Audel CLA 2006-12-12 05:41:52 EST
Verified for 3.3M4 with I20061212-0010.
Comment 9 Eclipse Webmaster CLA 2007-07-29 09:21:07 EDT
Changing OS from Mac OS to Mac OS X as per bug 185991