Bug 79334 - [classpath] Build path info not updated properly
Summary: [classpath] Build path info not updated properly
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-23 14:53 EST by d CLA
Modified: 2005-02-15 07:10 EST (History)
1 user (show)

See Also:


Attachments
prjset and prefs (14.80 KB, application/octet-stream)
2004-12-10 15:00 EST, d CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description d CLA 2004-11-23 14:53:49 EST
( 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.
Comment 1 Jerome Lanneluc CLA 2004-12-10 12:56:15 EST
Would you have steps to reproduce this problem ?
Comment 2 d CLA 2004-12-10 15:00:40 EST
Created attachment 16526 [details]
prjset and prefs

prjset and prefs that show pbm
Comment 3 d CLA 2004-12-10 15:09:15 EST
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 :) )

 
Comment 4 Jerome Lanneluc CLA 2004-12-13 05:56:37 EST
Thanks for the test case. I will have a look at it.
Comment 5 Jerome Lanneluc CLA 2005-01-06 09:36:28 EST
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()
Comment 6 David Audel CLA 2005-02-15 07:10:55 EST
Verified in I20050214-0927