Community
Participate
Working Groups
I20070806-0010 I only selected to search in 'JRE libraries' but Java search reports matches in application JARs too. Marking as 'major' because the feature is broken.
Here's a little test case: 1. start fresh workspace 2. checkout 'org.eclipse.ui.ide' from CVS 3. search for "openeditor" method declarations but only in JRE libraries ==> finds matches in application JARs.
It's also in 3.3. Too many matches are found. I checked, that matches in JRE are also found. I have no idea how to fix this.
Let me investigate whether this is UI or Core.
It's a bug with the scope. I verified that only IJavaSearchScope.SYSTEM_LIBRARIES (4) is passed in. The resulting scope is: JavaSearchScope on [ C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.jface.text_3.4.0.v20070806-1800.jar C:\JavaSDKs\jdk1.5.0_10\jre\lib\ext\sunpkcs11.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.osgi_3.4.0.v20070803.jar C:\JavaSDKs\jdk1.5.0_10\jre\lib\rt.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.equinox.registry_3.4.0.v20070803.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.ui_3.3.0.I20070802-0800.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.update.ui_3.2.100.v20070615.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.ui.workbench_3.3.0.I20070802-0800.jar C:\JavaSDKs\jdk1.5.0_10\jre\lib\jsse.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.update.configurator_3.2.100.v20070615.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.equinox.common_3.3.0.v20070426.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.text_3.4.0.v20070806-1800.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.jface_3.3.0.I20070802-0800.jar C:\JavaSDKs\jdk1.5.0_10\jre\lib\charsets.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.200.v20070717\runtime_registry_compatibility.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.core.resources_3.3.100.v20070806.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.swt.win32.win32.x86_3.3.0.v3406.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.core.filesystem_1.1.100.v20070723.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.update.core_3.2.100.v20070615.jar C:\JavaSDKs\jdk1.5.0_10\jre\lib\ext\dnsns.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.ui.views_3.2.100.I20070319-0010.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.equinox.preferences_3.2.200.v20070723.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.core.jobs_3.3.100.v20070709.jar C:\JavaSDKs\jdk1.5.0_10\jre\lib\ext\sunjce_provider.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.equinox.app_1.0.100.v20070730.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.core.expressions_3.3.100.v20070806-1800.jar C:\JavaSDKs\jdk1.5.0_10\jre\lib\ext\localedata.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.core.runtime_3.3.100.v20070530.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.help_3.3.100.v20070726.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.core.commands_3.3.0.I20070605-0010.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.swt_3.3.0.v3406.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.core.contenttype_3.2.100.v20070319.jar C:\eclipse\drops\I20070807-0010\plugins\com.ibm.icu_3.6.1.v20070417.jar C:\JavaSDKs\jdk1.5.0_10\jre\lib\jce.jar C:\eclipse\drops\I20070807-0010\plugins\org.eclipse.ui.forms_3.3.100.v20070716.jar ]
JavaSearchScope needs to verify that container kind is SYSTEM while filtering on SYSTEM_LIBRARIES mask (JavaSearchScope.add(...) line 154)
Created attachment 75670 [details] Proposed patch
Created attachment 75671 [details] Additional jar file for test To pass additional tests, this jar needs to be put in workspace/JavaSearchBugs/lib folder of org.eclipse.jdt.core.tests.model project.
Released for 3.4M2 in HEAD stream.
I suggest to also fix this in 3.3.1.
The fix breaks Open Type which uses a JavaWorkspaceScope (SearchEngine.createWorkspaceScope()): types in system libraries are no longer found and also Java search no longer works.
Content Assist is also affected: No more proposals for types in jre
Damned! And all JDT/Core + JDT/UI passed with the patch I released... So, we definitely lack some tests in our suites...
Created attachment 75734 [details] Additional patch I *simply* forgot to include K_DEFAULT_SYSTEM container when SYSTEM_LIBRARIES is specified!
New patch released in HEAD
Verified for 3.4 M2 using build I20070917-0010.