This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 137338 - [QuickSearch] Search through options
Summary: [QuickSearch] Search through options
Alias: None
Product: platform
Classification: Unclassified
Component: Quick Search (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: apireviews
Depends on: 191803
Blocks: 137318 134398
  Show dependency tree
Reported: 2008-06-16 17:11 UTC by Ondrej Langr
Modified: 2010-11-10 15:06 UTC (History)
7 users (show)

See Also:
Exception Reporter:

Diff (25.62 KB, text/plain)
2008-06-17 15:19 UTC, Jan Becicka
new patch, with declarative optionCategory and AdvancedOption (68.37 KB, text/plain)
2008-07-10 15:36 UTC, Max Sauer
patch with yarda's suggestions (72.82 KB, patch)
2008-07-11 16:18 UTC, Max Sauer
Details | Diff
patch to integrate (100.49 KB, patch)
2008-07-14 15:09 UTC, Max Sauer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Langr 2008-06-16 17:11:33 UTC
The QuickSearch feature should search through options based on keywords and tab names. Thus, it would be possible to
quickly locate various settings without browsing through options manually. For details, see UI specification in the URL
Comment 1 Jan Becicka 2008-06-17 15:17:47 UTC
This feature needs API change in options.api module.
I propose to add method to class SPI OptionsPanelController

     * Set of keywords related to this panel
     * @return Map<category name, Set<keyword>)
    public Map<String, Set<String>> getKeywordsByCategory() {
        return Collections.EMPTY_MAP;

default implementation returns empty map.

Proposed change is compatible. Diff includes also proposed changes in options.api module and implementation for java
options and todo tasks as proof of concept.

Comment 2 Jan Becicka 2008-06-17 15:19:06 UTC
Created attachment 62934 [details]
Comment 3 Jesse Glick 2008-06-17 17:40:51 UTC
BTW "Occurences" is a misspelling. You meant "Occurrences".

[JG01] Missing @since, spec version change, and usage of new version.

[JG02] "@return Map<category name, Set<keyword>)" has a spurious ')', and will not appear correctly in HTML. The
physical type is clear in Javadoc; spell out what the method does. "@return a map from category name to a set of
keywords" or similar. Also the initial sentence is missing a period ('.').
Comment 4 Jan Becicka 2008-06-18 07:11:29 UTC
> BTW "Occurences" is a misspelling. You meant "Occurrences".
Well, problem with spelling was not introduced by me. "JavaOptions/MarkOccurences" is name of folder in xml filesystem,
I must follow it. I use correct spelling in keyword definition, which is relevant to users. The same issue is with
Formating vs. Formatting.

JG01, JG02 - will fix.

Comment 5 Jiri Skrivanek 2008-06-18 08:46:21 UTC
[JS01] Move initialization of categoryToController in Model class into init() and use new DelegatingController().
[JS02] Make CategoryModel.getCategories() package private.
Comment 6 Jesse Glick 2008-06-18 13:55:59 UTC
Regarding misspelled folder names - I know, I was suggesting the name of the actual folder just be corrected.
Comment 7 Jaroslav Tulach 2008-06-19 22:40:55 UTC
Y01 Last time Jirka added a method into the Options SPI I asked him to make it protected, so it is clear that only the 
infrastructure is supposed to call it, nobody else. Please make this method protected as well.

Y02 I do not like the method at all! Does this mean that first time somebody uses Quick Search, you load all classes 
of all panel providers into memory? I do not think performance people can agree with that. Please propose some 
declarative way of annotating the panels, so you do not need to load any class until it is really displayed.
Comment 8 Jan Becicka 2008-06-23 09:33:08 UTC
Y01: NP
Y02: I'm not performance expert, but it is obvious, that something needs to be loaded for all panels. Panel controllers
are quite lightweight and I tried not to introduce any new class. What declarative way do you have in mind? Can you
quantify performance comparison of declarative solution? Thanks for help.
Comment 9 Jaroslav Tulach 2008-06-26 17:53:39 UTC
Re. Y03, I'd like the OptionsCategory to have a static method create that would read its values from a layer. Use 
issue 138076 to get localized values from the layer in standard way.
Comment 10 David Simonek 2008-07-03 16:04:19 UTC
I'm just curious, what's the status? Will we make it for M2?
Comment 11 Max Sauer 2008-07-10 15:36:29 UTC
Created attachment 64256 [details]
new patch, with declarative optionCategory and AdvancedOption
Comment 12 Max Sauer 2008-07-10 15:38:34 UTC
Here is a new patch, with declarative way of loading OptionCategory and AdvancedOption (subpanels), with example of 'General' option category and 'ToDo' 
subpanel. Other categories are not yet rewritten. Jardo?
Comment 13 Jan Becicka 2008-07-11 08:50:27 UTC
I asked Max not to publish method getOptionsByCategory, Otherwise patch seems to be ok.
Comment 14 Jaroslav Tulach 2008-07-11 10:33:26 UTC
Y11 Looks like the GeneralOptions class can be completely deleted from the implementation
Y12 I do not like "controllerClassName", instead I suggest to use just:
<attr name="controller" newvalue="org.netbeans.core.ui.options.general.GeneralOptionsPanelController"/>
Also do not play tricks with classloaders in OptionsCathegory and co. Just do attrs.get("controller") to get the right 
Y13 apichanges.xml do not mention the new factory method yet
Y14 Do not change "public abstract class AdvancedOption" into class with implementation. Keep it abstract. Put the 
implementation into some AdvancedOptionImpl extends AdvancedOption class. No the other hand, keep the factory method  
in the API class.
Y15 The same as Y14 applies to OptionsCategory, put the implementation into own class, keep the API class abstract as 
it was.
Y16 ToDoOptions class can probably be deleted
Comment 15 Max Sauer 2008-07-11 16:18:04 UTC
Created attachment 64348 [details]
patch with yarda's suggestions
Comment 16 Max Sauer 2008-07-11 16:20:33 UTC
I've added a patch implementing Jarda's suggestions.
Comment 17 Max Sauer 2008-07-14 15:08:12 UTC
In case there will be no objections, I'll integrate the patch tomorrow.
Comment 18 Max Sauer 2008-07-14 15:09:26 UTC
Created attachment 64443 [details]
patch to integrate
Comment 19 Max Sauer 2008-07-15 13:43:56 UTC
Integrated into core-main by
Comment 20 Quality Engineering 2008-07-17 04:38:38 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #324 build
User: Max Sauer <>
Log: #137338: QuickSearch through options
Comment 21 Petr Chytil 2008-10-16 13:10:18 UTC
verified in:

Product Version: NetBeans IDE 6.5 RC1 (Build 200810151402)
Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-133
System: Mac OS X version 10.5.5 running on i386; MacRoman; en_US (nb)
Userdir: /Users/petr/.netbeans/6.5rc1