Bug 409428 - Consistently handle implicitly public members
Summary: Consistently handle implicitly public members
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.4 M2   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
: 409429 (view as bug list)
Depends on:
Blocks: 220905
  Show dependency tree
 
Reported: 2013-05-29 16:10 EDT by Curtis Windatt CLA
Modified: 2013-09-18 13:12 EDT (History)
2 users (show)

See Also:
curtis.windatt.public: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Windatt CLA 2013-05-29 16:10:52 EDT
We are currently inconsistent in what tags we support when a member is marked as package default but is implicitly public due to its parent type.

See Bug 409352 - interface methods
See Bug 402393 comment 14 - interface fields (implicitly static final)

We should go through all of the following cases and check that we treat them as public members.

interface I {
    int pub();
    int PUB = 1, PUB2 = 2;  // implicitly static and final
    class PUB {} // implicitly static
}
@interface Annot {
    int pub();
    int PUB = 1;
    class PUB {}
}
enum En {
    PUB;
    void packAccess() {}
}
Comment 1 Curtis Windatt CLA 2013-05-29 16:21:13 EDT
In 4.4 we'll work on Bug 220905 then we can decide which changes to put into 4.3.1
Comment 2 Curtis Windatt CLA 2013-07-30 11:41:48 EDT
No work has been done yet on Bug 220905 so there won't be anything to backport for SR1.
Comment 3 Michael Rennie CLA 2013-08-13 15:13:17 EDT
*** Bug 409429 has been marked as a duplicate of this bug. ***
Comment 4 Michael Rennie CLA 2013-08-19 15:06:49 EDT
Pushed the first part which adds a new util class / method for IJavaElements (in our completion proposal stuff). All tests pass, but I need to add a few more tests for a variety of inner interface / annotation members.

http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=ddbdc5aecddc3fbc2810a3e1dbd2d7506948ee16
Comment 5 Michael Rennie CLA 2013-08-21 10:43:03 EDT
Pushed the rest of the fix to: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=544164355471771a7310be8d28781203feb13fd1

Curtis please review. 

To consider what members are visible I used the JLS spec: http://docs.oracle.com/javase/specs/jls/se7/html/jls-6.html#jls-6.6

and 

http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.5

I also found that we do not provide any support for annotation fields / methods. I'll open a new bug for that.
Comment 6 Curtis Windatt CLA 2013-09-16 15:02:06 EDT
Reviewed the fix in I20130910-2000.  No issues.