Bug 93891 - Restricted UIPlugin is in my code assist
Summary: Restricted UIPlugin is in my code assist
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 RC1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-06 07:02 EDT by Wassim Melhem CLA
Modified: 2005-05-27 09:07 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wassim Melhem CLA 2005-05-06 07:02:38 EDT
Build: N-20050506

1. Fresh workspace
2. File > New > Project...>Plug-in Project>Next
3. Enter 'com.example.xyz' as the project name.  Next.
4. Press Finish.
5. Using the plugin import wizard, import org.eclipse.ui AS SOURCE
6. Open the manifest.mf of org.eclipse.ui an delete the Export-Package header.
This in effect should make the two types in org.eclipse.ui inaccessible to all 
other plugins.

7. In the constructor of XyzPlugin, type UI and then ctrl-space.
You will see that UIPlugin is the first proposal, even though it is coming 
from org.eclipse.ui and is forbidden.  That's the bug.

8. Select the forbidden proposal and complete the statement as:
UIPlugin bla = null;

9. Save.  You will see that UIPlugin is now flagged as an error because it is 
forbidden.  This is correct.  So the classpath is correct.
Comment 1 David Audel CLA 2005-05-17 06:01:18 EDT
Fixed and test added
  CompletionTests2#testBug93891()

The problem was inside JavaSearchScope.
Now, add(JavaProject, IPath, int, HashSet, IClasspathEntry) use 'entry' instead
of 'rawEntry' to compute access restriction.
Comment 2 Maxime Daniel CLA 2005-05-27 04:40:45 EDT
Verified on build I20050526-2000-win32.