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.

View | Details | Raw Unified | Return to bug 137338
Collapse All | Expand All

(-)a/core.ui/src/org/netbeans/core/ui/options/general/Bundle.properties (+3 lines)
Lines 227-229 Link Here
227
WebBrowsersOptionsPanel.AccessibleContext.accessibleDescription=Web Browsers
227
WebBrowsersOptionsPanel.AccessibleContext.accessibleDescription=Web Browsers
228
GeneralOptionsPanel_rbUseSystemProxy_Direct=<html><i>Direct connection.</i></html>
228
GeneralOptionsPanel_rbUseSystemProxy_Direct=<html><i>Direct connection.</i></html>
229
GeneralOptionsPanel_rbUseSystemProxy_Format=<html><i>{0}:{1}</i></html>
229
GeneralOptionsPanel_rbUseSystemProxy_Format=<html><i>{0}:{1}</i></html>
230
231
# Keywords for quick-search
232
KW_General=proxy, general
(-)a/core.ui/src/org/netbeans/core/ui/options/general/GeneralOptions.java (-92 lines)
Removed Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * Contributor(s):
25
 *
26
 * The Original Software is NetBeans. The Initial Developer of the Original
27
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
28
 * Microsystems, Inc. All Rights Reserved.
29
 *
30
 * If you wish your version of this file to be governed by only the CDDL
31
 * or only the GPL Version 2, indicate your decision by adding
32
 * "[Contributor] elects to include this software in this distribution
33
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
34
 * single choice of license, a recipient has the option to distribute
35
 * your version of this file under either the CDDL, the GPL Version 2 or
36
 * to extend the choice of license to its licensees as provided above.
37
 * However, if you add GPL Version 2 code and therefore, elected the GPL
38
 * Version 2 license, then the option applies only if the new code is
39
 * made subject to such option by the copyright holder.
40
 */
41
42
package org.netbeans.core.ui.options.general;
43
44
import javax.swing.Icon;
45
import javax.swing.ImageIcon;
46
import org.netbeans.spi.options.OptionsCategory;
47
import org.netbeans.spi.options.OptionsPanelController;
48
import org.openide.util.NbBundle;
49
import org.openide.util.Utilities;
50
51
52
/**
53
 * Contains information about General Options Panel, and creates a new
54
 * instance of it.
55
 *
56
 * @author Jan Jancura
57
 */
58
59
public final class GeneralOptions extends OptionsCategory {
60
61
    private static String loc (String key) {
62
        return NbBundle.getMessage (GeneralOptionsPanel.class, key);
63
    }
64
65
66
    private static Icon icon;
67
    
68
    public Icon getIcon () {
69
        if (icon == null)
70
            icon = new ImageIcon (
71
                Utilities.loadImage 
72
                    ("org/netbeans/modules/options/resources/generalOptions.png")
73
            );
74
        return icon;
75
    }
76
    
77
    public String getCategoryName () {
78
        return loc ("CTL_General_Options");
79
    }
80
81
    public String getTitle () {
82
        return loc ("CTL_General_Options_Title");
83
    }
84
    
85
    public String getDescription () {
86
        return loc ("CTL_General_Options_Description");
87
    }
88
    
89
    public OptionsPanelController create () {
90
        return new GeneralOptionsPanelController ();
91
    }    
92
}
(-)a/core.ui/src/org/netbeans/core/ui/resources/layer.xml (-62 / +71 lines)
Lines 40-46 Link Here
40
Version 2 license, then the option applies only if the new code is
40
Version 2 license, then the option applies only if the new code is
41
made subject to such option by the copyright holder.
41
made subject to such option by the copyright holder.
42
-->
42
-->
43
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
43
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
44
<filesystem>
44
<filesystem>
45
45
46
    <folder name="WarmUp">
46
    <folder name="WarmUp">
Lines 51-57 Link Here
51
    </folder>
51
    </folder>
52
    <folder name="Actions">
52
    <folder name="Actions">
53
        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
53
        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
54
        
54
55
        <folder name="Edit">
55
        <folder name="Edit">
56
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
56
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
57
            <file name="org-netbeans-core-ui-sysopen-SystemOpenAction.instance"/>
57
            <file name="org-netbeans-core-ui-sysopen-SystemOpenAction.instance"/>
Lines 66-72 Link Here
66
            <file name="org-openide-actions-ReplaceAction.instance"/>
66
            <file name="org-openide-actions-ReplaceAction.instance"/>
67
            <file name="org-openide-actions-UndoAction.instance"/>
67
            <file name="org-openide-actions-UndoAction.instance"/>
68
        </folder>
68
        </folder>
69
        
69
70
        <folder name="System">
70
        <folder name="System">
71
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
71
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
72
            <file name="org-openide-actions-EditAction.instance"/>
72
            <file name="org-openide-actions-EditAction.instance"/>
Lines 95-132 Link Here
95
            <file name="org-openide-actions-NewTemplateAction.instance"/>
95
            <file name="org-openide-actions-NewTemplateAction.instance"/>
96
            <file name="org-netbeans-core-actions-JumpNextAction.instance"/>
96
            <file name="org-netbeans-core-actions-JumpNextAction.instance"/>
97
            <file name="org-netbeans-core-actions-JumpPrevAction.instance"/>
97
            <file name="org-netbeans-core-actions-JumpPrevAction.instance"/>
98
            
98
99
        </folder>
99
        </folder>
100
        
100
101
        <folder name="View">
101
        <folder name="View">
102
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
102
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
103
            <file name="org-openide-actions-CustomizeAction.instance"/>
103
            <file name="org-openide-actions-CustomizeAction.instance"/>
104
            <file name="org-netbeans-core-actions-HTMLViewAction.instance"/>
104
            <file name="org-netbeans-core-actions-HTMLViewAction.instance"/>
105
            <file name="org-netbeans-core-actions-LogAction.instance"/>	 
105
            <file name="org-netbeans-core-actions-LogAction.instance"/>
106
        </folder>        
106
        </folder>
107
        
107
108
        <folder name="Tools">
108
        <folder name="Tools">
109
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
109
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
110
        </folder>
110
        </folder>
111
        
111
112
        <folder name="Window">
112
        <folder name="Window">
113
            <file name="org-netbeans-core-actions-GlobalPropertiesAction.instance"/>
113
            <file name="org-netbeans-core-actions-GlobalPropertiesAction.instance"/>
114
            <file name="org-netbeans-core-actions-PreviousViewCallbackAction.instance"/>
114
            <file name="org-netbeans-core-actions-PreviousViewCallbackAction.instance"/>
115
            <file name="org-netbeans-core-actions-NextViewCallbackAction.instance"/>
115
            <file name="org-netbeans-core-actions-NextViewCallbackAction.instance"/>
116
        </folder>
116
        </folder>
117
        
117
118
        <folder name="Help">
118
        <folder name="Help">
119
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
119
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
120
            <file name="org-netbeans-core-actions-AboutAction.instance"/>
120
            <file name="org-netbeans-core-actions-AboutAction.instance"/>
121
        </folder>
121
        </folder>
122
        
122
123
       <folder name="Other">
123
       <folder name="Other">
124
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
124
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
125
        </folder> 
125
        </folder>
126
        
126
127
    </folder>
127
    </folder>
128
    
128
129
    
129
130
    <folder name="Menu">
130
    <folder name="Menu">
131
        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
131
        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
132
        <folder name="File">
132
        <folder name="File">
Lines 200-206 Link Here
200
                <attr name="position" intvalue="2100"/>
200
                <attr name="position" intvalue="2100"/>
201
            </file>
201
            </file>
202
        </folder>
202
        </folder>
203
        
203
204
        <folder name="View">
204
        <folder name="View">
205
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
205
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
206
            <file name="org-netbeans-core-actions-HTMLViewAction.instance">
206
            <file name="org-netbeans-core-actions-HTMLViewAction.instance">
Lines 208-216 Link Here
208
            </file>
208
            </file>
209
            <file name="org-netbeans-core-actions-LogAction.instance">
209
            <file name="org-netbeans-core-actions-LogAction.instance">
210
                <attr name="position" intvalue="500"/>
210
                <attr name="position" intvalue="500"/>
211
            </file>	 
211
            </file>
212
        </folder>
212
        </folder>
213
        
213
214
        <folder name="GoTo">
214
        <folder name="GoTo">
215
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
215
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
216
            <attr name="position" intvalue="400"/>
216
            <attr name="position" intvalue="400"/>
Lines 223-229 Link Here
223
                <attr name="position" intvalue="1800"/>
223
                <attr name="position" intvalue="1800"/>
224
            </file>
224
            </file>
225
            </folder>
225
            </folder>
226
        
226
227
        <folder name="Tools">
227
        <folder name="Tools">
228
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
228
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
229
            <attr name="position" intvalue="1000"/>
229
            <attr name="position" intvalue="1000"/>
Lines 240-247 Link Here
240
                <attr name="position" intvalue="1300"/>
240
                <attr name="position" intvalue="1300"/>
241
            </file>
241
            </file>
242
            <file name="org-netbeans-core-actions-OptionsAction.instance"/>
242
            <file name="org-netbeans-core-actions-OptionsAction.instance"/>
243
        </folder> 
243
        </folder>
244
        
244
245
        <folder name="Window">
245
        <folder name="Window">
246
            <file name="org-netbeans-core-actions-GlobalPropertiesAction.shadow">
246
            <file name="org-netbeans-core-actions-GlobalPropertiesAction.shadow">
247
                <attr name="originalFile" stringvalue="Actions/Window/org-netbeans-core-actions-GlobalPropertiesAction.instance"/>
247
                <attr name="originalFile" stringvalue="Actions/Window/org-netbeans-core-actions-GlobalPropertiesAction.instance"/>
Lines 260-272 Link Here
260
                <attr name="position" intvalue="1300"/>
260
                <attr name="position" intvalue="1300"/>
261
            </file>
261
            </file>
262
        </folder>
262
        </folder>
263
        
263
264
    </folder>
264
    </folder>
265
    
265
266
    <folder name="Toolbars">
266
    <folder name="Toolbars">
267
        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
267
        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
268
        <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/core/resources/toolbarsOption.gif"/>
268
        <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/core/resources/toolbarsOption.gif"/>
269
        <!-- 
269
        <!--
270
        Specifying the file Standard.xml in this place in your layer will
270
        Specifying the file Standard.xml in this place in your layer will
271
        override the default toolbar configuration.
271
        override the default toolbar configuration.
272
        The file should contain a description of a toolbar configuration; for syntax
272
        The file should contain a description of a toolbar configuration; for syntax
Lines 305-334 Link Here
305
                <attr name="position" intvalue="100"/>
305
                <attr name="position" intvalue="100"/>
306
            </file>
306
            </file>
307
        </folder>
307
        </folder>
308
        
308
309
        <!-- specify toolbar configuration for platform ui. -->
309
        <!-- specify toolbar configuration for platform ui. -->
310
        <file name="Standard.xml" url="Standard.xml">
310
        <file name="Standard.xml" url="Standard.xml">
311
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
311
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
312
        </file>
312
        </file>
313
    </folder> <!-- Toolbars -->
313
    </folder> <!-- Toolbars -->
314
    
314
315
    <folder name="Templates">
315
    <folder name="Templates">
316
        <attr name="helpID" stringvalue="org.netbeans.core.actions.OptionsAction$Templates"/>
316
        <attr name="helpID" stringvalue="org.netbeans.core.actions.OptionsAction$Templates"/>
317
        
317
318
        <folder name="Services">
318
        <folder name="Services">
319
            <attr name="simple" boolvalue="false"/>
319
            <attr name="simple" boolvalue="false"/>
320
            <attr name="position" intvalue="0"/>
320
            <attr name="position" intvalue="0"/>
321
            <attr name="helpID" stringvalue="org.netbeans.core.actions.OptionsAction$TemplatesSubnodeServices"/>
321
            <attr name="helpID" stringvalue="org.netbeans.core.actions.OptionsAction$TemplatesSubnodeServices"/>
322
            
322
323
            <folder name="Browsers">
323
            <folder name="Browsers">
324
                <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/core/resources/webbrowsercateg.gif"/>
324
                <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/core/resources/webbrowsercateg.gif"/>
325
                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
325
                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
326
            </folder>
326
            </folder>
327
            
327
328
        </folder>    
328
        </folder>
329
        
329
330
        <!-- XXX these two should be elsewhere, probably (core/favorites?): -->
330
        <!-- XXX these two should be elsewhere, probably (core/favorites?): -->
331
        
331
332
        <!-- folder for all privileged templates -->
332
        <!-- folder for all privileged templates -->
333
        <folder name="Privileged">
333
        <folder name="Privileged">
334
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
334
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
Lines 336-342 Link Here
336
            <attr name="simple" boolvalue="false"/>
336
            <attr name="simple" boolvalue="false"/>
337
            <attr name="position" intvalue="0"/>
337
            <attr name="position" intvalue="0"/>
338
        </folder>
338
        </folder>
339
        
339
340
        <!-- folder for all recent templates -->
340
        <!-- folder for all recent templates -->
341
        <folder name="Recent">
341
        <folder name="Recent">
342
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
342
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
Lines 344-352 Link Here
344
            <attr name="simple" boolvalue="false"/>
344
            <attr name="simple" boolvalue="false"/>
345
            <attr name="position" intvalue="0"/>
345
            <attr name="position" intvalue="0"/>
346
        </folder>
346
        </folder>
347
        
347
348
    </folder>
348
    </folder>
349
    
349
350
    <folder name="Services">
350
    <folder name="Services">
351
        <folder name="Browsers">
351
        <folder name="Browsers">
352
            <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/core/resources/webbrowsercateg.gif"/>
352
            <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/core/resources/webbrowsercateg.gif"/>
Lines 359-382 Link Here
359
            <attr name="helpID" stringvalue="org.netbeans.core.services.Browsers"/>
359
            <attr name="helpID" stringvalue="org.netbeans.core.services.Browsers"/>
360
        </folder>
360
        </folder>
361
    </folder>
361
    </folder>
362
    
362
363
    <folder name="UI">
363
    <folder name="UI">
364
        <!-- settings categories UI presentation -->
364
        <!-- settings categories UI presentation -->
365
        <folder name="Services">
365
        <folder name="Services">
366
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
366
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
367
            <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/core/resources/session.gif"/>
367
            <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/core/resources/session.gif"/>
368
            <attr name="helpID" stringvalue="org.netbeans.core.ControlPanelNode"/>
368
            <attr name="helpID" stringvalue="org.netbeans.core.ControlPanelNode"/>
369
            
369
370
            <folder name="IDEConfiguration"> <!-- PENDING rename to somethink like APP Settings or so -->
370
            <folder name="IDEConfiguration"> <!-- PENDING rename to somethink like APP Settings or so -->
371
                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
371
                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
372
                
372
373
                <folder name="ServerAndExternalToolSettings">
373
                <folder name="ServerAndExternalToolSettings">
374
374
375
                    <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
375
                    <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.ui.resources.Bundle"/>
376
376
377
                </folder> <!-- ServerAndExternalToolSettings -->
377
                </folder> <!-- ServerAndExternalToolSettings -->
378
            </folder> <!-- IDEConfiguration -->
378
            </folder> <!-- IDEConfiguration -->
379
            
379
380
        </folder> <!-- Services -->
380
        </folder> <!-- Services -->
381
    </folder>  <!-- UI -->
381
    </folder>  <!-- UI -->
382
382
Lines 385-413 Link Here
385
        <file name="WindowManager.wswmgr" url="windowmanager/windowmanager.wswmgr" />
385
        <file name="WindowManager.wswmgr" url="windowmanager/windowmanager.wswmgr" />
386
        -->
386
        -->
387
    <folder name="Modes">
387
    <folder name="Modes">
388
    
388
389
    <!-- Note, editor mode defined directly in core/windows, to allow
389
    <!-- Note, editor mode defined directly in core/windows, to allow
390
            winsys run correctly in platform use, without core/ui -->
390
            winsys run correctly in platform use, without core/ui -->
391
            
391
392
    <file name="explorer.wsmode" url="windowmanager/explorer.wsmode"/>
392
    <file name="explorer.wsmode" url="windowmanager/explorer.wsmode"/>
393
    <folder name="explorer"/>
393
    <folder name="explorer"/>
394
    
394
395
    <file name="properties.wsmode" url="windowmanager/properties.wsmode"/>
395
    <file name="properties.wsmode" url="windowmanager/properties.wsmode"/>
396
    <folder name="properties">
396
    <folder name="properties">
397
        <file name="properties.wstcref" url="properties.wstcref"/>
397
        <file name="properties.wstcref" url="properties.wstcref"/>
398
    </folder>
398
    </folder>
399
    
399
400
    <file name="leftSlidingSide.wsmode" url="windowmanager/leftside.wsmode"/>
400
    <file name="leftSlidingSide.wsmode" url="windowmanager/leftside.wsmode"/>
401
    <folder name="leftSlidingSide"/>
401
    <folder name="leftSlidingSide"/>
402
    
402
403
    <file name="rightSlidingSide.wsmode" url="windowmanager/rightside.wsmode"/>
403
    <file name="rightSlidingSide.wsmode" url="windowmanager/rightside.wsmode"/>
404
    <folder name="rightSlidingSide"/>
404
    <folder name="rightSlidingSide"/>
405
        
405
406
        <file name="bottomSlidingSide.wsmode" url="windowmanager/bottomside.wsmode"/>
406
        <file name="bottomSlidingSide.wsmode" url="windowmanager/bottomside.wsmode"/>
407
        <folder name="bottomSlidingSide"/>
407
        <folder name="bottomSlidingSide"/>
408
            
408
409
        </folder>
409
        </folder>
410
        
410
411
        <folder name="Groups">
411
        <folder name="Groups">
412
            <folder name="form">
412
            <folder name="form">
413
                <file name="properties.wstcgrp" url="properties.wstcgrp"/>
413
                <file name="properties.wstcgrp" url="properties.wstcgrp"/>
Lines 416-429 Link Here
416
                <file name="properties.wstcgrp" url="properties.wstcgrp"/>
416
                <file name="properties.wstcgrp" url="properties.wstcgrp"/>
417
            </folder>
417
            </folder>
418
        </folder>
418
        </folder>
419
        
419
420
        <folder name="Components">
420
        <folder name="Components">
421
            <file name="properties.settings" url="properties.xml"/>
421
            <file name="properties.settings" url="properties.xml"/>
422
        </folder>
422
        </folder>
423
        
423
424
    </folder>
424
    </folder>
425
    
425
426
    
426
427
    <folder name="Loaders">
427
    <folder name="Loaders">
428
        <folder name="folder">
428
        <folder name="folder">
429
            <folder name="any">
429
            <folder name="any">
Lines 482-493 Link Here
482
                        <attr name="instanceClass" stringvalue="org.openide.actions.PropertiesAction"/>
482
                        <attr name="instanceClass" stringvalue="org.openide.actions.PropertiesAction"/>
483
                        <attr name="position" intvalue="1700"/>
483
                        <attr name="position" intvalue="1700"/>
484
                    </file>
484
                    </file>
485
                    
485
486
                </folder>
486
                </folder>
487
            </folder>
487
            </folder>
488
        </folder>
488
        </folder>
489
        
489
490
        
490
491
        <folder name="content">
491
        <folder name="content">
492
            <folder name="unknown">
492
            <folder name="unknown">
493
                <folder name="Actions">
493
                <folder name="Actions">
Lines 558-564 Link Here
558
                </folder>
558
                </folder>
559
            </folder>
559
            </folder>
560
        </folder>
560
        </folder>
561
        
561
562
        <folder name="application">
562
        <folder name="application">
563
            <folder name="x-nbsettings">
563
            <folder name="x-nbsettings">
564
                <folder name="Actions">
564
                <folder name="Actions">
Lines 614-625 Link Here
614
                        <attr name="instanceClass" stringvalue="org.openide.actions.PropertiesAction"/>
614
                        <attr name="instanceClass" stringvalue="org.openide.actions.PropertiesAction"/>
615
                        <attr name="position" intvalue="1300"/>
615
                        <attr name="position" intvalue="1300"/>
616
                    </file>
616
                    </file>
617
                    
617
618
                </folder>
618
                </folder>
619
            </folder>
619
            </folder>
620
        </folder>
620
        </folder>
621
        
621
622
        
622
623
        <folder name="text">
623
        <folder name="text">
624
            <folder name="xml">
624
            <folder name="xml">
625
                <folder name="Actions">
625
                <folder name="Actions">
Lines 682-698 Link Here
682
                </folder>
682
                </folder>
683
            </folder>
683
            </folder>
684
        </folder>
684
        </folder>
685
        
685
686
    </folder>
686
    </folder>
687
    
687
688
    <folder name="OptionsDialog">
688
    <folder name="OptionsDialog">
689
        <folder name="Advanced">
689
        <folder name="Advanced">
690
            <file name="org-netbeans-core-ui-options-filetypes-FileAssociationsAdvancedOption.instance"/>
690
            <file name="org-netbeans-core-ui-options-filetypes-FileAssociationsAdvancedOption.instance"/>
691
        </folder>
691
        </folder>
692
        <file name="General.instance">
692
        <file name="General.instance">
693
            <attr name="instanceClass" stringvalue="org.netbeans.core.ui.options.general.GeneralOptions"/>
693
            <attr name="instanceCreate" methodvalue="org.netbeans.spi.options.OptionsCategory.createCategory"/>
694
695
            <attr name="title" bundlevalue="org.netbeans.core.ui.options.general.Bundle#CTL_General_Options_Title"/>
696
            <attr name="categoryName" bundlevalue="org.netbeans.core.ui.options.general.Bundle#CTL_General_Options"/>
697
            <attr name="iconBase" stringvalue="org/netbeans/modules/options/resources/generalOptions.png"/>
698
            <attr name="controller" newvalue="org.netbeans.core.ui.options.general.GeneralOptionsPanelController"/>
699
            <attr name="keywords" bundlevalue="org.netbeans.core.ui.options.general.Bundle#KW_General"/>
700
            <attr name="keywordsCategory" stringvalue="General"/>
701
            <attr name="description" bundlevalue="org.netbeans.core.ui.options.general.Bundle#CTL_General_Options_Description"/>
702
694
            <attr name="position" intvalue="100"/>
703
            <attr name="position" intvalue="100"/>
695
        </file>
704
        </file>
696
    </folder>
705
    </folder>
697
    
706
698
</filesystem>
707
</filesystem>
(-)a/java.editor/src/org/netbeans/modules/java/editor/options/Bundle.properties (+2 lines)
Lines 38-43 Link Here
38
# made subject to such option by the copyright holder.
38
# made subject to such option by the copyright holder.
39
39
40
OPTIONS_java=Java Editor
40
OPTIONS_java=Java Editor
41
42
KW_Mark=Mark Occurrences
41
43
42
PROP_completionCaseSensitive=Case Sensitive Code Completion
44
PROP_completionCaseSensitive=Case Sensitive Code Completion
43
HINT_completionCaseSensitive=If True, the completion query search will be case sensitive
45
HINT_completionCaseSensitive=If True, the completion query search will be case sensitive
(-)a/java.editor/src/org/netbeans/modules/java/editor/options/MarkOccurencesOptionsPanelController.java (-2 / +17 lines)
Lines 42-53 Link Here
42
42
43
import java.beans.PropertyChangeListener;
43
import java.beans.PropertyChangeListener;
44
import java.beans.PropertyChangeSupport;
44
import java.beans.PropertyChangeSupport;
45
import java.util.Collections;
46
import java.util.HashMap;
47
import java.util.HashSet;
48
import java.util.Map;
49
import java.util.Set;
50
import java.util.StringTokenizer;
45
import java.util.prefs.Preferences;
51
import java.util.prefs.Preferences;
46
import javax.swing.JComponent;
52
import javax.swing.JComponent;
47
import org.netbeans.spi.options.OptionsPanelController;
53
import org.netbeans.spi.options.OptionsPanelController;
48
import org.openide.util.HelpCtx;
54
import org.openide.util.HelpCtx;
49
import org.openide.util.Lookup;
55
import org.openide.util.Lookup;
50
import org.openide.util.NbPreferences;
56
import org.openide.util.NbBundle;
51
57
52
final class MarkOccurencesOptionsPanelController extends OptionsPanelController {
58
final class MarkOccurencesOptionsPanelController extends OptionsPanelController {
53
    
59
    
Lines 104-108 Link Here
104
	}
110
	}
105
	pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
111
	pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
106
    }
112
    }
107
   
113
    
114
    @Override
115
    public Map<String, Set<String>> getKeywordsByCategory() {
116
        String keywords = NbBundle.getMessage(MarkOccurencesOptionsPanelController.class, "KW_Mark");
117
        HashMap result = new HashMap();
118
        result.put("JavaOptions/MarkOccurences", new HashSet(Collections.list(new StringTokenizer(keywords, ",")))); //NOI18N
119
        return result;
120
    }
121
    
108
}
122
}
123
(-)a/java.hints/src/org/netbeans/modules/java/hints/options/Bundle.properties (+2 lines)
Lines 14-16 Link Here
14
HintsPanel.errorTree.AccessibleContext.accessibleDescription=Hints
14
HintsPanel.errorTree.AccessibleContext.accessibleDescription=Hints
15
HintsPanel.AccessibleContext.accessibleName=Hints Options
15
HintsPanel.AccessibleContext.accessibleName=Hints Options
16
HintsPanel.AccessibleContext.accessibleDescription=Hints Options
16
HintsPanel.AccessibleContext.accessibleDescription=Hints Options
17
KW_Hints=Hints,Fixes,Suggestions,Javadoc Hints,Warnings
18
(-)a/java.hints/src/org/netbeans/modules/java/hints/options/HintsOptionsPanelController.java (+14 lines)
Lines 42-51 Link Here
42
42
43
import java.beans.PropertyChangeListener;
43
import java.beans.PropertyChangeListener;
44
import java.beans.PropertyChangeSupport;
44
import java.beans.PropertyChangeSupport;
45
import java.util.Collections;
46
import java.util.HashMap;
47
import java.util.HashSet;
48
import java.util.Map;
49
import java.util.Set;
50
import java.util.StringTokenizer;
45
import javax.swing.JComponent;
51
import javax.swing.JComponent;
46
import org.netbeans.spi.options.OptionsPanelController;
52
import org.netbeans.spi.options.OptionsPanelController;
47
import org.openide.util.HelpCtx;
53
import org.openide.util.HelpCtx;
48
import org.openide.util.Lookup;
54
import org.openide.util.Lookup;
55
import org.openide.util.NbBundle;
49
56
50
final class HintsOptionsPanelController extends OptionsPanelController {
57
final class HintsOptionsPanelController extends OptionsPanelController {
51
    
58
    
Lines 103-106 Link Here
103
	pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
110
	pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
104
    }
111
    }
105
    
112
    
113
    @Override
114
    public Map<String, Set<String>> getKeywordsByCategory() {
115
        String keywords = NbBundle.getMessage(HintsOptionsPanelController.class, "KW_Hints");
116
        HashMap result = new HashMap();
117
        result.put("JavaOptions/Hints", new HashSet(Collections.list(new StringTokenizer(keywords, ",")))); //NOI18N
118
        return result;
119
    }
106
}
120
}
(-)a/java.source/src/org/netbeans/modules/java/source/tasklist/Bundle.properties (+2 lines)
Lines 43-48 Link Here
43
jCheckBox2.text=Enable &Dependencies in Java Tasklist
43
jCheckBox2.text=Enable &Dependencies in Java Tasklist
44
jCheckBox1.text_1=Enable &Error Badges on Files
44
jCheckBox1.text_1=Enable &Error Badges on Files
45
45
46
KW_TaskList=Error Badges,Tasklist
47
46
DN_Tasklist=Tasklist
48
DN_Tasklist=Tasklist
47
TP_Tasklist=Java Tasklist Settings
49
TP_Tasklist=Java Tasklist Settings
48
enableLint.text=Enable Compiler &Warnings
50
enableLint.text=Enable Compiler &Warnings
(-)a/java.source/src/org/netbeans/modules/java/source/tasklist/TasklistOptions.java (+13 lines)
Lines 42-47 Link Here
42
42
43
import java.beans.PropertyChangeListener;
43
import java.beans.PropertyChangeListener;
44
import java.beans.PropertyChangeSupport;
44
import java.beans.PropertyChangeSupport;
45
import java.util.Collections;
46
import java.util.HashMap;
47
import java.util.HashSet;
48
import java.util.Map;
49
import java.util.Set;
50
import java.util.StringTokenizer;
45
import javax.swing.JComponent;
51
import javax.swing.JComponent;
46
import javax.swing.SwingUtilities;
52
import javax.swing.SwingUtilities;
47
import javax.swing.event.ChangeEvent;
53
import javax.swing.event.ChangeEvent;
Lines 145-149 Link Here
145
            pcs.firePropertyChange(PROP_CHANGED, null, null);
151
            pcs.firePropertyChange(PROP_CHANGED, null, null);
146
        }
152
        }
147
        
153
        
154
        @Override
155
        public Map<String, Set<String>> getKeywordsByCategory() {
156
            String keywords = NbBundle.getMessage(TasklistOptions.class, "KW_TaskList");
157
            HashMap result = new HashMap();
158
            result.put("JavaOptions/Tasklist", new HashSet(Collections.list(new StringTokenizer(keywords, ",")))); //NOI18N
159
            return result;
160
        }
148
    }
161
    }
149
}
162
}
(-)a/java.source/src/org/netbeans/modules/java/ui/Bundle.properties (+2 lines)
Lines 39-44 Link Here
39
39
40
OptionsCategory_Name=Java Code
40
OptionsCategory_Name=Java Code
41
OptionsCategory_Title=Java Code
41
OptionsCategory_Title=Java Code
42
43
KW_Formatting=Formatting,Indentation,Spaces,Alignment,Blank Lines,Braces
42
44
43
CTL_Formating_DisplayName=Formatting
45
CTL_Formating_DisplayName=Formatting
44
CTL_Formating_ToolTip=Java Code Formatting Options
46
CTL_Formating_ToolTip=Java Code Formatting Options
(-)a/java.source/src/org/netbeans/modules/java/ui/FormatingOptionsPanelController.java (-1 / +16 lines)
Lines 42-47 Link Here
42
42
43
import java.beans.PropertyChangeListener;
43
import java.beans.PropertyChangeListener;
44
import java.beans.PropertyChangeSupport;
44
import java.beans.PropertyChangeSupport;
45
import java.util.Collections;
46
import java.util.HashMap;
47
import java.util.HashSet;
48
import java.util.Map;
49
import java.util.Set;
50
import java.util.StringTokenizer;
45
import java.util.prefs.BackingStoreException;
51
import java.util.prefs.BackingStoreException;
46
import java.util.prefs.Preferences;
52
import java.util.prefs.Preferences;
47
import javax.swing.JComponent;
53
import javax.swing.JComponent;
Lines 49-54 Link Here
49
import org.netbeans.spi.options.OptionsPanelController;
55
import org.netbeans.spi.options.OptionsPanelController;
50
import org.openide.util.HelpCtx;
56
import org.openide.util.HelpCtx;
51
import org.openide.util.Lookup;
57
import org.openide.util.Lookup;
58
import org.openide.util.NbBundle;
52
59
53
final class FormatingOptionsPanelController extends OptionsPanelController {
60
final class FormatingOptionsPanelController extends OptionsPanelController {
54
    
61
    
Lines 57-63 Link Here
57
    
64
    
58
    private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
65
    private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
59
    private boolean changed;
66
    private boolean changed;
60
                    
67
68
    @Override
69
    public Map<String,Set<String>> getKeywordsByCategory() {
70
        String keywords = NbBundle.getMessage(FormatingOptionsPanelController.class, "KW_Formatting");
71
        HashMap result =  new HashMap();
72
        result.put("JavaOptions/Formatting", new HashSet(Collections.list(new StringTokenizer(keywords, ",")))); //NOI18N
73
        return result;
74
    }
75
    
61
    public void update() {
76
    public void update() {
62
        changed = false;
77
        changed = false;
63
	panel.load(null);
78
	panel.load(null);
(-)a/java.source/src/org/netbeans/modules/java/ui/JavaOptionsPanelController.java (-1 / +15 lines)
Lines 49-54 Link Here
49
import java.util.LinkedList;
49
import java.util.LinkedList;
50
import java.util.List;
50
import java.util.List;
51
import java.util.Map;
51
import java.util.Map;
52
import java.util.Set;
52
import javax.swing.JComponent;
53
import javax.swing.JComponent;
53
import javax.swing.JTabbedPane;
54
import javax.swing.JTabbedPane;
54
import org.netbeans.spi.options.AdvancedOption;
55
import org.netbeans.spi.options.AdvancedOption;
Lines 76-82 Link Here
76
    public JavaOptionsPanelController() {
77
    public JavaOptionsPanelController() {
77
        readPanels();
78
        readPanels();
78
    }
79
    }
79
            
80
81
    private Map<String, Set<String>> keywords = null;
82
83
    @Override
84
    public Map<String, Set<String>> getKeywordsByCategory() {
85
        if (keywords==null) {
86
            keywords = new HashMap<String, Set<String>>();
87
            for (OptionsPanelController controller:getControllers()) {
88
                keywords.putAll(controller.getKeywordsByCategory());
89
            }
90
        }
91
        return keywords;
92
    }
93
    
80
    public void update() {
94
    public void update() {
81
        for (OptionsPanelController c : getControllers()) {
95
        for (OptionsPanelController c : getControllers()) {
82
            c.update();
96
            c.update();
(-)a/options.api/apichanges.xml (+16 lines)
Lines 72-77 Link Here
72
<!-- ACTUAL CHANGES BEGIN HERE: -->
72
<!-- ACTUAL CHANGES BEGIN HERE: -->
73
73
74
<changes>
74
<changes>
75
    <change id="OptionsDisplayerAPI.keywords">
76
        <api name="OptionsAPI"/>
77
        <summary>Support for searchable options</summary>
78
        <version major="1" minor="9"/>        
79
        <date day="11" month="7" year="2008"/>
80
        <author login="msauer"/>
81
        <compatibility addition="yes"/>        
82
        <description>
83
            Added new factory methods enabling declarative loading of option
84
            panels (createCategory and createSubCategory) to OptionsCategory
85
            and AdvancedOption
86
        </description>
87
        <class package="org.netbeans.spi.options" name="OptionsPanelController"/>                
88
        <issue number="137338"/>
89
    </change>
90
75
    <change id="OptionsDisplayerAPI.subcategory">
91
    <change id="OptionsDisplayerAPI.subcategory">
76
        <api name="OptionsAPI"/>
92
        <api name="OptionsAPI"/>
77
        <summary>API to open the options dialog with some subcategory pre-selected</summary>
93
        <summary>API to open the options dialog with some subcategory pre-selected</summary>
(-)a/options.api/manifest.mf (-1 / +1 lines)
Lines 2-7 Link Here
2
OpenIDE-Module: org.netbeans.modules.options.api/1
2
OpenIDE-Module: org.netbeans.modules.options.api/1
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/options/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/options/Bundle.properties
4
OpenIDE-Module-Layer: org/netbeans/modules/options/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/options/resources/mf-layer.xml
5
OpenIDE-Module-Specification-Version: 1.8
5
OpenIDE-Module-Specification-Version: 1.9
6
AutoUpdate-Show-In-Client: false
6
AutoUpdate-Show-In-Client: false
7
AutoUpdate-Essential-Module: true
7
AutoUpdate-Essential-Module: true
(-)a/options.api/nbproject/project.xml (-10 / +18 lines)
Lines 47-65 Link Here
47
            <code-name-base>org.netbeans.modules.options.api</code-name-base>
47
            <code-name-base>org.netbeans.modules.options.api</code-name-base>
48
            <module-dependencies>
48
            <module-dependencies>
49
                <dependency>
49
                <dependency>
50
                    <code-name-base>org.openide.filesystems</code-name-base>
50
                    <code-name-base>org.netbeans.spi.quicksearch</code-name-base>
51
                    <build-prerequisite/>
51
                    <build-prerequisite/>
52
                    <compile-dependency/>
52
                    <compile-dependency/>
53
                    <run-dependency>
53
                    <run-dependency>
54
                        <specification-version>6.2</specification-version>
54
                        <specification-version>1.0</specification-version>
55
                    </run-dependency>
56
                </dependency>
57
                <dependency>
58
                    <code-name-base>org.openide.util</code-name-base>
59
                    <build-prerequisite/>
60
                    <compile-dependency/>
61
                    <run-dependency>
62
                        <specification-version>6.2</specification-version>
63
                    </run-dependency>
55
                    </run-dependency>
64
                </dependency>
56
                </dependency>
65
                <dependency>
57
                <dependency>
Lines 72-77 Link Here
72
                </dependency>
64
                </dependency>
73
                <dependency>
65
                <dependency>
74
                    <code-name-base>org.openide.dialogs</code-name-base>
66
                    <code-name-base>org.openide.dialogs</code-name-base>
67
                    <build-prerequisite/>
68
                    <compile-dependency/>
69
                    <run-dependency>
70
                        <specification-version>6.2</specification-version>
71
                    </run-dependency>
72
                </dependency>
73
                <dependency>
74
                    <code-name-base>org.openide.filesystems</code-name-base>
75
                    <build-prerequisite/>
76
                    <compile-dependency/>
77
                    <run-dependency>
78
                        <specification-version>6.2</specification-version>
79
                    </run-dependency>
80
                </dependency>
81
                <dependency>
82
                    <code-name-base>org.openide.util</code-name-base>
75
                    <build-prerequisite/>
83
                    <build-prerequisite/>
76
                    <compile-dependency/>
84
                    <compile-dependency/>
77
                    <run-dependency>
85
                    <run-dependency>
(-)c9a896e042ec (+98 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * If you wish your version of this file to be governed by only the CDDL
25
 * or only the GPL Version 2, indicate your decision by adding
26
 * "[Contributor] elects to include this software in this distribution
27
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
28
 * single choice of license, a recipient has the option to distribute
29
 * your version of this file under either the CDDL, the GPL Version 2 or
30
 * to extend the choice of license to its licensees as provided above.
31
 * However, if you add GPL Version 2 code and therefore, elected the GPL
32
 * Version 2 license, then the option applies only if the new code is
33
 * made subject to such option by the copyright holder.
34
 *
35
 * Contributor(s):
36
 *
37
 * Portions Copyrighted 2008 Sun Microsystems, Inc.
38
 */
39
40
package org.netbeans.modules.options;
41
42
import org.netbeans.spi.options.*;
43
import java.util.Collections;
44
import java.util.HashMap;
45
import java.util.HashSet;
46
import java.util.Map;
47
import java.util.Set;
48
import java.util.StringTokenizer;
49
50
/**
51
 * Advanced Option implementation class. Used by factory method from
52
 * <code>AdvancedOption</code> as instance created from layer.xml values
53
 *
54
 * @author Max Sauer
55
 */
56
public class AdvancedOptionImpl extends AdvancedOption {
57
    
58
    private String displayName;
59
    private String tooltip;
60
    private String keywords;
61
    private OptionsPanelController controller;
62
    private String keywordsCategory;
63
64
    public AdvancedOptionImpl(OptionsPanelController controller, String displayName, String tooltip, String keywords, String keywordsCategory) {
65
        this.controller = controller;
66
        this.displayName = displayName;
67
        this.tooltip = tooltip;
68
        this.keywords = keywords;
69
        this.keywordsCategory = keywordsCategory;
70
    }
71
72
    @Override
73
    public String getDisplayName () {
74
        return displayName;
75
    }
76
77
    @Override
78
    public String getTooltip () {
79
        return tooltip;
80
    }
81
82
    /**
83
     * Provides list of options for this category
84
     * @return map of path and keywords for each optioncategory sub-panel
85
     */
86
    public Map<String, Set<String>> getKeywordsByCategory() {
87
        HashMap<String, Set<String>> result = new HashMap<String, Set<String>>();
88
        if(keywordsCategory != null && keywords != null)
89
            result.put(keywordsCategory, new HashSet(Collections.list(new StringTokenizer(keywords, ",")))); //NOI18N
90
        return result;
91
    }
92
93
    @Override
94
    public OptionsPanelController create() {
95
        return controller;
96
    }
97
98
}
(-)a/options.api/src/org/netbeans/modules/options/Bundle.properties (+2 lines)
Lines 67-69 Link Here
67
ACS_OKButton=OK
67
ACS_OKButton=OK
68
ACS_ClassicButton= Invokes Advanced Options dialog
68
ACS_ClassicButton= Invokes Advanced Options dialog
69
ACS_OptionsPanel=Options Dialog
69
ACS_OptionsPanel=Options Dialog
70
71
QuickSearch/GoToOption=Options
(-)a/options.api/src/org/netbeans/modules/options/CategoryModel.java (-55 / +85 lines)
Lines 47-52 Link Here
47
import java.util.ArrayList;
47
import java.util.ArrayList;
48
import java.util.Arrays;
48
import java.util.Arrays;
49
import java.util.Collections;
49
import java.util.Collections;
50
import java.util.HashMap;
50
import java.util.Iterator;
51
import java.util.Iterator;
51
import java.util.LinkedHashMap;
52
import java.util.LinkedHashMap;
52
import java.util.List;
53
import java.util.List;
Lines 54-63 Link Here
54
import java.util.Set;
55
import java.util.Set;
55
import javax.swing.Icon;
56
import javax.swing.Icon;
56
import javax.swing.JComponent;
57
import javax.swing.JComponent;
58
import org.netbeans.spi.options.AdvancedOption;
57
import org.netbeans.spi.options.OptionsCategory;
59
import org.netbeans.spi.options.OptionsCategory;
58
import org.netbeans.spi.options.OptionsPanelController;
60
import org.netbeans.spi.options.OptionsPanelController;
59
import org.openide.util.HelpCtx;
61
import org.openide.util.HelpCtx;
60
import org.openide.util.Lookup;
62
import org.openide.util.Lookup;
63
import org.openide.util.Lookup.Item;
64
import org.openide.util.Lookup.Result;
61
import org.openide.util.LookupEvent;
65
import org.openide.util.LookupEvent;
62
import org.openide.util.LookupListener;
66
import org.openide.util.LookupListener;
63
import org.openide.util.RequestProcessor;
67
import org.openide.util.RequestProcessor;
Lines 69-81 Link Here
69
 */
73
 */
70
public final class CategoryModel implements LookupListener {
74
public final class CategoryModel implements LookupListener {
71
    private static Reference<CategoryModel> INSTANCE = new WeakReference<CategoryModel>(new CategoryModel());
75
    private static Reference<CategoryModel> INSTANCE = new WeakReference<CategoryModel>(new CategoryModel());
72
    private final RequestProcessor RP = new RequestProcessor();    
76
    private final RequestProcessor RP = new RequestProcessor();
73
    private static String currentCategoryID = null;
77
    private static String currentCategoryID = null;
74
    private String highlitedCategoryID = null;    
78
    private String highlitedCategoryID = null;
75
    private boolean categoriesValid = true;
79
    private boolean categoriesValid = true;
76
    private final Map<String, CategoryModel.Category> id2Category = 
80
    private final Map<String, CategoryModel.Category> id2Category =
77
            Collections.synchronizedMap(new LinkedHashMap<String, CategoryModel.Category>());
81
            Collections.synchronizedMap(new LinkedHashMap<String, CategoryModel.Category>());
78
    private MasterLookup masterLookup;
82
    private MasterLookup masterLookup;
83
84
    Set<Map.Entry<String, CategoryModel.Category>> getCategories() {
85
        return id2Category.entrySet();
86
    }
87
79
    private final RequestProcessor.Task masterLookupTask = RP.create(new Runnable() {
88
    private final RequestProcessor.Task masterLookupTask = RP.create(new Runnable() {
80
        public void run() {
89
        public void run() {
81
            String[] categoryIDs = getCategoryIDs();
90
            String[] categoryIDs = getCategoryIDs();
Lines 93-99 Link Here
93
    },true);
102
    },true);
94
    private final RequestProcessor.Task categoryTask = RP.create(new Runnable() {
103
    private final RequestProcessor.Task categoryTask = RP.create(new Runnable() {
95
        public void run() {
104
        public void run() {
96
            Map<String, OptionsCategory> all = loadOptionsCategories();       
105
            Map<String, OptionsCategory> all = loadOptionsCategories();
97
            Map<String, CategoryModel.Category> temp = new LinkedHashMap<String, CategoryModel.Category>();
106
            Map<String, CategoryModel.Category> temp = new LinkedHashMap<String, CategoryModel.Category>();
98
            for (Iterator<Map.Entry<String, OptionsCategory>> it = all.entrySet().iterator(); it.hasNext();) {
107
            for (Iterator<Map.Entry<String, OptionsCategory>> it = all.entrySet().iterator(); it.hasNext();) {
99
                Map.Entry<String, OptionsCategory> entry = it.next();
108
                Map.Entry<String, OptionsCategory> entry = it.next();
Lines 107-117 Link Here
107
            masterLookupTask.schedule(0);
116
            masterLookupTask.schedule(0);
108
        }
117
        }
109
    },true);
118
    },true);
110
    
119
111
    private CategoryModel() {
120
    private CategoryModel() {
112
        categoryTask.schedule(0);
121
        categoryTask.schedule(0);
113
    }
122
    }
114
        
123
115
    public static CategoryModel getInstance() {
124
    public static CategoryModel getInstance() {
116
        CategoryModel retval = INSTANCE.get();
125
        CategoryModel retval = INSTANCE.get();
117
        if (retval == null) {
126
        if (retval == null) {
Lines 120-158 Link Here
120
        }
129
        }
121
        return retval;
130
        return retval;
122
    }
131
    }
123
    
132
124
    boolean needsReinit() {
133
    boolean needsReinit() {
125
        synchronized(CategoryModel.class) {
134
        synchronized(CategoryModel.class) {
126
            return !categoriesValid;
135
            return !categoriesValid;
127
        }                
136
        }
128
    }
137
    }
129
    
138
130
    boolean isInitialized() {
139
    boolean isInitialized() {
131
        return categoryTask.isFinished();
140
        return categoryTask.isFinished();
132
    }
141
    }
133
    
142
134
    boolean isLookupInitialized() {
143
    boolean isLookupInitialized() {
135
        return masterLookupTask.isFinished();
144
        return masterLookupTask.isFinished();
136
    }
145
    }
137
    
146
138
    
147
139
    void waitForInitialization() {
148
    void waitForInitialization() {
140
        categoryTask.waitFinished();
149
        categoryTask.waitFinished();
141
    }
150
    }
142
        
151
143
    public String getCurrentCategoryID() {
152
    public String getCurrentCategoryID() {
144
        return verifyCategoryID(currentCategoryID);
153
        return verifyCategoryID(currentCategoryID);
145
    }
154
    }
146
    
155
147
    public void setCurrentCategoryID(String categoryID) {
156
    public void setCurrentCategoryID(String categoryID) {
148
        currentCategoryID = verifyCategoryID(categoryID);
157
        currentCategoryID = verifyCategoryID(categoryID);
149
    }
158
    }
150
    
159
151
160
152
    String getHighlitedCategoryID() {
161
    String getHighlitedCategoryID() {
153
        return verifyCategoryID(highlitedCategoryID);
162
        return verifyCategoryID(highlitedCategoryID);
154
    }
163
    }
155
        
164
156
    private String verifyCategoryID(String categoryID) {
165
    private String verifyCategoryID(String categoryID) {
157
        String retval = findCurrentCategoryID(categoryID) != -1 ? categoryID : null;
166
        String retval = findCurrentCategoryID(categoryID) != -1 ? categoryID : null;
158
        if (retval == null) {
167
        if (retval == null) {
Lines 163-184 Link Here
163
        }
172
        }
164
        return retval;
173
        return retval;
165
    }
174
    }
166
    
175
167
    private int findCurrentCategoryID(String categoryID) {
176
    private int findCurrentCategoryID(String categoryID) {
168
        return categoryID == null ? -1 : Arrays.asList(getCategoryIDs()).indexOf(categoryID);
177
        return categoryID == null ? -1 : Arrays.asList(getCategoryIDs()).indexOf(categoryID);
169
    }
178
    }
170
    
179
171
    public String[] getCategoryIDs() {
180
    public String[] getCategoryIDs() {
172
        categoryTask.waitFinished();
181
        categoryTask.waitFinished();
173
        Set<String> keys = id2Category.keySet();        
182
        Set<String> keys = id2Category.keySet();
174
        return keys.toArray(new String[keys.size()]);
183
        return keys.toArray(new String[keys.size()]);
175
    }
184
    }
176
    
185
177
    Category getCurrent() {
186
    Category getCurrent() {
178
        String categoryID =  getCurrentCategoryID();
187
        String categoryID =  getCurrentCategoryID();
179
        return (categoryID == null) ? null : getCategory(categoryID);
188
        return (categoryID == null) ? null : getCategory(categoryID);
180
    }
189
    }
181
    
190
182
    void setCurrent(Category item) {
191
    void setCurrent(Category item) {
183
        item.setCurrent();
192
        item.setCurrent();
184
    }
193
    }
Lines 186-197 Link Here
186
    void setHighlited(Category item,boolean highlited) {
195
    void setHighlited(Category item,boolean highlited) {
187
        item.setHighlited(highlited);
196
        item.setHighlited(highlited);
188
    }
197
    }
189
            
198
190
    HelpCtx getHelpCtx() {
199
    HelpCtx getHelpCtx() {
191
        final CategoryModel.Category category = getCurrent();
200
        final CategoryModel.Category category = getCurrent();
192
        return (category == null) ? null : category.getHelpCtx();
201
        return (category == null) ? null : category.getHelpCtx();
193
    }
202
    }
194
    
203
195
    void update(PropertyChangeListener l, boolean force) {
204
    void update(PropertyChangeListener l, boolean force) {
196
        String[] categoryIDs = getCategoryIDs();
205
        String[] categoryIDs = getCategoryIDs();
197
        for (int i = 0; i < categoryIDs.length; i++) {
206
        for (int i = 0; i < categoryIDs.length; i++) {
Lines 199-205 Link Here
199
            item.update(l, force);
208
            item.update(l, force);
200
        }
209
        }
201
    }
210
    }
202
    
211
203
    void save() {
212
    void save() {
204
        String[] categoryIDs = getCategoryIDs();
213
        String[] categoryIDs = getCategoryIDs();
205
        for (int i = 0; i < categoryIDs.length; i++) {
214
        for (int i = 0; i < categoryIDs.length; i++) {
Lines 207-213 Link Here
207
            item.applyChanges();
216
            item.applyChanges();
208
        }
217
        }
209
    }
218
    }
210
    
219
211
    void cancel() {
220
    void cancel() {
212
        String[] categoryIDs = getCategoryIDs();
221
        String[] categoryIDs = getCategoryIDs();
213
        for (int i = 0; i < categoryIDs.length; i++) {
222
        for (int i = 0; i < categoryIDs.length; i++) {
Lines 215-221 Link Here
215
            item.cancel();
224
            item.cancel();
216
        }
225
        }
217
    }
226
    }
218
    
227
219
    boolean dataValid() {
228
    boolean dataValid() {
220
        boolean retval = true;
229
        boolean retval = true;
221
        String[] categoryIDs = getCategoryIDs();
230
        String[] categoryIDs = getCategoryIDs();
Lines 225-231 Link Here
225
        }
234
        }
226
        return retval;
235
        return retval;
227
    }
236
    }
228
    
237
229
    boolean isChanged() {
238
    boolean isChanged() {
230
        boolean retval = false;
239
        boolean retval = false;
231
        String[] categoryIDs = getCategoryIDs();
240
        String[] categoryIDs = getCategoryIDs();
Lines 235-242 Link Here
235
        }
244
        }
236
        return retval;
245
        return retval;
237
    }
246
    }
238
    
247
239
    
248
240
    Category getNextCategory() {
249
    Category getNextCategory() {
241
        int idx =  findCurrentCategoryID(getCurrentCategoryID());
250
        int idx =  findCurrentCategoryID(getCurrentCategoryID());
242
        String[] categoryIDs = getCategoryIDs();
251
        String[] categoryIDs = getCategoryIDs();
Lines 252-258 Link Here
252
        }
261
        }
253
        return nextId != null ? getCategory(nextId) : null;
262
        return nextId != null ? getCategory(nextId) : null;
254
    }
263
    }
255
    
264
256
    Category getPreviousCategory() {
265
    Category getPreviousCategory() {
257
        int idx =  findCurrentCategoryID(getCurrentCategoryID());
266
        int idx =  findCurrentCategoryID(getCurrentCategoryID());
258
        String[] categoryIDs = getCategoryIDs();
267
        String[] categoryIDs = getCategoryIDs();
Lines 268-287 Link Here
268
        }
277
        }
269
        return previousId != null ? getCategory(previousId) : null;
278
        return previousId != null ? getCategory(previousId) : null;
270
    }
279
    }
271
        
280
272
    
281
273
    Category getCategory(String categoryID) {
282
    Category getCategory(String categoryID) {
274
        categoryTask.waitFinished();
283
        categoryTask.waitFinished();
275
        return id2Category.get(categoryID);
284
        return id2Category.get(categoryID);
276
    }
285
    }
277
        
286
278
    private MasterLookup getMasterLookup() {
287
    private MasterLookup getMasterLookup() {
279
        if (masterLookup == null) {
288
        if (masterLookup == null) {
280
            masterLookup = new MasterLookup();
289
            masterLookup = new MasterLookup();
281
        }
290
        }
282
        return masterLookup;
291
        return masterLookup;
283
    }
292
    }
284
    
293
285
    private Map<String, OptionsCategory> loadOptionsCategories() {
294
    private Map<String, OptionsCategory> loadOptionsCategories() {
286
        Lookup lookup = Lookups.forPath("OptionsDialog"); // NOI18N
295
        Lookup lookup = Lookups.forPath("OptionsDialog"); // NOI18N
287
        Lookup.Result<OptionsCategory> result = lookup.lookup(new Lookup.Template<OptionsCategory>(OptionsCategory.class));
296
        Lookup.Result<OptionsCategory> result = lookup.lookup(new Lookup.Template<OptionsCategory>(OptionsCategory.class));
Lines 296-307 Link Here
296
305
297
    public void resultChanged(LookupEvent ev) {
306
    public void resultChanged(LookupEvent ev) {
298
        synchronized(CategoryModel.class) {
307
        synchronized(CategoryModel.class) {
299
            categoriesValid = false;            
308
            categoriesValid = false;
300
            OptionsDisplayerImpl.lookupListener.resultChanged(ev);
309
            OptionsDisplayerImpl.lookupListener.resultChanged(ev);
301
            INSTANCE = new WeakReference<CategoryModel>(new CategoryModel());
310
            INSTANCE = new WeakReference<CategoryModel>(new CategoryModel());
302
        }
311
        }
303
    }
312
    }
304
    
313
305
    final class Category  {
314
    final class Category  {
306
        private OptionsCategory category;
315
        private OptionsCategory category;
307
        private OptionsPanelController controller;
316
        private OptionsPanelController controller;
Lines 310-329 Link Here
310
        private JComponent component;
319
        private JComponent component;
311
        private Lookup lookup;
320
        private Lookup lookup;
312
        private final String id;
321
        private final String id;
313
        
322
314
        private Category(final String id, final OptionsCategory category) {
323
        private Category(final String id, final OptionsCategory category) {
315
            this.category = category;
324
            this.category = category;
316
            this.id = id;
325
            this.id = id;
317
        }
326
        }
318
        
327
319
        boolean isCurrent() {
328
        boolean isCurrent() {
320
            return getID().equals(getCurrentCategoryID());
329
            return getID().equals(getCurrentCategoryID());
321
        }
330
        }
322
        
331
323
        boolean isHighlited() {
332
        boolean isHighlited() {
324
            return getID().equals(getHighlitedCategoryID());
333
            return getID().equals(getHighlitedCategoryID());
325
        }
334
        }
326
                
335
327
        private void setCurrent() {
336
        private void setCurrent() {
328
            setCurrentCategoryID(getID());
337
            setCurrentCategoryID(getID());
329
        }
338
        }
Lines 331-337 Link Here
331
        public void setCurrentSubcategory(String subpath) {
340
        public void setCurrentSubcategory(String subpath) {
332
            OptionsPanelControllerAccessor.getDefault().setCurrentSubcategory(create(), subpath);
341
            OptionsPanelControllerAccessor.getDefault().setCurrentSubcategory(create(), subpath);
333
        }
342
        }
334
    
343
335
        private void setHighlited(boolean highlited) {
344
        private void setHighlited(boolean highlited) {
336
            if (highlited) {
345
            if (highlited) {
337
                highlitedCategoryID = getID();
346
                highlitedCategoryID = getID();
Lines 339-345 Link Here
339
                highlitedCategoryID = currentCategoryID;
348
                highlitedCategoryID = currentCategoryID;
340
            }
349
            }
341
        }
350
        }
342
                        
351
343
        public Icon getIcon() {
352
        public Icon getIcon() {
344
            return category.getIcon();
353
            return category.getIcon();
345
        }
354
        }
Lines 349-370 Link Here
349
        public  String getID() {
358
        public  String getID() {
350
            return id;
359
            return id;
351
        }
360
        }
352
        
361
353
        public String getCategoryName() {
362
        public String getCategoryName() {
354
            return category.getCategoryName();
363
            return category.getCategoryName();
355
        }
364
        }
356
        
365
357
        public String getTitle() {
366
        public String getTitle() {
358
            return category.getTitle();
367
            return category.getTitle();
359
        }
368
        }
360
        
369
361
        private synchronized OptionsPanelController create() {
370
        private synchronized OptionsPanelController create() {
362
            if (controller == null) {
371
            if (controller == null) {
363
                controller = category.create();
372
                controller = category.create();
364
            }
373
            }
365
            return controller;
374
            return controller;
366
        }
375
        }
367
        
376
377
        public Map<String, Set<String>> getKeywords() {
378
            Map<String, Set<String>> kws = new HashMap<String, Set<String>>();
379
            if(category != null && (category instanceof OptionsCategoryImpl)) {
380
                kws.putAll(((OptionsCategoryImpl) category).getKeywordsByCategory());
381
            }
382
383
            //sub-panels keywords
384
            String path = "OptionsDialog/" + getID(); // NOI18N
385
            Lookup lkp = Lookups.forPath(path);
386
            Result<AdvancedOption> lkpResult = lkp.lookup(new Lookup.Template<AdvancedOption>(AdvancedOption.class));
387
            for (Item<AdvancedOption> item : lkpResult.allItems()) {
388
                // don't lookup in subfolders
389
                if (item.getId().substring(0, item.getId().lastIndexOf('/')).equals(path)) {  // NOI18N
390
                    AdvancedOption option = item.getInstance();
391
                    if(option instanceof AdvancedOptionImpl)
392
                        kws.putAll(((AdvancedOptionImpl) option).getKeywordsByCategory());
393
                }
394
            }
395
            return kws;
396
        }
397
368
        final void update(PropertyChangeListener l, boolean forceUpdate) {
398
        final void update(PropertyChangeListener l, boolean forceUpdate) {
369
            if ((!isUpdated && !forceUpdate) || (isUpdated && forceUpdate)) {
399
            if ((!isUpdated && !forceUpdate) || (isUpdated && forceUpdate)) {
370
                isUpdated = true;
400
                isUpdated = true;
Lines 375-395 Link Here
375
                }
405
                }
376
            }
406
            }
377
        }
407
        }
378
        
408
379
        private void applyChanges() {
409
        private void applyChanges() {
380
            if (isUpdated) {
410
            if (isUpdated) {
381
                create().applyChanges();
411
                create().applyChanges();
382
            }
412
            }
383
            isUpdated = false;
413
            isUpdated = false;
384
        }
414
        }
385
        
415
386
        private void cancel() {
416
        private void cancel() {
387
            if (isUpdated) {
417
            if (isUpdated) {
388
                create().cancel();
418
                create().cancel();
389
            }
419
            }
390
            isUpdated = false;
420
            isUpdated = false;
391
        }
421
        }
392
        
422
393
        private boolean isValid() {
423
        private boolean isValid() {
394
            boolean retval = true;
424
            boolean retval = true;
395
            if (isUpdated) {
425
            if (isUpdated) {
Lines 397-403 Link Here
397
            }
427
            }
398
            return retval;
428
            return retval;
399
        }
429
        }
400
        
430
401
        private boolean isChanged() {
431
        private boolean isChanged() {
402
            boolean retval = false;
432
            boolean retval = false;
403
            if (isUpdated) {
433
            if (isUpdated) {
Lines 405-423 Link Here
405
            }
435
            }
406
            return retval;
436
            return retval;
407
        }
437
        }
408
        
438
409
        public JComponent getComponent() {
439
        public JComponent getComponent() {
410
            if (component == null) {
440
            if (component == null) {
411
                component = create().getComponent(getMasterLookup());
441
                component = create().getComponent(getMasterLookup());
412
            }
442
            }
413
            return component;
443
            return component;
414
        }
444
        }
415
        
445
416
        private HelpCtx getHelpCtx() {
446
        private HelpCtx getHelpCtx() {
417
            return create().getHelpCtx();
447
            return create().getHelpCtx();
418
        }
448
        }
419
        
449
420
        
450
421
        private Lookup getLookup() {
451
        private Lookup getLookup() {
422
            if (lookup == null) {
452
            if (lookup == null) {
423
                lookup = create().getLookup();
453
                lookup = create().getLookup();
Lines 425-431 Link Here
425
            return lookup;
455
            return lookup;
426
        }
456
        }
427
    }
457
    }
428
    
458
429
    private class MasterLookup extends ProxyLookup {
459
    private class MasterLookup extends ProxyLookup {
430
        private void setLookups(List<Lookup> lookups) {
460
        private void setLookups(List<Lookup> lookups) {
431
            setLookups(lookups.toArray(new Lookup[lookups.size()]));
461
            setLookups(lookups.toArray(new Lookup[lookups.size()]));
(-)c9a896e042ec (+128 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * If you wish your version of this file to be governed by only the CDDL
25
 * or only the GPL Version 2, indicate your decision by adding
26
 * "[Contributor] elects to include this software in this distribution
27
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
28
 * single choice of license, a recipient has the option to distribute
29
 * your version of this file under either the CDDL, the GPL Version 2 or
30
 * to extend the choice of license to its licensees as provided above.
31
 * However, if you add GPL Version 2 code and therefore, elected the GPL
32
 * Version 2 license, then the option applies only if the new code is
33
 * made subject to such option by the copyright holder.
34
 *
35
 * Contributor(s):
36
 *
37
 * Portions Copyrighted 2008 Sun Microsystems, Inc.
38
 */
39
40
package org.netbeans.modules.options;
41
42
import java.awt.Image;
43
import java.util.Collections;
44
import java.util.HashMap;
45
import java.util.HashSet;
46
import java.util.Map;
47
import java.util.Set;
48
import java.util.StringTokenizer;
49
import javax.swing.Icon;
50
import javax.swing.ImageIcon;
51
import org.netbeans.spi.options.OptionsCategory;
52
import org.netbeans.spi.options.OptionsPanelController;
53
import org.openide.util.Utilities;
54
55
/**
56
 * OptionsCategory implementation class. Used by factory method from
57
 * <code>OptionsCategory</code> as instance created from layer.xml values
58
 * 
59
 * @author Max Sauer
60
 */
61
public class OptionsCategoryImpl extends OptionsCategory {
62
63
    //category fields
64
    private String title;
65
    private String categoryName;
66
    private String iconBase;
67
    private ImageIcon icon;
68
    private OptionsPanelController controller;
69
    private String description;
70
    private String keywords;
71
    private String keywordsCategory;
72
73
    public OptionsCategoryImpl(String title, String categoryName, String iconBase, OptionsPanelController controller, String description, String keywords, String keywordsCategory) {
74
        this.title = title;
75
        this.categoryName = categoryName;
76
        this.iconBase = iconBase;
77
        this.controller = controller;
78
        this.description = description;
79
        this.keywords = keywords;
80
        this.keywordsCategory = keywordsCategory;
81
    }
82
83
    @Override
84
    public Icon getIcon() {
85
        if (icon == null) {
86
            Image image = Utilities.loadImage(iconBase);
87
            if (image != null) {
88
                return new ImageIcon(image);
89
            }
90
            image = Utilities.loadImage(iconBase + ".png");
91
            if (image != null) {
92
                return new ImageIcon(image);
93
            }
94
            image = Utilities.loadImage(iconBase + ".gif");
95
            if (image == null) {
96
                return null;
97
            }
98
            icon = new ImageIcon(image);
99
        }
100
        return icon;
101
    }
102
103
    @Override
104
    public String getCategoryName () {
105
        return categoryName;
106
    }
107
108
    @Override
109
    public String getTitle () {
110
        return title;
111
    }
112
113
    public String getDescription() {
114
        return description;
115
    }
116
117
    @Override
118
    public OptionsPanelController create() {
119
        return controller;
120
    }
121
122
    final Map<String, Set<String>> getKeywordsByCategory() {
123
        HashMap<String, Set<String>> result = new HashMap<String, Set<String>>();
124
        if(keywordsCategory != null && keywords != null)
125
            result.put(keywordsCategory, new HashSet(Collections.list(new StringTokenizer(keywords, ",")))); //NOI18N
126
        return result;
127
    }
128
}
(-)c9a896e042ec (+82 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 * 
4
 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
5
 * 
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 * 
24
 * If you wish your version of this file to be governed by only the CDDL
25
 * or only the GPL Version 2, indicate your decision by adding
26
 * "[Contributor] elects to include this software in this distribution
27
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
28
 * single choice of license, a recipient has the option to distribute
29
 * your version of this file under either the CDDL, the GPL Version 2 or
30
 * to extend the choice of license to its licensees as provided above.
31
 * However, if you add GPL Version 2 code and therefore, elected the GPL
32
 * Version 2 license, then the option applies only if the new code is
33
 * made subject to such option by the copyright holder.
34
 * 
35
 * Contributor(s):
36
 * 
37
 * Portions Copyrighted 2008 Sun Microsystems, Inc.
38
 */
39
40
package org.netbeans.modules.options;
41
42
import java.util.Map;
43
import java.util.Set;
44
import org.netbeans.api.options.OptionsDisplayer;
45
import org.netbeans.spi.quicksearch.SearchProvider;
46
import org.netbeans.spi.quicksearch.SearchRequest;
47
import org.netbeans.spi.quicksearch.SearchResponse;
48
49
/**
50
 *
51
 * @author Jan Becicka
52
 */
53
public class QuickSearchProvider implements SearchProvider {
54
55
    public void evaluate(SearchRequest request, SearchResponse response) {
56
        for (Map.Entry<String, CategoryModel.Category> entry : CategoryModel.getInstance().getCategories()) {
57
            for (Map.Entry<String, Set<String>> kw : entry.getValue().getKeywords().entrySet()) {
58
                for (String keyword : kw.getValue()) {
59
                    if (keyword.toLowerCase().indexOf(request.getText().toLowerCase()) > -1) {
60
                        if (!response.addResult(new OpenOption(kw.getKey()), keyword)) {
61
                            return;
62
                        }
63
                    }
64
                }
65
            }
66
        }
67
    }
68
    
69
    private class OpenOption implements Runnable {
70
        
71
        private String path;
72
        
73
        OpenOption(String path) {
74
            this.path = path;
75
        }
76
77
        public void run() {
78
            OptionsDisplayer.getDefault().open(path);
79
        }
80
        
81
    }
82
}
(-)a/options.api/src/org/netbeans/modules/options/advanced/Model.java (-4 / +7 lines)
Lines 133-147 Link Here
133
    public OptionsPanelController getController(String categoryID) {
133
    public OptionsPanelController getController(String categoryID) {
134
        return categoryToController.get(getDisplayName(categoryID));
134
        return categoryToController.get(getDisplayName(categoryID));
135
    }
135
    }
136
    
136
137
    public JComponent getPanel (String category) {
137
    public JComponent getPanel (String category) {
138
        init ();
138
        init ();
139
        JComponent panel = categoryToPanel.get (category);        
139
        JComponent panel = categoryToPanel.get (category);        
140
        if (panel != null) return panel;
140
        if (panel != null) return panel;
141
        AdvancedOption option = categoryToOption.get (category);
141
        AdvancedOption option = categoryToOption.get (category);
142
        OptionsPanelController controller = new DelegatingController(option.create ());
142
        OptionsPanelController controller = categoryToController.get(category);
143
        if (controller==null) {
144
            controller = new DelegatingController(option.create ());
145
            categoryToController.put (category, controller);
146
        }
143
        controller.addPropertyChangeListener(propertyChangeListener);
147
        controller.addPropertyChangeListener(propertyChangeListener);
144
        categoryToController.put (category, controller);
145
        panel = controller.getComponent (masterLookup);
148
        panel = controller.getComponent (masterLookup);
146
        categoryToPanel.put (category, panel);
149
        categoryToPanel.put (category, panel);
147
        Border b = panel.getBorder ();
150
        Border b = panel.getBorder ();
Lines 306-312 Link Here
306
309
307
        public void removePropertyChangeListener(PropertyChangeListener l) {
310
        public void removePropertyChangeListener(PropertyChangeListener l) {
308
            delegate.removePropertyChangeListener(l);
311
            delegate.removePropertyChangeListener(l);
309
        }        
312
        }
310
    }            
313
    }            
311
}
314
}
312
315
(-)a/options.api/src/org/netbeans/modules/options/resources/mf-layer.xml (+11 lines)
Lines 69-72 Link Here
69
            <attr name="position" intvalue="800"/>
69
            <attr name="position" intvalue="800"/>
70
        </file>
70
        </file>
71
    </folder>
71
    </folder>
72
    
73
    <folder name="QuickSearch">
74
        <folder name="GoToOption">
75
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.options.Bundle"/>
76
            <attr name="command" stringvalue="o"/>
77
            <attr name="position" intvalue="400"/>
78
            <file name="org-netbeans-modules-options-QuickSearchProvider.instance"/>
79
        </folder>            
80
    </folder>
81
82
    
72
</filesystem>
83
</filesystem>
(-)a/options.api/src/org/netbeans/spi/options/AdvancedOption.java (-7 / +47 lines)
Lines 41-68 Link Here
41
41
42
package org.netbeans.spi.options;
42
package org.netbeans.spi.options;
43
43
44
import org.netbeans.modules.options.AdvancedOptionImpl;
45
import java.util.Map;
46
44
/**
47
/**
45
 * Implementation of this class represents one category (like "Ant"
48
 * This class represents one category (like "Ant"
46
 * or "Form Editor") in Miscellaneous Panel of Options Dialog. It should
49
 * or "Form Editor") in Miscellaneous Panel of Options Dialog. Its instances should
47
 * be registerred in layers:
50
 * be registered in layers and created by <code>createSubCategory</code> factory
51
 * method as follows:
48
 *
52
 *
49
 * <pre style="background-color: rgb(255, 255, 153);">
53
 * <pre style="background-color: rgb(255, 255, 153);">
50
 * &lt;folder name="OptionsDialog"&gt;
54
 * &lt;folder name="OptionsDialog"&gt;
51
 *     &lt;folder name="Advanced"&gt;
55
 *     &lt;folder name="Advanced"&gt;
52
 *         &lt;file name="FooAdvancedPanel.instance"&gt;
56
 *         &lt;file name="FooAdvancedPanel.instance"&gt;
53
 *             &lt;attr name="instanceClass" stringvalue="org.foo.FooAdvancedPanel"/&gt;
57
 *             &lt;attr name="instanceCreate" methodvalue="org.netbeans.spi.options.AdvancedOption.createSubCategory"/&gt;
58
 *             &lt;attr name="controller" newvalue="org.foo.ToDoOptionsController"/&gt;
59
 *             &lt;attr name="displayName" bundlevalue="org.foo.Bundle#LBL_Foo"/&gt;
60
 *             &lt;attr name="toolTip" bundlevalue="org.foo.Bundle#HINT_Foo"/&gt;
61
 *             &lt;attr name="keywords" bundlevalue="org.foo.Bundle#KW_Foo"/&gt;
62
 *             &lt;attr name="keywordsCategory" stringvalue="Advanced/FooSubTabInOptions"/&gt;
54
 *         &lt;/file&gt;
63
 *         &lt;/file&gt;
55
 *     &lt;/folder&gt;
64
 *     &lt;/folder&gt;
56
 * &lt;/folder&gt;</pre>
65
 * &lt;/folder&gt;</pre>
57
 * 
66
 *
67
 * where:
68
 * <br/><b>controller</b> should be an instance of <code>OptionsPanelController</code>
69
 * <br/><b>displayName</b> should be a pointer to Bundle where your tab displayname is stored
70
 * <br/><b>toolTip</b> should be a pointer to Bundle where your tab toolTip is stored
71
 * <br/><b>keywords</b> should be localized keywords list, separated by comma in Bundle, for quickserach purposes
72
 * <br/><b>keywordsCategory</b> should be relative path to your panel inside Options dialog
73
 * <br/><br/>
58
 * No explicit sorting recognized (may be sorted e.g. by display name).
74
 * No explicit sorting recognized (may be sorted e.g. by display name).
59
 *
75
 *
60
 * @see OptionsCategory
76
 * @see OptionsCategory
61
 * @see OptionsPanelController 
77
 * @see OptionsPanelController 
62
 * @author Jan Jancura
78
 * @author Jan Jancura
79
 * @author Max Sauer
63
 */
80
 */
64
public abstract class AdvancedOption {
81
public abstract class AdvancedOption {
65
    
82
83
    //xml entry names
84
    private static final String DISPLAYNAME = "displayName";
85
    private static final String TOOLTIP = "tooltip";
86
    private static final String KEYWORDS = "keywords";
87
    private static final String CONTROLLER = "controller";
88
    private static final String KEYWORDS_CATEGORY = "keywordsCategory";
89
66
    /**
90
    /**
67
     * Returns name of category used in Advanced Panel of 
91
     * Returns name of category used in Advanced Panel of 
68
     * Options Dialog.
92
     * Options Dialog.
Lines 77-83 Link Here
77
     * @return tooltip for this category
101
     * @return tooltip for this category
78
     */
102
     */
79
    public abstract String getTooltip ();
103
    public abstract String getTooltip ();
80
    
104
81
    /**
105
    /**
82
     * Returns {@link OptionsPanelController} for this category. PanelController 
106
     * Returns {@link OptionsPanelController} for this category. PanelController 
83
     * creates visual component to be used inside of Advanced Panel.
107
     * creates visual component to be used inside of Advanced Panel.
Lines 87-90 Link Here
87
     */
111
     */
88
    public abstract OptionsPanelController create ();
112
    public abstract OptionsPanelController create ();
89
113
114
    /**
115
     * Factory method for creating instaces of Advanced option in a declarative
116
     * way by loading necessary values from layer.xml
117
     *
118
     * @param attrs attributes defined in layer
119
     * @return instance of <code>AdvancedOption</code>
120
     */
121
    static AdvancedOption createSubCategory(Map attrs) {
122
        String displayName = (String) attrs.get(DISPLAYNAME);
123
        String tooltip = (String) attrs.get(TOOLTIP);
124
        String keywords = (String) attrs.get(KEYWORDS);
125
        OptionsPanelController controller = (OptionsPanelController) attrs.get(CONTROLLER);
126
        String keywordsCategory = (String) attrs.get(KEYWORDS_CATEGORY);
127
128
        return new AdvancedOptionImpl(controller, displayName, tooltip, keywords, keywordsCategory);
129
    }
90
}
130
}
(-)a/options.api/src/org/netbeans/spi/options/OptionsCategory.java (-21 / +72 lines)
Lines 42-62 Link Here
42
package org.netbeans.spi.options;
42
package org.netbeans.spi.options;
43
43
44
import java.awt.Image;
44
import java.awt.Image;
45
import java.util.Map;
45
import javax.swing.Icon;
46
import javax.swing.Icon;
46
import javax.swing.ImageIcon;
47
import javax.swing.ImageIcon;
48
import org.netbeans.modules.options.OptionsCategoryImpl;
47
import org.openide.util.Utilities;
49
import org.openide.util.Utilities;
48
50
49
/**
51
/**
50
 * Implementation of this class represents one category (like "Fonts & Colors"
52
 * This class represents one category (like "Fonts & Colors"
51
 * or "Editor") in Options Dialog. It should be registerred in layers:
53
 * or "Editor") in Options Dialog. Its instances should
54
 * be registered in layers and created by <code>createCategory</code> factory
55
 * method as follows:
52
 *
56
 *
53
 * <pre style="background-color: rgb(255, 255, 153);">
57
 *   <pre style="background-color: rgb(255, 255, 153);">
54
 * &lt;folder name="OptionsDialog"&gt;
58
 *   &lt;folder name="OptionsDialog"&gt;
55
 *     &lt;file name="FooOptionsPanel.instance"&gt;
59
 *       &lt;file name="General.instance"&gt;
56
 *         &lt;attr name="instanceClass" stringvalue="org.foo.FooOptionsPanel"/&gt;
60
 *           &lt;attr name="instanceCreate" methodvalue="org.netbeans.spi.options.OptionsCategory.createCategory"/&gt;
57
 *     &lt;/file&gt;
61
 *           &lt;attr name="title" bundlevalue="org.netbeans.core.ui.options.general.Bundle#CTL_General_Options_Title"/&gt;
58
 * &lt;/folder&gt;</pre>
62
 *           &lt;attr name="categoryName" bundlevalue="org.netbeans.core.ui.options.general.Bundle#CTL_General_Options"/&gt;
63
 *           &lt;attr name="iconBase" stringvalue="org/netbeans/modules/options/resources/generalOptions.png"/&gt;
64
 *           &lt;attr name="controller" newvalue="org.netbeans.core.ui.options.general.GeneralOptionsPanelController"/&gt;
65
 *           &lt;attr name="keywords" bundlevalue="org.netbeans.core.ui.options.general.Bundle#KW_General"/&gt;
66
 *           &lt;attr name="keywordsCategory" stringvalue="General"/&gt;
67
 *           &lt;attr name="description" bundlevalue="org.netbeans.core.ui.options.general.Bundle#CTL_General_Options_Description"/&gt;
59
 *
68
 *
69
 *           &lt;attr name="position" intvalue="100"/&gt;
70
 *       &lt;/file&gt;
71
 *   &lt;/folder&gt;</pre>
72
 *
73
 * where:
74
 * <br/><b>controller</b> should be an instance of <code>OptionsPanelController</code>
75
 * <br/><b>title</b> should be a pointer to Bundle where title of your tab inside OD is stored
76
 * <br/><b>categoryName</b> should be a pointer to Bundle where your tab categoryName is stored
77
 * <br/><b>iconBase</b> should be relative path to icon wou wish to display inside OD
78
 * <br/><b>keywords</b> should be localized keywords list, separated by comma in Bundle, for quickserach purposes
79
 * <br/><b>keywordsCategory</b> should be relative path to your panel inside Options dialog
80
 * <br/><b>description</b> should be a pointer to Bundle where your tab description is stored
81
 *
82
 * <br/><br/>
60
 * Use standard way how to sort items registered in layers:
83
 * Use standard way how to sort items registered in layers:
61
 * 
84
 * 
62
 * <pre style="background-color: rgb(255, 255, 153);">
85
 * <pre style="background-color: rgb(255, 255, 153);">
Lines 64-77 Link Here
64
 * </pre>
87
 * </pre>
65
 *
88
 *
66
 * @see AdvancedOption
89
 * @see AdvancedOption
67
 * @see OptionsPanelController 
90
 * @see OptionsPanelController
68
 *
91
 *
69
 * @author Jan Jancura
92
 * @author Jan Jancura
93
 * @author Max Sauer
70
 */
94
 */
71
public abstract class OptionsCategory {
95
public abstract class OptionsCategory {
72
    
96
97
    //xml entry names
98
    private static final String TITLE = "title";
99
    private static final String CATEGORY_NAME = "categoryName";
100
    private static final String ICON = "iconBase";
101
    private static final String CONTROLLER = "controller";
102
    private static final String DESCRIPTION = "description";
103
    private static final String KEYWORDS = "keywords";
104
    private static Object KEYWORDS_CATEGORY = "keywordsCategory";
105
73
    /**
106
    /**
74
     * Returns base name of 32x32 icon (gif, png) used in list on the left side of 
107
     * Returns base name of 32x32 icon (gif, png) used in list on the left side of
75
     * Options Dialog. See {@link AbstractNode#setIconBase} method for more info.
108
     * Options Dialog. See {@link AbstractNode#setIconBase} method for more info.
76
     *
109
     *
77
     * @deprecated  This method will not be a part of NB50! Use
110
     * @deprecated  This method will not be a part of NB50! Use
Lines 83-89 Link Here
83
    }
116
    }
84
    
117
    
85
    /**
118
    /**
86
     * Returns 32x32 icon used in list on the left side of 
119
     * Returns 32x32 icon used in list on the top of
87
     * Options Dialog.
120
     * Options Dialog.
88
     *
121
     *
89
     * @return 32x32 icon
122
     * @return 32x32 icon
Lines 94-109 Link Here
94
        image = Utilities.loadImage (getIconBase () + ".gif");
127
        image = Utilities.loadImage (getIconBase () + ".gif");
95
        if (image == null) return null;
128
        if (image == null) return null;
96
        return new ImageIcon (image);
129
        return new ImageIcon (image);
97
    }
130
        }
98
    
131
99
    /**
132
    /**
100
     * Returns name of category used in list on the left side of 
133
     * Returns name of category used in list on the top side of
101
     * Options Dialog.
134
     * Options Dialog.
102
     *
135
     *
103
     * @return name of category
136
     * @return name of category
104
     */
137
     */
105
    public abstract String getCategoryName ();
138
    public abstract String getCategoryName ();
106
    
139
107
    /**
140
    /**
108
     * This text will be used in title component on the top of Options Dialog
141
     * This text will be used in title component on the top of Options Dialog
109
     * when your panel will be selected.
142
     * when your panel will be selected.
Lines 111-126 Link Here
111
     * @return title of this panel
144
     * @return title of this panel
112
     */
145
     */
113
    public abstract String getTitle ();
146
    public abstract String getTitle ();
114
    
147
115
    /**
148
    /**
116
     * Returns new {@link OptionsPanelController} for this category. PanelController 
149
     * Returns new {@link OptionsPanelController} for this category. PanelController
117
     * creates visual component to be used inside of the Options Dialog.
150
     * creates visual component to be used inside of the Options Dialog.
118
     * You should not do any time-consuming operations inside 
151
     * You should not do any time-consuming operations inside
119
     * the constructor, because it blocks initialization of OptionsDialog. 
152
     * the constructor, because it blocks initialization of OptionsDialog.
120
     * Initialization should be implemented in update method.
153
     * Initialization should be implemented in update method.
121
     *
154
     *
122
     * @return new instance of PanelController for this options category
155
     * @return new instance of PanelController for this options category
123
     */
156
     */
124
    public abstract OptionsPanelController create ();
157
    public abstract OptionsPanelController create ();
125
    
158
159
    /**
160
     * Creates instance of <code>OptionsCategory</code> based on layer.xml
161
     * attribute values
162
     *
163
     * @param attrs attributes loaded from layer.xml
164
     * @return new <code>OptionsCategory</code> instance
165
     */
166
    static OptionsCategory createCategory(Map attrs) {
167
        String title = (String) attrs.get(TITLE);
168
        String categoryName = (String) attrs.get(CATEGORY_NAME);
169
        String iconBase = (String) attrs.get(ICON);
170
        OptionsPanelController controller = (OptionsPanelController) attrs.get(CONTROLLER);
171
        String description = (String) attrs.get(DESCRIPTION);
172
        String keywords = (String) attrs.get(KEYWORDS);
173
        String keywordsCategory = (String) attrs.get(KEYWORDS_CATEGORY);
174
175
        return new OptionsCategoryImpl(title, categoryName, iconBase, controller, description, keywords, keywordsCategory);
176
    }
126
}
177
}
(-)a/tasklist.todo/src/org/netbeans/modules/tasklist/todo/layer.xml (-1 / +7 lines)
Lines 30-36 Link Here
30
        <folder name="Advanced">
30
        <folder name="Advanced">
31
            <attr name="position" intvalue="0"/>
31
            <attr name="position" intvalue="0"/>
32
            <file name="ToDo.instance">
32
            <file name="ToDo.instance">
33
                <attr name="instanceClass" stringvalue="org.netbeans.modules.tasklist.todo.settings.ToDoOptions"/>
33
                <attr name="instanceCreate" methodvalue="org.netbeans.spi.options.AdvancedOption.createSubCategory"/>
34
35
                <attr name="controller" newvalue="org.netbeans.modules.tasklist.todo.settings.ToDoOptionsController"/>
36
                <attr name="displayName" bundlevalue="org.netbeans.modules.tasklist.todo.settings.Bundle#LBL_Options"/>
37
                <attr name="toolTip" bundlevalue="org.netbeans.modules.tasklist.todo.settings.Bundle#HINT_Options"/>
38
                <attr name="keywords" bundlevalue="org.netbeans.modules.tasklist.todo.settings.Bundle#KW_ToDo"/>
39
                <attr name="keywordsCategory" stringvalue="Advanced/ToDo"/>
34
            </file>
40
            </file>
35
        </folder>
41
        </folder>
36
   </folder>
42
   </folder>
(-)a/tasklist.todo/src/org/netbeans/modules/tasklist/todo/settings/Bundle.properties (-1 / +3 lines)
Lines 9-12 Link Here
9
ToDoCustomizer.btnChange.text=&Edit
9
ToDoCustomizer.btnChange.text=&Edit
10
10
11
LBL_Options=ToDo Tasks
11
LBL_Options=ToDo Tasks
12
HINT_Options=Options for ToDo tasks in Task List window.
12
HINT_Options=Options for ToDo tasks in Task List window.
13
14
KW_ToDo=ToDo,@todo,FIXME,PENDING
(-)a/tasklist.todo/src/org/netbeans/modules/tasklist/todo/settings/ToDoOptions.java (-66 lines)
Removed Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * Contributor(s):
25
 *
26
 * The Original Software is NetBeans. The Initial Developer of the Original
27
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
28
 * Microsystems, Inc. All Rights Reserved.
29
 *
30
 * If you wish your version of this file to be governed by only the CDDL
31
 * or only the GPL Version 2, indicate your decision by adding
32
 * "[Contributor] elects to include this software in this distribution
33
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
34
 * single choice of license, a recipient has the option to distribute
35
 * your version of this file under either the CDDL, the GPL Version 2 or
36
 * to extend the choice of license to its licensees as provided above.
37
 * However, if you add GPL Version 2 code and therefore, elected the GPL
38
 * Version 2 license, then the option applies only if the new code is
39
 * made subject to such option by the copyright holder.
40
 */
41
42
package org.netbeans.modules.tasklist.todo.settings;
43
44
import org.netbeans.spi.options.AdvancedOption;
45
import org.netbeans.spi.options.OptionsPanelController;
46
import org.openide.util.NbBundle;
47
48
/**
49
 *
50
 * @author S. Aubrecht
51
 */
52
public class ToDoOptions extends AdvancedOption {
53
    
54
    public String getDisplayName() {
55
        return NbBundle.getMessage( ToDoOptions.class, "LBL_Options" ); //NOI18N
56
    }
57
58
    public String getTooltip() {
59
        return NbBundle.getMessage( ToDoOptions.class, "HINT_Options" ); //NOI18N
60
    }
61
62
    public OptionsPanelController create() {
63
        return new ToDoOptionsController();
64
    }
65
    
66
}

Return to bug 137338