Bug 88174 - [1.5][search][enum] method declarations not found in anonymous enum
Summary: [1.5][search][enum] method declarations not found in anonymous enum
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 88167
  Show dependency tree
 
Reported: 2005-03-16 09:32 EST by Markus Keller CLA
Modified: 2005-05-12 04:26 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2005-03-16 09:32:31 EST
v_541

Adapted from bug 88167: Search for declarations of method getTheValue() does not
find the method in the anonymous enum. Neither works with string pattern nor
with java element search.

public enum Test{
  a {
    @Override
    int getTheValue() { // not found
      return 0;
    }
  };
  abstract int getTheValue();
}
Comment 1 Frederic Fusier CLA 2005-04-26 08:06:11 EDT
Fixed and released in HEAD.

[jdt-core-internal]
Changes done in MatchLocator:
  - LocalDeclarationVisitor.visit(TypeDeclaration): back to initial implementation
    (ie. before enum search implementation)
  - reportMatching(FieldDeclaration,...): in type hierarchy, report on field 
    declaration when node is anonymous type declaration of an enum field

Test case added in JavaSearchBugsTests + modify existing JavaSearch.testEnum05()
Comment 2 Maxime Daniel CLA 2005-05-12 04:03:59 EDT
Verified for 3.1 M7 using build I20050509-2010 + jdt.core HEAD.