This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Allow to determine origin of a symbol | ||
---|---|---|---|
Product: | java | Reporter: | Svata Dedic <sdedic> |
Component: | Source | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dbalek, tzezula |
Priority: | P3 | Keywords: | API, API_REVIEW_FAST |
Version: | 8.2 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 256404 | ||
Attachments: |
Proposed changes
Changes (with issue# in apichanges) |
Created attachment 159927 [details]
Changes (with issue# in apichanges)
Fixed in jet-main#a494d90e587c |
Created attachment 159926 [details] Proposed changes I need to find out what Element/Tree in the source introduces a symbol in order to report possible conflicts etc when the code is about to introduce a new method or a field. The task is pretty tricky because of inheritance/hiding rules so I thought the code could be useful in general. The added method works similar to getLocalMembersAndVars, but instead of just Elements, it returns a Map or Elements to the Scope that introduced them into the source. It is then possible to find if e.g. a TypeElement corresponding to unqalified "Foo" is made available by import, or by inheriting Foo from some superclass. Please review the attached diff.