Bug 43919 - protected/public keywords have incorrect meanings to code completion
Summary: protected/public keywords have incorrect meanings to code completion
Status: RESOLVED DUPLICATE of bug 42381
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-30 11:43 EDT by Douglas Pollock CLA
Modified: 2003-12-09 08:03 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Pollock CLA 2003-09-30 11:43:09 EDT
Classes marked as protected can be used for completion by non-descendent classes
outside of the project in which they are defined.  Classes marked as public
cannot be used for completion outside the project.

STEPS TO REPRODUCE:
1.) Set up a self-hosted environment, as follows:
        (a) Check out platform-ui and org.eclipse.ui.tests
        (b) Import all remaining pieces as binary projects
2.) Right-click on org.eclipse.ui.tests and add "org.eclipse.ui.workbench" to 
    the build path (under "Java Build Path > Projects").
3.) Add a new TestCase (subclass of UITestCase) to a new package.  In this 
    particular case, the test case was called "Bug43800Test", and the package 
    was called "org.eclipse.ui.tests.keys".  Remeber to have the constructor 
    added automatically.
4.) Add a new method, "testTruncatingCast()".
5.) Type "KeySuppor" and press "Ctrl+Space" to perform code completion.
6.) Open "KeySupport" (located in "org.eclipse.ui.workbench").
7.) Change the class from "public" to "protected".
8.) Go back to the test case, and press "Ctrl+Space" again.
9.) Go back to KeySupport, and change from "protected" to "public".


OBSERVED RESULTS:
At step #5, code completion fails.  At step #8, code completion succeeds, but
compilation errors appear.  At step #9, code completion succeeds, and
compilation errors are gone.


DESIRED RESULTS:
The results from step #9 should occur at step #5.


ENVIRONMENT:
Eclipse-GTK-I20030930, GNOME/Metacity, RedHat9
Comment 1 Philipe Mulet CLA 2003-12-09 08:03:14 EST

*** This bug has been marked as a duplicate of 42381 ***