Bug 230830 - [select] Search doesn't find annotated local variable declaration with error
Summary: [select] Search doesn't find annotated local variable declaration with error
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-07 03:51 EDT by David Audel CLA
Modified: 2008-08-06 13:39 EDT (History)
2 users (show)

See Also:


Attachments
Proposed fix (4.30 KB, patch)
2008-07-23 03:22 EDT, David Audel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2008-05-07 03:51:58 EDT
build I20080502-0100
1) create X.java
public class X {
  void foo() {
    @A(n=) String s;
  }
}

2) select 's'
3) search declaration of s (right click>Declarations>Project)
There is no search result.
Comment 1 David Audel CLA 2008-05-07 03:52:55 EDT
This problem is caused be the fact that code select doesn't do annotations recovery or statements recovery in the SelectionParser and search do annotations recovery and statements recovery in MatchLocatorParser.
For select the variable doesn't contain the annotation unlike search.

SelectionParser should support annotations recovery.
Comment 2 David Audel CLA 2008-05-07 03:56:43 EDT
It is too risky to modify code select recovery for 3.4. Deferring to 3.5.
Comment 3 David Audel CLA 2008-07-23 03:22:27 EDT
Created attachment 108164 [details]
Proposed fix
Comment 4 David Audel CLA 2008-07-23 03:25:30 EDT
Released fro 3.5M1.

Tests added
  ResolveTests_1_5#test0117() -> test0118()

Annotation recovery is enabled in SelectionParser
Comment 5 Olivier Thomann CLA 2008-08-06 13:39:12 EDT
Verified for 3.5M1 using I20080805-1307