Bug 68011 - [java search] "Search the JRE System Libraries" looks like a local preference but behaves as a global one... [search]
Summary: [java search] "Search the JRE System Libraries" looks like a local preference...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M5   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-21 11:22 EDT by Frederic Fusier CLA
Modified: 2006-01-17 05:09 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2004-06-21 11:22:35 EDT
Using 3.0 RC3.

I was looking at bug 61437 and trying to reproduce it and I realized that now we
do not find any reference for Random class in rt.jar...

Seem to be a regression as it works with 2.1.3 but not since M9.
Comment 1 Markus Keller CLA 2004-06-21 11:35:46 EDT
Note: there's a new checkbox in the Java Search View in the 'Limit To' group,
which reads 'Search the JRE system libraries' and is unchecked by default.

Check it and matches in libs are there ;-)
Comment 2 Frederic Fusier CLA 2004-06-21 12:03:52 EDT
You're right. I took me a little while to find it but after having selected it,
it works perfectly...
Thanks Markus :)
Comment 3 Frederic Fusier CLA 2004-06-21 12:15:24 EDT
Reopen to move to jdt/ui...
Comment 4 Frederic Fusier CLA 2004-06-21 12:31:55 EDT
Using RC2.

Historically I opened the bug against JDT/Core and with a complete different
summary as I thought JDT/Core was not able to find class references inside rt.jar.

Markus pointed that there was now a preferences for this kind of search and I
needed to check "Search the JRE System Libraries" box in order to see possible
match inside rt.jar...

It works fine but although this preferences seems to have a local impact (it is
defined in search dialog), it works as a global preferences. If I modify it,
close the dialog and launch the search from a contextual menu, then the new
option value is taken into account...

More annoying, it remembers the change I've done on this option even if I cancel
the dialog. This is clearly not a standard behavior...

So I think that this preference should be accessible in
Preferences->Workspace->Search page and only there...

I'm also not really convinced that default value (do not search in JRE Systeme
Libraries) is really a good thing... I'd rather prefer either that this value
was set by default or a dialog which warns me that it is not set and ask me to
confirm (and remember my decision...)
Comment 5 Frederic Fusier CLA 2004-06-21 12:33:10 EDT
Ooops... of course, read "RC3" instead of "RC2" in previous comment...
Comment 6 Dirk Baeumer CLA 2004-06-21 12:43:45 EDT
Not critical for 3.0.
Comment 7 Jerome Lanneluc CLA 2005-12-16 12:48:16 EST
When you select an element in the Outline and search for references, you never see the Search dialog. 

This should be a preference, or better this should detect that the selected element is in a JRE System Library, and always search in the JRE System libraries in this case.
Comment 8 Martin Aeschlimann CLA 2006-01-03 03:09:17 EST
Agree. The context menu actions should use a detected value, as Jerome suggested in comment 7, not the last setting used in the search dialog.
Problem with a preference page setting is that we currently have no preference page for Java Search and want to try to keep it that way.
Comment 9 Martin Aeschlimann CLA 2006-01-17 05:09:07 EST
Fixed in HEAD. The value is now detected: It is enabled only if the element itself is in the JRE.

I also updated the label in the search view to show if the JRE was searched or not.