Community
Participate
Working Groups
( This may be JDT bug ) Have a fragment that contains code that refs classes declared in associated plugin. In Java editor when I edit some of this fragment code I have warning markers of the form 'Access restriction: The type X is not imported from required project Y' . Where Y is the plugin project and X is a clas defined Y. Note there are no build errors and at runtime everything works fine. This warning only exists in the editor. This occurs 3.1m3 and not in 3.0. Not sure about any other Eclipse builds. Also, fwiw, I tried setting the plugin for the fragment to some other, random, plugin and then back. ( Was hoping that Eclipse just needed to re-generate something. ) This didn't change anything.
Would you have steps to reproduce this problem ?
Created attachment 16526 [details] prjset and prefs prjset and prefs that show pbm
Steps 1. Get and unzip prjset_and_prefs.zip ( attached ) 2. Import preferences in preferences-3.1m3.epf 3. Import project set in prjs.psf 4. Open /orbeon.oxfstudio.eclipse.container. default/src/orbeon/oxfstudio/eclipse/server/EclipseTomcatAdapter.java 5. Note that in above file there isn't a problem with the import import orbeon.oxfstudio.eclipse.server.AbstractTomcatAdapter; By 'no problem' I mean that there neither an error in Problems view nor an annotation in the editor that indicates this import is problematic. 6. Change setting Window | Preferences | Java | Compiler | Build Path | Access restriction violation from 'ignore' to either 'error' or 'warning' and click 'yes' to the rebuild prompt. Now you should see that annotation has been added to indcate a pbm with the line mentioned in step #5. However there is no corresponding problem listed in the problems view. ( So one of these must wrong and hence this bug :) )
Thanks for the test case. I will have a look at it.
Changed SearchableEnvironment#find(String,String) to pass in a path to getViolatedRestriction(...) instead of the fully qualified name. Did the same change to SearchableEnvironmentRequestor#acceptType(IType). Added regression test ReconcilerTests#testAccessRestriction()
Verified in I20050214-0927