Community
Participate
Working Groups
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
*** This bug has been marked as a duplicate of 42381 ***