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 (+3 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
# QuickSearch keywords for Mark Occurrences Panel
43
KW_Mark=Mark Occurrences
41
44
42
PROP_completionCaseSensitive=Case Sensitive Code Completion
45
PROP_completionCaseSensitive=Case Sensitive Code Completion
43
HINT_completionCaseSensitive=If True, the completion query search will be case sensitive
46
HINT_completionCaseSensitive=If True, the completion query search will be case sensitive
(-)a/java.editor/src/org/netbeans/modules/java/editor/options/MarkOccurencesAdvancedOption.java (-73 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-2007 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.java.editor.options;
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 Petr Hrebejk
51
 */
52
public class MarkOccurencesAdvancedOption extends AdvancedOption {
53
54
    OptionsPanelController panelController;
55
    
56
    public String getDisplayName() {
57
        return NbBundle.getMessage(MarkOccurencesAdvancedOption.class, "CTL_MarkOccurences_DisplayName"); // NOI18N
58
    }
59
60
    public String getTooltip() {
61
        return NbBundle.getMessage(MarkOccurencesAdvancedOption.class, "CTL_MarkOccurences_ToolTip"); // NOI18N
62
    }
63
64
    public synchronized OptionsPanelController create() {
65
        
66
        if ( panelController == null ) {
67
            panelController = new MarkOccurencesOptionsPanelController();
68
        }
69
        
70
        return panelController;
71
    }
72
73
}
(-)a/java.editor/src/org/netbeans/modules/java/editor/options/MarkOccurencesOptionsPanelController.java (-6 / +2 lines)
Lines 42-57 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.prefs.Preferences;
46
import javax.swing.JComponent;
45
import javax.swing.JComponent;
47
import org.netbeans.spi.options.OptionsPanelController;
46
import org.netbeans.spi.options.OptionsPanelController;
48
import org.openide.util.HelpCtx;
47
import org.openide.util.HelpCtx;
49
import org.openide.util.Lookup;
48
import org.openide.util.Lookup;
50
import org.openide.util.NbPreferences;
51
49
52
final class MarkOccurencesOptionsPanelController extends OptionsPanelController {
50
public final class MarkOccurencesOptionsPanelController extends OptionsPanelController {
53
    
54
    private Preferences node;
55
    
51
    
56
    private MarkOccurencesPanel panel;
52
    private MarkOccurencesPanel panel;
57
    
53
    
Lines 104-108 Link Here
104
	}
100
	}
105
	pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
101
	pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
106
    }
102
    }
107
   
103
    
108
}
104
}
(-)a/java.editor/src/org/netbeans/modules/java/editor/resources/layer.xml (-2 / +23 lines)
Lines 329-343 Link Here
329
                <file name="x-java" url="JavaExample"/>
329
                <file name="x-java" url="JavaExample"/>
330
            </folder>
330
            </folder>
331
        </folder>
331
        </folder>
332
        <folder name="JavaOptions">
333
            <file name="MarkOccurences.instance">
334
              <attr name="Formating.instance/MarkOccurences.instance" boolvalue="true"/>
335
              <attr name="instanceCreate" methodvalue="org.netbeans.spi.options.AdvancedOption.createSubCategory"/>
336
              <attr name="controller" newvalue="org.netbeans.modules.java.editor.options.MarkOccurencesOptionsPanelController"/>
337
              <attr name="displayName" bundlevalue="org.netbeans.modules.java.editor.options.Bundle#CTL_MarkOccurences_DisplayName"/>
338
              <attr name="toolTip" bundlevalue="org.netbeans.modules.java.editor.options.Bundle#CTL_MarkOccurences_ToolTip"/>
339
              <attr name="keywords" bundlevalue="org.netbeans.modules.java.editor.options.Bundle#KW_Mark"/>
340
              <attr name="keywordsCategory" stringvalue="JavaOptions/MarkOccurences"/>
341
          </file>
342
        </folder>
332
    </folder>
343
    </folder>
333
    
344
345
    <!--
334
    <folder name="org.netbeans.modules.java.source">
346
    <folder name="org.netbeans.modules.java.source">
335
      <folder name="options">
347
      <folder name="options">
336
          <file name="MarkOccurences.instance">
348
          <file name="MarkOccurences.instance">
337
              <attr name="Formating.instance/MarkOccurences.instance" boolvalue="true"/>
349
              <attr name="Formating.instance/MarkOccurences.instance" boolvalue="true"/>
338
              <attr name="instanceClass" stringvalue="org.netbeans.modules.java.editor.options.MarkOccurencesAdvancedOption"/>              
350
351
              <attr name="instanceCreate" methodvalue="org.netbeans.spi.options.AdvancedOption.createSubCategory"/>
352
353
              <attr name="controller" newvalue="org.netbeans.modules.java.editor.options.MarkOccurencesOptionsPanelController"/>
354
              <attr name="displayName" bundlevalue="org.netbeans.modules.java.editor.options.Bundle#CTL_MarkOccurences_DisplayName"/>
355
              <attr name="toolTip" bundlevalue="org.netbeans.modules.java.editor.options.Bundle#CTL_MarkOccurences_ToolTip"/>
356
              <attr name="keywords" bundlevalue="org.netbeans.modules.java.editor.options.Bundle#KW_Mark"/>
357
              <attr name="keywordsCategory" stringvalue="JavaOptions/MarkOccurences"/>
358
339
          </file>
359
          </file>
340
      </folder>
360
      </folder>
341
  </folder>
361
  </folder>
362
  -->
342
    
363
    
343
</filesystem>
364
</filesystem>
(-)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/HintsAdvancedOption.java (-56 lines)
Removed Link Here
1
/*
2
 *                 Sun Public License Notice
3
 *
4
 * The contents of this file are subject to the Sun Public License
5
 * Version 1.0 (the "License"). You may not use this file except in
6
 * compliance with the License. A copy of the License is available at
7
 * http://www.sun.com/
8
 *
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun
11
 * Microsystems, Inc. All Rights Reserved.
12
13
If you wish your version of this file to be governed by only the CDDL
14
or only the GPL Version 2, indicate your decision by adding
15
"[Contributor] elects to include this software in this distribution
16
under the [CDDL or GPL Version 2] license." If you do not indicate a
17
single choice of license, a recipient has the option to distribute
18
your version of this file under either the CDDL, the GPL Version 2 or
19
to extend the choice of license to its licensees as provided above.
20
However, if you add GPL Version 2 code and therefore, elected the GPL
21
Version 2 license, then the option applies only if the new code is
22
made subject to such option by the copyright holder.
23
 */
24
25
package org.netbeans.modules.java.hints.options;
26
27
import org.netbeans.spi.options.AdvancedOption;
28
import org.netbeans.spi.options.OptionsPanelController;
29
import org.openide.util.NbBundle;
30
31
/**
32
 *
33
 * @author phrebejk
34
 */
35
public class HintsAdvancedOption extends AdvancedOption {
36
37
    OptionsPanelController panelController;
38
39
    public String getDisplayName() {
40
        return NbBundle.getMessage(HintsAdvancedOption.class, "CTL_Hints_DisplayName"); // NOI18N
41
    }
42
43
    public String getTooltip() {
44
        return NbBundle.getMessage(HintsAdvancedOption.class, "CTL_Hints_ToolTip"); // NOI18N
45
    }
46
47
    public synchronized OptionsPanelController create() {
48
        
49
        if ( panelController == null ) {
50
            panelController = new HintsOptionsPanelController();
51
        }
52
        
53
        return panelController;
54
    }
55
56
}
(-)a/java.hints/src/org/netbeans/modules/java/hints/options/HintsOptionsPanelController.java (-1 / +1 lines)
Lines 47-53 Link Here
47
import org.openide.util.HelpCtx;
47
import org.openide.util.HelpCtx;
48
import org.openide.util.Lookup;
48
import org.openide.util.Lookup;
49
49
50
final class HintsOptionsPanelController extends OptionsPanelController {
50
public final class HintsOptionsPanelController extends OptionsPanelController {
51
    
51
    
52
    private HintsPanel panel;
52
    private HintsPanel panel;
53
    
53
    
(-)a/java.hints/src/org/netbeans/modules/java/hints/resources/layer.xml (-3 / +8 lines)
Lines 265-274 Link Here
265
        
265
        
266
    </folder>
266
    </folder>
267
    
267
    
268
    <folder name="org.netbeans.modules.java.source">
268
    <folder name="OptionsDialog">
269
      <folder name="options">
269
      <folder name="JavaOptions">
270
          <file name="Hints.instance">
270
          <file name="Hints.instance">
271
              <attr name="instanceClass" stringvalue="org.netbeans.modules.java.hints.options.HintsAdvancedOption"/>
271
              <attr name="instanceCreate" methodvalue="org.netbeans.spi.options.AdvancedOption.createSubCategory"/>
272
              <attr name="controller" newvalue="org.netbeans.modules.java.hints.options.HintsOptionsPanelController"/>
273
              <attr name="displayName" bundlevalue="org.netbeans.modules.java.hints.options.Bundle#CTL_Hints_DisplayName"/>
274
              <attr name="toolTip" bundlevalue="org.netbeans.modules.java.hints.options.Bundle#CTL_Hints_ToolTip"/>
275
              <attr name="keywords" bundlevalue="org.netbeans.modules.java.hints.options.Bundle#KW_Hints"/>
276
              <attr name="keywordsCategory" stringvalue="JavaOptions/Hints"/>
272
          </file>
277
          </file>
273
      </folder>
278
      </folder>
274
  </folder>
279
  </folder>
(-)a/java.source/src/org/netbeans/modules/java/source/resources/layer.xml (-19 / +29 lines)
Lines 164-176 Link Here
164
  </folder>
164
  </folder>
165
165
166
  <folder name="OptionsDialog">
166
  <folder name="OptionsDialog">
167
      
167
      <file name="JavaOptions.instance">
168
     <file name="JavaOptions.instance">
168
          <attr name="instanceCreate" methodvalue="org.netbeans.spi.options.OptionsCategory.createCategory"/>
169
             <attr name="instanceClass" stringvalue="org.netbeans.modules.java.ui.JavaOptionsCategory"/>
169
          <attr name="title" bundlevalue="org.netbeans.modules.java.ui.Bundle#OptionsCategory_Title"/>
170
             <attr name="position" intvalue="300"/>
170
          <attr name="categoryName" bundlevalue="org.netbeans.modules.java.ui.Bundle#OptionsCategory_Name"/>
171
        </file>    
171
          <attr name="iconBase" stringvalue="org/netbeans/modules/java/source/resources/icons/JavaOptions_32.png"/>
172
          
172
          <attr name="controller" newvalue="org.netbeans.modules.java.ui.JavaOptionsPanelController"/>
173
      
173
          <attr name="keywords" bundlevalue="org.netbeans.modules.java.ui.Bundle#KW_JavaOptions"/>
174
          <attr name="keywordsCategory" stringvalue="JavaOptions"/>
175
176
          <attr name="position" intvalue="300"/>
177
      </file>
178
      <folder name="JavaOptions">
179
          <file name="Formating.instance">
180
              <attr name="instanceCreate" methodvalue="org.netbeans.spi.options.AdvancedOption.createSubCategory"/>
181
              <attr name="controller" newvalue="org.netbeans.modules.java.ui.FormatingOptionsPanelController"/>
182
              <attr name="displayName" bundlevalue="org.netbeans.modules.java.ui.Bundle#CTL_Formating_DisplayName"/>
183
              <attr name="toolTip" bundlevalue="org.netbeans.modules.java.ui.Bundle#CTL_Formating_ToolTip"/>
184
              <attr name="keywords" bundlevalue="org.netbeans.modules.java.ui.Bundle#KW_Formatting"/>
185
              <attr name="keywordsCategory" stringvalue="JavaOptions/Formating"/>
186
          </file>
187
          <file name="Tasklist.instance">
188
              <attr name="instanceCreate" methodvalue="org.netbeans.spi.options.AdvancedOption.createSubCategory"/>
189
              <attr name="controller" newvalue="org.netbeans.modules.java.source.tasklist.TaskListOptionsPanelController"/>
190
              <attr name="displayName" bundlevalue="org.netbeans.modules.java.source.tasklist.Bundle#DN_Tasklist"/>
191
              <attr name="toolTip" bundlevalue="org.netbeans.modules.java.source.tasklist.Bundle#TP_Tasklist"/>
192
              <attr name="keywords" bundlevalue="org.netbeans.modules.java.source.tasklist.Bundle#KW_TaskList"/>
193
              <attr name="keywordsCategory" stringvalue="JavaOptions/Tasklist"/>
194
          </file>
195
      </folder>
174
  </folder>
196
  </folder>
175
 
197
 
176
  <folder name="Services">    
198
  <folder name="Services">    
Lines 180-197 Link Here
180
        </file>
202
        </file>
181
    </folder>
203
    </folder>
182
  </folder>
204
  </folder>
183
  
184
  <folder name="org.netbeans.modules.java.source">
185
      <folder name="options">
186
          <file name="Formating.instance">
187
              <attr name="instanceClass" stringvalue="org.netbeans.modules.java.ui.FormatingAdvancedOption"/>
188
          </file>
189
          <file name="Tasklist.instance">
190
              <attr name="instanceClass" stringvalue="org.netbeans.modules.java.source.tasklist.TasklistOptions"/>
191
          </file>
192
      </folder>
193
  </folder>
194
195
  
205
  
196
    <folder name="TaskList">
206
    <folder name="TaskList">
197
        <folder name="Scanners">
207
        <folder name="Scanners">
(-)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
(-)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
package org.netbeans.modules.java.source.tasklist;
40
41
import java.beans.PropertyChangeListener;
42
import java.beans.PropertyChangeSupport;
43
import javax.swing.JComponent;
44
import javax.swing.SwingUtilities;
45
import javax.swing.event.ChangeEvent;
46
import javax.swing.event.ChangeListener;
47
import org.netbeans.spi.options.OptionsPanelController;
48
import org.openide.util.HelpCtx;
49
import org.openide.util.Lookup;
50
51
/**
52
 * OptionsPanelController for JavaOptions/Tasklist options subcategory
53
 * 
54
 * @author Max Sauer
55
 */
56
public class TaskListOptionsPanelController extends OptionsPanelController implements ChangeListener {
57
58
    private TasklistOptionsPanel panel;
59
    private PropertyChangeSupport pcs = new PropertyChangeSupport(this);
60
61
    public void update() {
62
        assert SwingUtilities.isEventDispatchThread();
63
        if (panel == null) {
64
            getComponent(null);//XXX: should not happen
65
        }
66
67
        panel.setDependenciesEnabled(TasklistSettings.isDependencyTrackingEnabled());
68
        panel.setBadgesEnabled(TasklistSettings.isBadgesEnabled());
69
        panel.setTasklistEnabled(TasklistSettings.isTasklistEnabled());
70
71
    }
72
73
    public void applyChanges() {
74
        if (panel == null) {
75
            return;
76
        }
77
78
        TasklistSettings.setTasklistsEnabled(panel.getTasklistEnabled());
79
        TasklistSettings.setDependencyTrackingEnabled(panel.getDependenciesEnabled());
80
        TasklistSettings.setBadgesEnabled(panel.getBadgesEnabled());
81
82
    }
83
84
    public void cancel() {
85
        if (panel == null) {
86
            return;
87
        }
88
        panel.setTasklistEnabled(TasklistSettings.isTasklistEnabled());
89
        panel.setDependenciesEnabled(TasklistSettings.isDependencyTrackingEnabled());
90
        panel.setBadgesEnabled(TasklistSettings.isBadgesEnabled());
91
    }
92
93
    public boolean isValid() {
94
        return true;
95
    }
96
97
    public boolean isChanged() {
98
        if (panel == null) {
99
            return false;
100
        }
101
102
        return TasklistSettings.isTasklistEnabled() != panel.getTasklistEnabled() || TasklistSettings.isDependencyTrackingEnabled() != panel.getDependenciesEnabled() || TasklistSettings.isBadgesEnabled() != panel.getBadgesEnabled();
103
    }
104
105
    public JComponent getComponent(Lookup masterLookup) {
106
        if (panel == null) {
107
            panel = new TasklistOptionsPanel();
108
            panel.addChangeListener(this);
109
        }
110
        return panel;
111
    }
112
113
    public HelpCtx getHelpCtx() {
114
        return new HelpCtx("netbeans.optionsDialog.java.tasklist");
115
    }
116
117
    public void addPropertyChangeListener(PropertyChangeListener l) {
118
        pcs.addPropertyChangeListener(l);
119
    }
120
121
    public void removePropertyChangeListener(PropertyChangeListener l) {
122
        pcs.removePropertyChangeListener(l);
123
    }
124
125
    public void stateChanged(ChangeEvent e) {
126
        pcs.firePropertyChange(PROP_CHANGED, null, null);
127
    }
128
}
(-)a/java.source/src/org/netbeans/modules/java/source/tasklist/TasklistOptions.java (-149 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-2007 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
package org.netbeans.modules.java.source.tasklist;
42
43
import java.beans.PropertyChangeListener;
44
import java.beans.PropertyChangeSupport;
45
import javax.swing.JComponent;
46
import javax.swing.SwingUtilities;
47
import javax.swing.event.ChangeEvent;
48
import javax.swing.event.ChangeListener;
49
import org.netbeans.spi.options.AdvancedOption;
50
import org.netbeans.spi.options.OptionsPanelController;
51
import org.openide.util.HelpCtx;
52
import org.openide.util.Lookup;
53
import org.openide.util.NbBundle;
54
55
/**
56
 *
57
 * @author Jan Lahoda
58
 */
59
public class TasklistOptions extends AdvancedOption {
60
61
    public TasklistOptions() {
62
    }
63
64
    public String getDisplayName() {
65
        return NbBundle.getMessage(TasklistOptions.class, "DN_Tasklist");// "Java Tasklist - Temporary settings";
66
    }
67
68
    public String getTooltip() {
69
        return NbBundle.getMessage(TasklistOptions.class, "TP_Tasklist");// "Java Tasklist - Temporary settings";
70
    }
71
72
    public OptionsPanelController create() {
73
        return new TasklistOptionsPanelController();
74
    }
75
76
    private static class TasklistOptionsPanelController extends OptionsPanelController implements ChangeListener {
77
78
        private TasklistOptionsPanel panel;
79
        private PropertyChangeSupport pcs = new PropertyChangeSupport(this);
80
        
81
        public void update() {
82
            assert SwingUtilities.isEventDispatchThread();
83
            if (panel == null) {
84
                getComponent(null);//XXX: should not happen
85
            }
86
            
87
            panel.setDependenciesEnabled(TasklistSettings.isDependencyTrackingEnabled());
88
            panel.setBadgesEnabled(TasklistSettings.isBadgesEnabled());
89
            panel.setTasklistEnabled(TasklistSettings.isTasklistEnabled());
90
            
91
        }
92
93
        public void applyChanges() {
94
            if (panel == null)
95
                return ;
96
            
97
            TasklistSettings.setTasklistsEnabled(panel.getTasklistEnabled());
98
            TasklistSettings.setDependencyTrackingEnabled(panel.getDependenciesEnabled());
99
            TasklistSettings.setBadgesEnabled(panel.getBadgesEnabled());
100
            
101
        }
102
103
        public void cancel() {
104
            if (panel == null)
105
                return ;
106
            panel.setTasklistEnabled(TasklistSettings.isTasklistEnabled());
107
            panel.setDependenciesEnabled(TasklistSettings.isDependencyTrackingEnabled());
108
            panel.setBadgesEnabled(TasklistSettings.isBadgesEnabled());
109
        }
110
111
        public boolean isValid() {
112
            return true;
113
        }
114
115
        public boolean isChanged() {
116
            if (panel == null)
117
                return false;
118
119
            return    TasklistSettings.isTasklistEnabled() != panel.getTasklistEnabled()
120
                   || TasklistSettings.isDependencyTrackingEnabled() != panel.getDependenciesEnabled()
121
                   || TasklistSettings.isBadgesEnabled() != panel.getBadgesEnabled();
122
        }
123
124
        public JComponent getComponent(Lookup masterLookup) {
125
            if (panel == null) {
126
                panel = new TasklistOptionsPanel();
127
                panel.addChangeListener(this);
128
            }
129
            return panel;
130
        }
131
132
        public HelpCtx getHelpCtx() {
133
            return new HelpCtx("netbeans.optionsDialog.java.tasklist");
134
        }
135
136
        public void addPropertyChangeListener(PropertyChangeListener l) {
137
            pcs.addPropertyChangeListener(l);
138
        }
139
140
        public void removePropertyChangeListener(PropertyChangeListener l) {
141
            pcs.removePropertyChangeListener(l);
142
        }
143
144
        public void stateChanged(ChangeEvent e) {
145
            pcs.firePropertyChange(PROP_CHANGED, null, null);
146
        }
147
        
148
    }
149
}
(-)a/java.source/src/org/netbeans/modules/java/ui/Bundle.properties (+3 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
44
KW_JavaOptions=Java Options
42
45
43
CTL_Formating_DisplayName=Formatting
46
CTL_Formating_DisplayName=Formatting
44
CTL_Formating_ToolTip=Java Code Formatting Options
47
CTL_Formating_ToolTip=Java Code Formatting Options
(-)a/java.source/src/org/netbeans/modules/java/ui/FormatingAdvancedOption.java (-73 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.java.ui;
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 phrebejk
51
 */
52
public class FormatingAdvancedOption extends AdvancedOption {
53
54
    OptionsPanelController panelController;
55
    
56
    public String getDisplayName() {
57
        return NbBundle.getMessage(FormatingAdvancedOption.class, "CTL_Formating_DisplayName"); // NOI18N
58
    }
59
60
    public String getTooltip() {
61
        return NbBundle.getMessage(FormatingAdvancedOption.class, "CTL_Formating_ToolTip"); // NOI18N
62
    }
63
64
    public synchronized OptionsPanelController create() {
65
        
66
        if ( panelController == null ) {
67
            panelController = new FormatingOptionsPanelController();
68
        }
69
        
70
        return panelController;
71
    }
72
73
}
(-)a/java.source/src/org/netbeans/modules/java/ui/FormatingOptionsPanelController.java (-2 / +2 lines)
Lines 50-63 Link Here
50
import org.openide.util.HelpCtx;
50
import org.openide.util.HelpCtx;
51
import org.openide.util.Lookup;
51
import org.openide.util.Lookup;
52
52
53
final class FormatingOptionsPanelController extends OptionsPanelController {
53
public final class FormatingOptionsPanelController extends OptionsPanelController {
54
    
54
    
55
    FormatingOptionsPanel panel;
55
    FormatingOptionsPanel panel;
56
    Preferences preferences;
56
    Preferences preferences;
57
    
57
    
58
    private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
58
    private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
59
    private boolean changed;
59
    private boolean changed;
60
                    
60
61
    public void update() {
61
    public void update() {
62
        changed = false;
62
        changed = false;
63
	panel.load(null);
63
	panel.load(null);
(-)a/java.source/src/org/netbeans/modules/java/ui/JavaOptionsCategory.java (-72 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.java.ui;
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
 * Defines a new options category in the IDE's options dialog.
53
 */
54
public final class JavaOptionsCategory extends OptionsCategory {
55
56
    public Icon getIcon() {
57
	return new ImageIcon(Utilities.loadImage("org/netbeans/modules/java/source/resources/icons/JavaOptions_32.png"));
58
    }
59
    
60
    public String getCategoryName() {
61
	return NbBundle.getMessage(JavaOptionsCategory.class, "OptionsCategory_Name");
62
    }
63
    
64
    public String getTitle() {
65
	return NbBundle.getMessage(JavaOptionsCategory.class, "OptionsCategory_Title");
66
    }
67
    
68
    public OptionsPanelController create() {
69
	return new JavaOptionsPanelController();
70
    }
71
}
72
(-)a/java.source/src/org/netbeans/modules/java/ui/JavaOptionsPanelController.java (-3 / +3 lines)
Lines 61-69 Link Here
61
import org.openide.util.HelpCtx;
61
import org.openide.util.HelpCtx;
62
import org.openide.util.Lookup;
62
import org.openide.util.Lookup;
63
63
64
final class JavaOptionsPanelController extends OptionsPanelController {
64
public final class JavaOptionsPanelController extends OptionsPanelController {
65
    
65
    
66
    private static final String TAB_FOLDER = "org.netbeans.modules.java.source/options/";
66
    private static final String TAB_FOLDER = "OptionsDialog/JavaOptions"; //NOI18N
67
    
67
    
68
    private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
68
    private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
69
    
69
    
Lines 76-82 Link Here
76
    public JavaOptionsPanelController() {
76
    public JavaOptionsPanelController() {
77
        readPanels();
77
        readPanels();
78
    }
78
    }
79
            
79
80
    public void update() {
80
    public void update() {
81
        for (OptionsPanelController c : getControllers()) {
81
        for (OptionsPanelController c : getControllers()) {
82
            c.update();
82
            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 / +86 lines)
Lines 41-52 Link Here
41
41
42
package org.netbeans.modules.options;
42
package org.netbeans.modules.options;
43
43
44
import java.awt.image.LookupTable;
44
import java.beans.PropertyChangeListener;
45
import java.beans.PropertyChangeListener;
45
import java.lang.ref.Reference;
46
import java.lang.ref.Reference;
46
import java.lang.ref.WeakReference;
47
import java.lang.ref.WeakReference;
47
import java.util.ArrayList;
48
import java.util.ArrayList;
48
import java.util.Arrays;
49
import java.util.Arrays;
49
import java.util.Collections;
50
import java.util.Collections;
51
import java.util.HashMap;
50
import java.util.Iterator;
52
import java.util.Iterator;
51
import java.util.LinkedHashMap;
53
import java.util.LinkedHashMap;
52
import java.util.List;
54
import java.util.List;
Lines 54-63 Link Here
54
import java.util.Set;
56
import java.util.Set;
55
import javax.swing.Icon;
57
import javax.swing.Icon;
56
import javax.swing.JComponent;
58
import javax.swing.JComponent;
59
import org.netbeans.spi.options.AdvancedOption;
57
import org.netbeans.spi.options.OptionsCategory;
60
import org.netbeans.spi.options.OptionsCategory;
58
import org.netbeans.spi.options.OptionsPanelController;
61
import org.netbeans.spi.options.OptionsPanelController;
59
import org.openide.util.HelpCtx;
62
import org.openide.util.HelpCtx;
60
import org.openide.util.Lookup;
63
import org.openide.util.Lookup;
64
import org.openide.util.Lookup.Item;
65
import org.openide.util.Lookup.Result;
61
import org.openide.util.LookupEvent;
66
import org.openide.util.LookupEvent;
62
import org.openide.util.LookupListener;
67
import org.openide.util.LookupListener;
63
import org.openide.util.RequestProcessor;
68
import org.openide.util.RequestProcessor;
Lines 69-81 Link Here
69
 */
74
 */
70
public final class CategoryModel implements LookupListener {
75
public final class CategoryModel implements LookupListener {
71
    private static Reference<CategoryModel> INSTANCE = new WeakReference<CategoryModel>(new CategoryModel());
76
    private static Reference<CategoryModel> INSTANCE = new WeakReference<CategoryModel>(new CategoryModel());
72
    private final RequestProcessor RP = new RequestProcessor();    
77
    private final RequestProcessor RP = new RequestProcessor();
73
    private static String currentCategoryID = null;
78
    private static String currentCategoryID = null;
74
    private String highlitedCategoryID = null;    
79
    private String highlitedCategoryID = null;
75
    private boolean categoriesValid = true;
80
    private boolean categoriesValid = true;
76
    private final Map<String, CategoryModel.Category> id2Category = 
81
    private final Map<String, CategoryModel.Category> id2Category =
77
            Collections.synchronizedMap(new LinkedHashMap<String, CategoryModel.Category>());
82
            Collections.synchronizedMap(new LinkedHashMap<String, CategoryModel.Category>());
78
    private MasterLookup masterLookup;
83
    private MasterLookup masterLookup;
84
85
    Set<Map.Entry<String, CategoryModel.Category>> getCategories() {
86
        return id2Category.entrySet();
87
    }
88
79
    private final RequestProcessor.Task masterLookupTask = RP.create(new Runnable() {
89
    private final RequestProcessor.Task masterLookupTask = RP.create(new Runnable() {
80
        public void run() {
90
        public void run() {
81
            String[] categoryIDs = getCategoryIDs();
91
            String[] categoryIDs = getCategoryIDs();
Lines 93-99 Link Here
93
    },true);
103
    },true);
94
    private final RequestProcessor.Task categoryTask = RP.create(new Runnable() {
104
    private final RequestProcessor.Task categoryTask = RP.create(new Runnable() {
95
        public void run() {
105
        public void run() {
96
            Map<String, OptionsCategory> all = loadOptionsCategories();       
106
            Map<String, OptionsCategory> all = loadOptionsCategories();
97
            Map<String, CategoryModel.Category> temp = new LinkedHashMap<String, CategoryModel.Category>();
107
            Map<String, CategoryModel.Category> temp = new LinkedHashMap<String, CategoryModel.Category>();
98
            for (Iterator<Map.Entry<String, OptionsCategory>> it = all.entrySet().iterator(); it.hasNext();) {
108
            for (Iterator<Map.Entry<String, OptionsCategory>> it = all.entrySet().iterator(); it.hasNext();) {
99
                Map.Entry<String, OptionsCategory> entry = it.next();
109
                Map.Entry<String, OptionsCategory> entry = it.next();
Lines 107-117 Link Here
107
            masterLookupTask.schedule(0);
117
            masterLookupTask.schedule(0);
108
        }
118
        }
109
    },true);
119
    },true);
110
    
120
111
    private CategoryModel() {
121
    private CategoryModel() {
112
        categoryTask.schedule(0);
122
        categoryTask.schedule(0);
113
    }
123
    }
114
        
124
115
    public static CategoryModel getInstance() {
125
    public static CategoryModel getInstance() {
116
        CategoryModel retval = INSTANCE.get();
126
        CategoryModel retval = INSTANCE.get();
117
        if (retval == null) {
127
        if (retval == null) {
Lines 120-158 Link Here
120
        }
130
        }
121
        return retval;
131
        return retval;
122
    }
132
    }
123
    
133
124
    boolean needsReinit() {
134
    boolean needsReinit() {
125
        synchronized(CategoryModel.class) {
135
        synchronized(CategoryModel.class) {
126
            return !categoriesValid;
136
            return !categoriesValid;
127
        }                
137
        }
128
    }
138
    }
129
    
139
130
    boolean isInitialized() {
140
    boolean isInitialized() {
131
        return categoryTask.isFinished();
141
        return categoryTask.isFinished();
132
    }
142
    }
133
    
143
134
    boolean isLookupInitialized() {
144
    boolean isLookupInitialized() {
135
        return masterLookupTask.isFinished();
145
        return masterLookupTask.isFinished();
136
    }
146
    }
137
    
147
138
    
148
139
    void waitForInitialization() {
149
    void waitForInitialization() {
140
        categoryTask.waitFinished();
150
        categoryTask.waitFinished();
141
    }
151
    }
142
        
152
143
    public String getCurrentCategoryID() {
153
    public String getCurrentCategoryID() {
144
        return verifyCategoryID(currentCategoryID);
154
        return verifyCategoryID(currentCategoryID);
145
    }
155
    }
146
    
156
147
    public void setCurrentCategoryID(String categoryID) {
157
    public void setCurrentCategoryID(String categoryID) {
148
        currentCategoryID = verifyCategoryID(categoryID);
158
        currentCategoryID = verifyCategoryID(categoryID);
149
    }
159
    }
150
    
160
151
161
152
    String getHighlitedCategoryID() {
162
    String getHighlitedCategoryID() {
153
        return verifyCategoryID(highlitedCategoryID);
163
        return verifyCategoryID(highlitedCategoryID);
154
    }
164
    }
155
        
165
156
    private String verifyCategoryID(String categoryID) {
166
    private String verifyCategoryID(String categoryID) {
157
        String retval = findCurrentCategoryID(categoryID) != -1 ? categoryID : null;
167
        String retval = findCurrentCategoryID(categoryID) != -1 ? categoryID : null;
158
        if (retval == null) {
168
        if (retval == null) {
Lines 163-184 Link Here
163
        }
173
        }
164
        return retval;
174
        return retval;
165
    }
175
    }
166
    
176
167
    private int findCurrentCategoryID(String categoryID) {
177
    private int findCurrentCategoryID(String categoryID) {
168
        return categoryID == null ? -1 : Arrays.asList(getCategoryIDs()).indexOf(categoryID);
178
        return categoryID == null ? -1 : Arrays.asList(getCategoryIDs()).indexOf(categoryID);
169
    }
179
    }
170
    
180
171
    public String[] getCategoryIDs() {
181
    public String[] getCategoryIDs() {
172
        categoryTask.waitFinished();
182
        categoryTask.waitFinished();
173
        Set<String> keys = id2Category.keySet();        
183
        Set<String> keys = id2Category.keySet();
174
        return keys.toArray(new String[keys.size()]);
184
        return keys.toArray(new String[keys.size()]);
175
    }
185
    }
176
    
186
177
    Category getCurrent() {
187
    Category getCurrent() {
178
        String categoryID =  getCurrentCategoryID();
188
        String categoryID =  getCurrentCategoryID();
179
        return (categoryID == null) ? null : getCategory(categoryID);
189
        return (categoryID == null) ? null : getCategory(categoryID);
180
    }
190
    }
181
    
191
182
    void setCurrent(Category item) {
192
    void setCurrent(Category item) {
183
        item.setCurrent();
193
        item.setCurrent();
184
    }
194
    }
Lines 186-197 Link Here
186
    void setHighlited(Category item,boolean highlited) {
196
    void setHighlited(Category item,boolean highlited) {
187
        item.setHighlited(highlited);
197
        item.setHighlited(highlited);
188
    }
198
    }
189
            
199
190
    HelpCtx getHelpCtx() {
200
    HelpCtx getHelpCtx() {
191
        final CategoryModel.Category category = getCurrent();
201
        final CategoryModel.Category category = getCurrent();
192
        return (category == null) ? null : category.getHelpCtx();
202
        return (category == null) ? null : category.getHelpCtx();
193
    }
203
    }
194
    
204
195
    void update(PropertyChangeListener l, boolean force) {
205
    void update(PropertyChangeListener l, boolean force) {
196
        String[] categoryIDs = getCategoryIDs();
206
        String[] categoryIDs = getCategoryIDs();
197
        for (int i = 0; i < categoryIDs.length; i++) {
207
        for (int i = 0; i < categoryIDs.length; i++) {
Lines 199-205 Link Here
199
            item.update(l, force);
209
            item.update(l, force);
200
        }
210
        }
201
    }
211
    }
202
    
212
203
    void save() {
213
    void save() {
204
        String[] categoryIDs = getCategoryIDs();
214
        String[] categoryIDs = getCategoryIDs();
205
        for (int i = 0; i < categoryIDs.length; i++) {
215
        for (int i = 0; i < categoryIDs.length; i++) {
Lines 207-213 Link Here
207
            item.applyChanges();
217
            item.applyChanges();
208
        }
218
        }
209
    }
219
    }
210
    
220
211
    void cancel() {
221
    void cancel() {
212
        String[] categoryIDs = getCategoryIDs();
222
        String[] categoryIDs = getCategoryIDs();
213
        for (int i = 0; i < categoryIDs.length; i++) {
223
        for (int i = 0; i < categoryIDs.length; i++) {
Lines 215-221 Link Here
215
            item.cancel();
225
            item.cancel();
216
        }
226
        }
217
    }
227
    }
218
    
228
219
    boolean dataValid() {
229
    boolean dataValid() {
220
        boolean retval = true;
230
        boolean retval = true;
221
        String[] categoryIDs = getCategoryIDs();
231
        String[] categoryIDs = getCategoryIDs();
Lines 225-231 Link Here
225
        }
235
        }
226
        return retval;
236
        return retval;
227
    }
237
    }
228
    
238
229
    boolean isChanged() {
239
    boolean isChanged() {
230
        boolean retval = false;
240
        boolean retval = false;
231
        String[] categoryIDs = getCategoryIDs();
241
        String[] categoryIDs = getCategoryIDs();
Lines 235-242 Link Here
235
        }
245
        }
236
        return retval;
246
        return retval;
237
    }
247
    }
238
    
248
239
    
249
240
    Category getNextCategory() {
250
    Category getNextCategory() {
241
        int idx =  findCurrentCategoryID(getCurrentCategoryID());
251
        int idx =  findCurrentCategoryID(getCurrentCategoryID());
242
        String[] categoryIDs = getCategoryIDs();
252
        String[] categoryIDs = getCategoryIDs();
Lines 252-258 Link Here
252
        }
262
        }
253
        return nextId != null ? getCategory(nextId) : null;
263
        return nextId != null ? getCategory(nextId) : null;
254
    }
264
    }
255
    
265
256
    Category getPreviousCategory() {
266
    Category getPreviousCategory() {
257
        int idx =  findCurrentCategoryID(getCurrentCategoryID());
267
        int idx =  findCurrentCategoryID(getCurrentCategoryID());
258
        String[] categoryIDs = getCategoryIDs();
268
        String[] categoryIDs = getCategoryIDs();
Lines 268-287 Link Here
268
        }
278
        }
269
        return previousId != null ? getCategory(previousId) : null;
279
        return previousId != null ? getCategory(previousId) : null;
270
    }
280
    }
271
        
281
272
    
282
273
    Category getCategory(String categoryID) {
283
    Category getCategory(String categoryID) {
274
        categoryTask.waitFinished();
284
        categoryTask.waitFinished();
275
        return id2Category.get(categoryID);
285
        return id2Category.get(categoryID);
276
    }
286
    }
277
        
287
278
    private MasterLookup getMasterLookup() {
288
    private MasterLookup getMasterLookup() {
279
        if (masterLookup == null) {
289
        if (masterLookup == null) {
280
            masterLookup = new MasterLookup();
290
            masterLookup = new MasterLookup();
281
        }
291
        }
282
        return masterLookup;
292
        return masterLookup;
283
    }
293
    }
284
    
294
285
    private Map<String, OptionsCategory> loadOptionsCategories() {
295
    private Map<String, OptionsCategory> loadOptionsCategories() {
286
        Lookup lookup = Lookups.forPath("OptionsDialog"); // NOI18N
296
        Lookup lookup = Lookups.forPath("OptionsDialog"); // NOI18N
287
        Lookup.Result<OptionsCategory> result = lookup.lookup(new Lookup.Template<OptionsCategory>(OptionsCategory.class));
297
        Lookup.Result<OptionsCategory> result = lookup.lookup(new Lookup.Template<OptionsCategory>(OptionsCategory.class));
Lines 296-307 Link Here
296
306
297
    public void resultChanged(LookupEvent ev) {
307
    public void resultChanged(LookupEvent ev) {
298
        synchronized(CategoryModel.class) {
308
        synchronized(CategoryModel.class) {
299
            categoriesValid = false;            
309
            categoriesValid = false;
300
            OptionsDisplayerImpl.lookupListener.resultChanged(ev);
310
            OptionsDisplayerImpl.lookupListener.resultChanged(ev);
301
            INSTANCE = new WeakReference<CategoryModel>(new CategoryModel());
311
            INSTANCE = new WeakReference<CategoryModel>(new CategoryModel());
302
        }
312
        }
303
    }
313
    }
304
    
314
305
    final class Category  {
315
    final class Category  {
306
        private OptionsCategory category;
316
        private OptionsCategory category;
307
        private OptionsPanelController controller;
317
        private OptionsPanelController controller;
Lines 310-329 Link Here
310
        private JComponent component;
320
        private JComponent component;
311
        private Lookup lookup;
321
        private Lookup lookup;
312
        private final String id;
322
        private final String id;
313
        
323
314
        private Category(final String id, final OptionsCategory category) {
324
        private Category(final String id, final OptionsCategory category) {
315
            this.category = category;
325
            this.category = category;
316
            this.id = id;
326
            this.id = id;
317
        }
327
        }
318
        
328
319
        boolean isCurrent() {
329
        boolean isCurrent() {
320
            return getID().equals(getCurrentCategoryID());
330
            return getID().equals(getCurrentCategoryID());
321
        }
331
        }
322
        
332
323
        boolean isHighlited() {
333
        boolean isHighlited() {
324
            return getID().equals(getHighlitedCategoryID());
334
            return getID().equals(getHighlitedCategoryID());
325
        }
335
        }
326
                
336
327
        private void setCurrent() {
337
        private void setCurrent() {
328
            setCurrentCategoryID(getID());
338
            setCurrentCategoryID(getID());
329
        }
339
        }
Lines 331-337 Link Here
331
        public void setCurrentSubcategory(String subpath) {
341
        public void setCurrentSubcategory(String subpath) {
332
            OptionsPanelControllerAccessor.getDefault().setCurrentSubcategory(create(), subpath);
342
            OptionsPanelControllerAccessor.getDefault().setCurrentSubcategory(create(), subpath);
333
        }
343
        }
334
    
344
335
        private void setHighlited(boolean highlited) {
345
        private void setHighlited(boolean highlited) {
336
            if (highlited) {
346
            if (highlited) {
337
                highlitedCategoryID = getID();
347
                highlitedCategoryID = getID();
Lines 339-345 Link Here
339
                highlitedCategoryID = currentCategoryID;
349
                highlitedCategoryID = currentCategoryID;
340
            }
350
            }
341
        }
351
        }
342
                        
352
343
        public Icon getIcon() {
353
        public Icon getIcon() {
344
            return category.getIcon();
354
            return category.getIcon();
345
        }
355
        }
Lines 349-370 Link Here
349
        public  String getID() {
359
        public  String getID() {
350
            return id;
360
            return id;
351
        }
361
        }
352
        
362
353
        public String getCategoryName() {
363
        public String getCategoryName() {
354
            return category.getCategoryName();
364
            return category.getCategoryName();
355
        }
365
        }
356
        
366
357
        public String getTitle() {
367
        public String getTitle() {
358
            return category.getTitle();
368
            return category.getTitle();
359
        }
369
        }
360
        
370
361
        private synchronized OptionsPanelController create() {
371
        private synchronized OptionsPanelController create() {
362
            if (controller == null) {
372
            if (controller == null) {
363
                controller = category.create();
373
                controller = category.create();
364
            }
374
            }
365
            return controller;
375
            return controller;
366
        }
376
        }
367
        
377
378
        public Map<String, Set<String>> getKeywords() {
379
            Map<String, Set<String>> kws = new HashMap<String, Set<String>>();
380
            if(category != null && (category instanceof OptionsCategoryImpl)) {
381
                kws.putAll(((OptionsCategoryImpl) category).getKeywordsByCategory());
382
            }
383
384
            //sub-panels keywords
385
            String path = "OptionsDialog/" + getID(); // NOI18N
386
            Lookup lkp = Lookups.forPath(path);
387
            Result<AdvancedOption> lkpResult = lkp.lookup(new Lookup.Template<AdvancedOption>(AdvancedOption.class));
388
            for (Item<AdvancedOption> item : lkpResult.allItems()) {
389
                // don't lookup in subfolders
390
                if (item.getId().substring(0, item.getId().lastIndexOf('/')).equals(path)) {  // NOI18N
391
                    AdvancedOption option = item.getInstance();
392
                    if(option instanceof AdvancedOptionImpl)
393
                        kws.putAll(((AdvancedOptionImpl) option).getKeywordsByCategory());
394
                }
395
            }
396
            return kws;
397
        }
398
368
        final void update(PropertyChangeListener l, boolean forceUpdate) {
399
        final void update(PropertyChangeListener l, boolean forceUpdate) {
369
            if ((!isUpdated && !forceUpdate) || (isUpdated && forceUpdate)) {
400
            if ((!isUpdated && !forceUpdate) || (isUpdated && forceUpdate)) {
370
                isUpdated = true;
401
                isUpdated = true;
Lines 375-395 Link Here
375
                }
406
                }
376
            }
407
            }
377
        }
408
        }
378
        
409
379
        private void applyChanges() {
410
        private void applyChanges() {
380
            if (isUpdated) {
411
            if (isUpdated) {
381
                create().applyChanges();
412
                create().applyChanges();
382
            }
413
            }
383
            isUpdated = false;
414
            isUpdated = false;
384
        }
415
        }
385
        
416
386
        private void cancel() {
417
        private void cancel() {
387
            if (isUpdated) {
418
            if (isUpdated) {
388
                create().cancel();
419
                create().cancel();
389
            }
420
            }
390
            isUpdated = false;
421
            isUpdated = false;
391
        }
422
        }
392
        
423
393
        private boolean isValid() {
424
        private boolean isValid() {
394
            boolean retval = true;
425
            boolean retval = true;
395
            if (isUpdated) {
426
            if (isUpdated) {
Lines 397-403 Link Here
397
            }
428
            }
398
            return retval;
429
            return retval;
399
        }
430
        }
400
        
431
401
        private boolean isChanged() {
432
        private boolean isChanged() {
402
            boolean retval = false;
433
            boolean retval = false;
403
            if (isUpdated) {
434
            if (isUpdated) {
Lines 405-423 Link Here
405
            }
436
            }
406
            return retval;
437
            return retval;
407
        }
438
        }
408
        
439
409
        public JComponent getComponent() {
440
        public JComponent getComponent() {
410
            if (component == null) {
441
            if (component == null) {
411
                component = create().getComponent(getMasterLookup());
442
                component = create().getComponent(getMasterLookup());
412
            }
443
            }
413
            return component;
444
            return component;
414
        }
445
        }
415
        
446
416
        private HelpCtx getHelpCtx() {
447
        private HelpCtx getHelpCtx() {
417
            return create().getHelpCtx();
448
            return create().getHelpCtx();
418
        }
449
        }
419
        
450
420
        
451
421
        private Lookup getLookup() {
452
        private Lookup getLookup() {
422
            if (lookup == null) {
453
            if (lookup == null) {
423
                lookup = create().getLookup();
454
                lookup = create().getLookup();
Lines 425-431 Link Here
425
            return lookup;
456
            return lookup;
426
        }
457
        }
427
    }
458
    }
428
    
459
429
    private class MasterLookup extends ProxyLookup {
460
    private class MasterLookup extends ProxyLookup {
430
        private void setLookups(List<Lookup> lookups) {
461
        private void setLookups(List<Lookup> lookups) {
431
            setLookups(lookups.toArray(new Lookup[lookups.size()]));
462
            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