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 231735
Collapse All | Expand All

(-)a/editor.settings.storage/apichanges.xml (+20 lines)
Lines 108-113 Link Here
108
108
109
    <changes>
109
    <changes>
110
        <change>
110
        <change>
111
            <summary>Implement profiles for annotations coloring</summary>
112
            <version major="1" minor="43"/>
113
            <date day="17" month="9" year="2013"/>
114
            <author login="mkristofic"/>
115
            <compatibility addition="yes" binary="compatible" source="compatible" semantic="compatible"  deprecation="no" deletion="no" modification="no" />
116
            <description>
117
                <p>
118
                    <code>EditorSettings</code> is extended to handle saving and loading annotations colorings for any profile.
119
                </p>
120
                <pre>
121
                    Class org.netbeans.modules.editor.settings.storage.api.EditorSettings
122
  [sigtest]   "E5.2 - Adding abstract methods" : method public abstract void org.netbeans.modules.editor.settings.storage.api.EditorSettings.setAnnotations(java.lang.String,java.util.Map)
123
  [sigtest]   "E5.2 - Adding abstract methods" : method public abstract java.util.Map org.netbeans.modules.editor.settings.storage.api.EditorSettings.getAnnotations(java.lang.String)
124
  [sigtest]   "E5.2 - Adding abstract methods" : method public abstract java.util.Map org.netbeans.modules.editor.settings.storage.api.EditorSettings.getAnnotationDefaults(java.lang.String)
125
  [sigtest] 
126
                </pre>
127
            </description>
128
            <issue number="231735"/>
129
        </change>
130
        <change>
111
            <summary>Detect preferences override and support inheritance</summary>
131
            <summary>Detect preferences override and support inheritance</summary>
112
            <version major="1" minor="38"/>
132
            <version major="1" minor="38"/>
113
            <date day="21" month="2" year="2013"/>
133
            <date day="21" month="2" year="2013"/>
(-)a/editor.settings.storage/manifest.mf (-1 / +1 lines)
Lines 2-7 Link Here
2
OpenIDE-Module: org.netbeans.modules.editor.settings.storage/1
2
OpenIDE-Module: org.netbeans.modules.editor.settings.storage/1
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/settings/storage/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/settings/storage/Bundle.properties
4
OpenIDE-Module-Provides: org.netbeans.api.editor.settings.implementation
4
OpenIDE-Module-Provides: org.netbeans.api.editor.settings.implementation
5
OpenIDE-Module-Specification-Version: 1.42
5
OpenIDE-Module-Specification-Version: 1.43
6
OpenIDE-Module-Layer: org/netbeans/modules/editor/settings/storage/layer.xml
6
OpenIDE-Module-Layer: org/netbeans/modules/editor/settings/storage/layer.xml
7
AutoUpdate-Show-In-Client: false
7
AutoUpdate-Show-In-Client: false
(-)a/editor.settings.storage/src/org/netbeans/modules/editor/settings/storage/EditorSettingsImpl.java (-1 / +103 lines)
Lines 82-87 Link Here
82
82
83
    /** The name of the property change event for 'Highlighting' font and colors. */
83
    /** The name of the property change event for 'Highlighting' font and colors. */
84
    public static final String PROP_HIGHLIGHT_COLORINGS = "editorFontColors"; //NOI18N
84
    public static final String PROP_HIGHLIGHT_COLORINGS = "editorFontColors"; //NOI18N
85
    
86
    /** The name of the property change event for 'Annotation' font and colors. */
87
    public static final String PROP_ANNOTATION_COLORINGS = "editorAnnotationFontColors"; //NOI18N
85
88
86
    /** The name of the property change event for 'Token' font and colors. */
89
    /** The name of the property change event for 'Token' font and colors. */
87
    public static final String PROP_TOKEN_COLORINGS = "fontColors"; //NOI18N
90
    public static final String PROP_TOKEN_COLORINGS = "fontColors"; //NOI18N
Lines 281-287 Link Here
281
    }
284
    }
282
    
285
    
283
    private final Map<String, Map<String, AttributeSet>> highlightings = new HashMap<String, Map<String, AttributeSet>>();
286
    private final Map<String, Map<String, AttributeSet>> highlightings = new HashMap<String, Map<String, AttributeSet>>();
284
    private final StorageImpl<String, AttributeSet> highlightingsStorage = new StorageImpl<String, AttributeSet>(new ColoringStorage(false), null);
287
    private final StorageImpl<String, AttributeSet> highlightingsStorage = new StorageImpl<String, AttributeSet>(new ColoringStorage(ColoringStorage.FAV_HIGHLIGHT), null);
285
    
288
    
286
    /**
289
    /**
287
     * Returns highlighting properties for given profile or null, if the 
290
     * Returns highlighting properties for given profile or null, if the 
Lines 395-400 Link Here
395
        pcs.firePropertyChange(PROP_HIGHLIGHT_COLORINGS, MimePath.EMPTY, profile);
398
        pcs.firePropertyChange(PROP_HIGHLIGHT_COLORINGS, MimePath.EMPTY, profile);
396
    }  
399
    }  
397
    
400
    
401
    private final Map<String, Map<String, AttributeSet>> annotations = new HashMap<>();
402
    private final StorageImpl<String, AttributeSet> annotationsStorage = new StorageImpl<>(new ColoringStorage(ColoringStorage.FAV_ANNOTATION), null);
403
404
    @Override
405
    public Map<String, AttributeSet> getAnnotations(String profile) {
406
        boolean specialProfile = profile.startsWith("test"); //NOI18N
407
        profile = FontColorSettingsImpl.get(MimePath.EMPTY).getInternalFontColorProfile(profile);
408
409
        if (!annotations.containsKey(profile)) {
410
            Map<String, AttributeSet> profileColorings = null;
411
412
            try {
413
                profileColorings = annotationsStorage.load(
414
                        MimePath.EMPTY,
415
                        specialProfile ? DEFAULT_PROFILE : profile,
416
                        false
417
                );
418
            } catch (IOException ioe) {
419
                LOG.log(Level.WARNING, null, ioe);
420
            }
421
422
            Map<String, AttributeSet> defaultProfileColorings = null;
423
            if (!specialProfile && !DEFAULT_PROFILE.equals(profile)) {
424
                try {
425
                    defaultProfileColorings = annotationsStorage.load(
426
                            MimePath.EMPTY,
427
                            DEFAULT_PROFILE,
428
                            false
429
                    );
430
                } catch (IOException ioe) {
431
                    LOG.log(Level.WARNING, null, ioe);
432
                }
433
            }
434
435
            // Add colorings from the default profile that do not exist in
436
            // the profileColorings. They are normally the same, but when
437
            // imported from previous version some colorings can be missing.
438
            // See #119709
439
            Map<String, AttributeSet> m = new HashMap<>();
440
            if (defaultProfileColorings != null) {
441
                m.putAll(defaultProfileColorings);
442
            }
443
            if (profileColorings != null) {
444
                m.putAll(profileColorings);
445
            }
446
447
            //todo prepare annotations.
448
            profileColorings = Collections.unmodifiableMap(m);
449
450
            annotations.put(profile, profileColorings);
451
        }
452
453
        Map<String, AttributeSet> h = annotations.get(profile);
454
        return h == null ? Collections.<String, AttributeSet>emptyMap() : h;
455
    }
456
457
    @Override
458
    public Map<String, AttributeSet> getAnnotationDefaults(String profile) {
459
        profile = FontColorSettingsImpl.get(MimePath.EMPTY).getInternalFontColorProfile(profile);
460
        try {
461
            return annotationsStorage.load(MimePath.EMPTY, profile, true);
462
        } catch (IOException ioe) {
463
            LOG.log(Level.WARNING, null, ioe);
464
            return Collections.<String, AttributeSet>emptyMap();
465
        }
466
    }
467
468
    @Override
469
    public void setAnnotations(
470
            String profile,
471
            Map<String, AttributeSet> fontColors
472
    ) {
473
        boolean specialProfile = profile.startsWith("test"); //NOI18N
474
        profile = FontColorSettingsImpl.get(MimePath.EMPTY).getInternalFontColorProfile(profile);
475
476
        if (fontColors == null) {
477
            try {
478
                annotationsStorage.delete(MimePath.EMPTY, profile, false);
479
            } catch (IOException ioe) {
480
                LOG.log(Level.WARNING, null, ioe);
481
            }
482
            annotations.remove(profile);
483
        } else {
484
            Map<String, AttributeSet> m = Utils.immutize(fontColors);
485
486
            // 3) save new values to disk
487
            if (!specialProfile) {
488
                try {
489
                    annotationsStorage.save(MimePath.EMPTY, profile, false, m);
490
                } catch (IOException ioe) {
491
                    LOG.log(Level.WARNING, null, ioe);
492
                }
493
            }
494
495
            annotations.put(profile, m);
496
        }
497
498
        pcs.firePropertyChange(PROP_ANNOTATION_COLORINGS, MimePath.EMPTY, profile);
499
    }
398
    
500
    
399
    // ------------------------------------------------------
501
    // ------------------------------------------------------
400
    // Keybindings
502
    // Keybindings
(-)a/editor.settings.storage/src/org/netbeans/modules/editor/settings/storage/api/EditorSettings.java (+33 lines)
Lines 227-232 Link Here
227
    );
227
    );
228
    
228
    
229
    /**
229
    /**
230
     * Returns annotations properties for given profile or null, if the 
231
     * profile is not known.
232
     *
233
     * @param profile a profile name
234
     * @return annotations properties for given profile or null
235
     */
236
    public abstract Map<String, AttributeSet> getAnnotations (
237
	String profile
238
    );
239
    
240
    /**
241
     * Returns defaults for annotation properties for given profile,
242
     * or null if the profile is not known.
243
     *
244
     * @param profile a profile name
245
     * @return annotation properties for given profile or null
246
     */
247
    public abstract Map<String, AttributeSet> getAnnotationDefaults (
248
	String profile
249
    );
250
    
251
    /**
252
     * Sets annotation properties for given profile.
253
     *
254
     * @param profile a profile name
255
     * @param annotations a annotation properties to be used
256
     */
257
    public abstract void setAnnotations (
258
	String profile,
259
	Map<String, AttributeSet> annotations
260
    );
261
    
262
    /**
230
     * Returns FontColorSettings for given mimetypes.
263
     * Returns FontColorSettings for given mimetypes.
231
     *
264
     *
232
     * @param mimeTypes The mime path to get the settings for.
265
     * @param mimeTypes The mime path to get the settings for.
(-)a/editor.settings.storage/src/org/netbeans/modules/editor/settings/storage/fontscolors/ColoringStorage.java (-17 / +24 lines)
Lines 87-94 Link Here
87
    public static final String ID = "FontsColors"; //NOI18N
87
    public static final String ID = "FontsColors"; //NOI18N
88
    /* test */ static final String MIME_TYPE = "text/x-nbeditor-fontcolorsettings"; //NOI18N
88
    /* test */ static final String MIME_TYPE = "text/x-nbeditor-fontcolorsettings"; //NOI18N
89
89
90
    public ColoringStorage(boolean tokenColoringStorage) {
90
    public ColoringStorage(String type) {
91
        this.tokenColoringStorage = tokenColoringStorage;
91
        this.type = type;
92
    }
92
    }
93
    
93
    
94
    // ---------------------------------------------------------
94
    // ---------------------------------------------------------
Lines 96-102 Link Here
96
    // ---------------------------------------------------------
96
    // ---------------------------------------------------------
97
97
98
    public ColoringStorage() {
98
    public ColoringStorage() {
99
        this(true);
99
        this(FAV_TOKEN);
100
    }
100
    }
101
    
101
    
102
    public String getId() {
102
    public String getId() {
Lines 168-175 Link Here
168
            boolean legacyFile = ((Boolean) info[4]).booleanValue();
168
            boolean legacyFile = ((Boolean) info[4]).booleanValue();
169
169
170
            // Skip files with wrong type of colorings
170
            // Skip files with wrong type of colorings
171
            boolean isTokenColoringFile = isTokenColoringFile(settingFile);
171
            if (!type.equals(getColoringFileType(settingFile))) {
172
            if (isTokenColoringFile != tokenColoringStorage) {
173
                continue;
172
                continue;
174
            }
173
            }
175
            
174
            
Lines 180-190 Link Here
180
            
179
            
181
            // Process loaded colorings
180
            // Process loaded colorings
182
            for(SimpleAttributeSet as : sets.values()) {
181
            for(SimpleAttributeSet as : sets.values()) {
182
                if (FAV_ANNOTATION.equals(type)) {
183
                    fontsColorsMap.put((String) as.getAttribute(StyleConstants.NameAttribute), as);
184
                    continue;
185
                }
183
                String name = (String) as.getAttribute(StyleConstants.NameAttribute);
186
                String name = (String) as.getAttribute(StyleConstants.NameAttribute);
184
                String translatedName = null;
187
                String translatedName = null;
185
                SimpleAttributeSet previous = fontsColorsMap.get(name);
188
                SimpleAttributeSet previous = fontsColorsMap.get(name);
186
189
187
                if (previous == null && !modulesFile && tokenColoringStorage) {
190
                if (previous == null && !modulesFile && FAV_TOKEN.equals(type)) {
188
                    // User files normally don't define extra colorings unless
191
                    // User files normally don't define extra colorings unless
189
                    // for example loading a settings file from an older version
192
                    // for example loading a settings file from an older version
190
                    // of Netbeans (or in a completely new profile!!). In this case
193
                    // of Netbeans (or in a completely new profile!!). In this case
Lines 269-282 Link Here
269
        final String settingFileName = SettingsType.getLocator(this).getWritableFileName(
272
        final String settingFileName = SettingsType.getLocator(this).getWritableFileName(
270
                mimePath.getPath(), 
273
                mimePath.getPath(), 
271
                profile, 
274
                profile, 
272
                tokenColoringStorage ? "-tokenColorings" : "-highlights", //NOI18N
275
                FAV_TOKEN.equals(type) ? "-tokenColorings" : FAV_HIGHLIGHT.equals(type) ? "-highlights" : "-annotations", //NOI18N
273
                defaults);
276
                defaults);
274
277
275
        FileUtil.runAtomicAction(new FileSystem.AtomicAction() {
278
        FileUtil.runAtomicAction(new FileSystem.AtomicAction() {
276
            public void run() throws IOException {
279
            public void run() throws IOException {
277
                FileObject baseFolder = FileUtil.getConfigFile("Editors"); //NOI18N
280
                FileObject baseFolder = FileUtil.getConfigFile("Editors"); //NOI18N
278
                FileObject f = FileUtil.createData(baseFolder, settingFileName);
281
                FileObject f = FileUtil.createData(baseFolder, settingFileName);
279
                f.setAttribute(FA_TYPE, tokenColoringStorage ? FAV_TOKEN : FAV_HIGHLIGHT);
282
                f.setAttribute(FA_TYPE, type);
280
                
283
                
281
                Map<String, AttributeSet> added = new HashMap<String, AttributeSet>();
284
                Map<String, AttributeSet> added = new HashMap<String, AttributeSet>();
282
                Map<String, AttributeSet> removed = new HashMap<String, AttributeSet>();
285
                Map<String, AttributeSet> removed = new HashMap<String, AttributeSet>();
Lines 311-318 Link Here
311
                        FileObject settingFile = (FileObject) info[1];
314
                        FileObject settingFile = (FileObject) info[1];
312
315
313
                        // Skip files with wrong type of colorings
316
                        // Skip files with wrong type of colorings
314
                        boolean isTokenColoringFile = isTokenColoringFile(settingFile);
317
                        if (!type.equals(getColoringFileType(settingFile))) {
315
                        if (isTokenColoringFile != tokenColoringStorage) {
316
                            continue;
318
                            continue;
317
                        }
319
                        }
318
320
Lines 350-361 Link Here
350
    private static final String SYSTEM_ID = "http://www.netbeans.org/dtds/EditorFontsColors-1_1.dtd"; //NOI18N
352
    private static final String SYSTEM_ID = "http://www.netbeans.org/dtds/EditorFontsColors-1_1.dtd"; //NOI18N
351
353
352
    private static final String FA_TYPE = "nbeditor-settings-ColoringType"; //NOI18N
354
    private static final String FA_TYPE = "nbeditor-settings-ColoringType"; //NOI18N
353
    private static final String FAV_TOKEN = "token"; //NOI18N
355
    public static final String FAV_TOKEN = "token"; //NOI18N
354
    private static final String FAV_HIGHLIGHT = "highlight"; //NOI18N
356
    public static final String FAV_HIGHLIGHT = "highlight"; //NOI18N
357
    public static final String FAV_ANNOTATION = "annotation"; //NOI18N
355
    
358
    
356
    private static final Object ATTR_MODULE_SUPPLIED = new Object();
359
    private static final Object ATTR_MODULE_SUPPLIED = new Object();
357
    
360
    
358
    private final boolean tokenColoringStorage;
361
    private final String type;
359
    
362
    
360
    private static String findDisplayName(String name, FileObject settingFile, List<Object []> filesForLocalization) {
363
    private static String findDisplayName(String name, FileObject settingFile, List<Object []> filesForLocalization) {
361
        // Try the settingFile first
364
        // Try the settingFile first
Lines 584-596 Link Here
584
            return doc;
587
            return doc;
585
        }
588
        }
586
    } // End of ColoringsWriter class
589
    } // End of ColoringsWriter class
587
590
    
588
    private static boolean isTokenColoringFile(FileObject f) {
591
    private static String getColoringFileType(FileObject f) {
589
        Object typeValue = f.getAttribute(FA_TYPE);
592
        Object typeValue = f.getAttribute(FA_TYPE);
590
        if (typeValue instanceof String) {
593
        if (typeValue instanceof String) {
591
            return typeValue.equals(FAV_TOKEN);
594
            return (String)typeValue;
592
        } else {
595
        } else {
593
            return !f.getNameExt().equals(HIGHLIGHTING_FILE_NAME);
596
            if (f.getNameExt().equals(HIGHLIGHTING_FILE_NAME)) {
597
                return FAV_HIGHLIGHT;
598
            } else {
599
                return FAV_TOKEN;
600
            }
594
        }
601
        }
595
    }
602
    }
596
    
603
    
(-)a/editor.settings.storage/test/unit/src/org/netbeans/modules/editor/settings/storage/fontscolors/ColoringStorageTest.java (-3 / +3 lines)
Lines 118-124 Link Here
118
    }
118
    }
119
    
119
    
120
    public void testAllLanguagesHighlights() {
120
    public void testAllLanguagesHighlights() {
121
        ColoringStorage cs = new ColoringStorage(false);
121
        ColoringStorage cs = new ColoringStorage(ColoringStorage.FAV_HIGHLIGHT);
122
        Map<String, AttributeSet> colorings = cs.load(MimePath.EMPTY, "MyProfileXyz", true); //NOI18N
122
        Map<String, AttributeSet> colorings = cs.load(MimePath.EMPTY, "MyProfileXyz", true); //NOI18N
123
        assertNotNull("Colorings map should not be null", colorings);
123
        assertNotNull("Colorings map should not be null", colorings);
124
        assertEquals("Wrong number of colorings", 1, colorings.size());
124
        assertEquals("Wrong number of colorings", 1, colorings.size());
Lines 129-135 Link Here
129
    }
129
    }
130
    
130
    
131
    public void testAllLanguagesHighlights2() {
131
    public void testAllLanguagesHighlights2() {
132
        ColoringStorage cs = new ColoringStorage(false);
132
        ColoringStorage cs = new ColoringStorage(ColoringStorage.FAV_HIGHLIGHT);
133
        Map<String, AttributeSet> colorings = cs.load(MimePath.EMPTY, "MyProfileXyz", false); //NOI18N
133
        Map<String, AttributeSet> colorings = cs.load(MimePath.EMPTY, "MyProfileXyz", false); //NOI18N
134
        assertNotNull("Colorings map should not be null", colorings);
134
        assertNotNull("Colorings map should not be null", colorings);
135
        assertEquals("Wrong number of colorings", 1, colorings.size());
135
        assertEquals("Wrong number of colorings", 1, colorings.size());
Lines 218-224 Link Here
218
    }
218
    }
219
    
219
    
220
    public void testLegacyFilesWithNoDTD_Issue113137() {
220
    public void testLegacyFilesWithNoDTD_Issue113137() {
221
        ColoringStorage cs = new ColoringStorage(true);
221
        ColoringStorage cs = new ColoringStorage(ColoringStorage.FAV_TOKEN);
222
        Map<String, AttributeSet> colorings = cs.load(MimePath.parse("text/x-legacy"), "NetBeans", false); //NOI18N
222
        Map<String, AttributeSet> colorings = cs.load(MimePath.parse("text/x-legacy"), "NetBeans", false); //NOI18N
223
        assertNotNull("Colorings map should not be null", colorings);
223
        assertNotNull("Colorings map should not be null", colorings);
224
        assertEquals("Wrong number of colorings", 2, colorings.size());
224
        assertEquals("Wrong number of colorings", 2, colorings.size());
(-)a/editor/nbproject/project.properties (-1 / +1 lines)
Lines 42-48 Link Here
42
42
43
javac.compilerargs=-Xlint:unchecked
43
javac.compilerargs=-Xlint:unchecked
44
javac.source=1.7
44
javac.source=1.7
45
spec.version.base=1.76.0
45
spec.version.base=1.77.0
46
is.autoload=true
46
is.autoload=true
47
47
48
javadoc.arch=${basedir}/arch.xml
48
javadoc.arch=${basedir}/arch.xml
(-)a/editor/src/org/netbeans/modules/editor/resources/NetBeans-editor.xml (-21 / +97 lines)
Lines 46-70 Link Here
46
<!DOCTYPE fontscolors PUBLIC "-//NetBeans//DTD Editor Fonts and Colors settings 1.1//EN" "http://www.netbeans.org/dtds/EditorFontsColors-1_1.dtd">
46
<!DOCTYPE fontscolors PUBLIC "-//NetBeans//DTD Editor Fonts and Colors settings 1.1//EN" "http://www.netbeans.org/dtds/EditorFontsColors-1_1.dtd">
47
47
48
<fontscolors>
48
<fontscolors>
49
    <fontcolor name="block-search" foreColor="black" bgColor="ffe0e8f1"/>
49
    <fontcolor bgColor="ffdcdcd8" name="OtherThreads_DBP"/>
50
    <fontcolor name="code-folding" foreColor="ff666666"/>
50
    <fontcolor bgColor="fffc9d9f" name="Breakpoint"/>
51
    <fontcolor name="code-folding-bar" foreColor="ff666666"/>
51
    <fontcolor name="FieldBreakpoint_stroke"/>
52
    <fontcolor name="guarded" bgColor="ffDFDFDF"/>
52
    <fontcolor bgColor="ffdcdcd8" name="DisabledBreakpoint"/>
53
    <fontcolor name="readonly-files" bgColor="ffDFDFDF"/>
53
    <fontcolor name="org-netbeans-spi-editor-hints-parser_annotation_err_fixable"/>
54
    <fontcolor name="highlight-caret-row" bgColor="ffE9EFF8"/>
54
    <fontcolor bgColor="ffbde6aa" name="CurrentPCLinePart"/>
55
    <fontcolor name="highlight-search" foreColor="black" bgColor="ffFFB442"/>
55
    <fontcolor name="org-netbeans-modules-editor-annotations-implements-has-implementations-combined"/>
56
    <fontcolor name="inc-search" foreColor="black" bgColor="ffFFB442"/> <!-- ffff9900 -->
56
    <fontcolor bgColor="ffe9ffe6" name="CurrentExpressionLine_DBP"/>
57
    <fontcolor name="line-number" foreColor="black" bgColor="ffe9e8e2"/>
57
    <fontcolor name="org-netbeans-modules-git-Annotation"/>
58
    <fontcolor name="selection" bgColor="ffB0C5E3"/>
58
    <fontcolor name="org-netbeans-spi-editor-hints-parser_annotation_err"/>
59
    <fontcolor name="status-bar"/>
59
    <fontcolor bgColor="ffdcdcd8" name="debugger-multi_DBPCBP"/>
60
    <fontcolor name="status-bar-bold" foreColor="red"/>
60
    <fontcolor bgColor="ffdcdcd8" name="Breakpoint_broken"/>
61
    <fontcolor name="caret-color-insert-mode" foreColor="black"/>
61
    <fontcolor name="DisabledMethodBreakpoint"/>
62
    <fontcolor name="caret-color-overwrite-mode" foreColor="black"/>
62
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_mixedBP"/>
63
    <fontcolor name="text-limit-line-color" foreColor="ffffa8a8"/>
63
    <fontcolor bgColor="ffbde6aa" name="OtherThreads_PC_BP"/>
64
    <fontcolor name="hyperlinks" foreColor="blue" underline="blue"/>
64
    <fontcolor bgColor="ffbde6aa" name="CurrentPC2"/>
65
<!--    <fontcolor name="synchronized-text-blocks" bgColor="ff8AC0EC"/> -->
65
    <fontcolor bgColor="ffbde6aa" name="OtherThreads_BP_broken"/>
66
    <fontcolor name="synchronized-text-blocks-ext" foreColor="ffCC0099"/>
66
    <fontcolor name="org-netbeans-spi-editor-hints-parser_annotation_warn"/>
67
    <fontcolor name="synchronized-text-blocks-ext-slave" foreColor="ff996600"/>
67
    <fontcolor name="ClassBreakpoint"/>
68
    <fontcolor name="indent-whitespace"/>
68
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_BP_stroke"/>
69
    <fontcolor name="trailing-whitespace"/>
69
    <fontcolor name="org-netbeans-spi-editor-hints-parser_annotation_todo"/>
70
    <fontcolor bgColor="ffdcdcd8" name="DisabledBreakpoint_stroke"/>
71
    <fontcolor bgColor="ffb4e4fc" name="loadgenProfilingPoint"/>
72
    <fontcolor bgColor="fffc9d9f" name="debugger-mixed_BP"/>
73
    <fontcolor name="DisabledMethodBreakpoint_stroke"/>
74
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_DCBP"/>
75
    <fontcolor name="org-netbeans-spi-editor-hints-parser_annotation_warn_fixable"/>
76
    <fontcolor bgColor="ffe7e1ef" name="CallSite"/>
77
    <fontcolor bgColor="ffbde6aa" name="OtherThread_PC"/>
78
    <fontcolor bgColor="ffbde6aa" name="CurrentPC"/>
79
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_multi_BPCBP"/>
80
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_CBP"/>
81
    <fontcolor name="DisabledFieldBreakpoint_stroke"/>
82
    <fontcolor name="org-netbeans-spi-editor-hints-parser_annotation_verifier"/>
83
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_DBP_stroke"/>
84
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_multi_DBPCBP"/>
85
    <fontcolor name="org-netbeans-modules-editor-annotations-override-is-overridden-combined"/>
86
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_multi_BPCBP_broken"/>
87
    <fontcolor bgColor="ffdcdcd8" name="CondBreakpoint_broken"/>
88
    <fontcolor bgColor="ffb4e4fc" name="resetResultsProfilingPoint"/>
89
    <fontcolor bgColor="ffdcdcd8" name="Breakpoint_stroke"/>
90
    <fontcolor bgColor="ffe9ffe6" name="CurrentExpressionLine_BP"/>
91
    <fontcolor bgColor="ffdcdcd8" name="debugger-mixed_BP_broken"/>
92
    <fontcolor bgColor="ffdcdcd8" name="CondBreakpoint_stroke"/>
93
    <fontcolor name="DisabledClassBreakpoint_stroke"/>
94
    <fontcolor bgColor="fffc9d9f" name="OtherThreads_BP"/>
95
    <fontcolor name="org-netbeans-modules-subversion-Annotation"/>
96
    <fontcolor name="OtherThread"/>
97
    <fontcolor bgColor="ffe9ffe6" name="CurrentExpressionLine_DCBP"/>
98
    <fontcolor name="editor-bookmark"/>
99
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_BP_broken"/>
100
    <fontcolor bgColor="ffdcdcd8" name="DisabledCondBreakpoint"/>
101
    <fontcolor bgColor="ffb4e4fc" name="stopwatchProfilingPoint"/>
102
    <fontcolor name="ClassBreakpoint_stroke"/>
103
    <fontcolor bgColor="ffe9ffe6" name="CurrentExpressionLine_CBP"/>
104
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_mixedBP_broken"/>
105
    <fontcolor name="DisabledFieldBreakpoint"/>
106
    <fontcolor bgColor="ffdcdcd8" name="loadgenProfilingPointD"/>
107
    <fontcolor bgColor="ffdcdcd8" name="debugger-multi_BPCBP_broken"/>
108
    <fontcolor bgColor="fffc9d9f" name="debugger-multi_BPCBP"/>
109
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_BP"/>
110
    <fontcolor bgColor="ffdcdcd8" name="DisabledCondBreakpoint_stroke"/>
111
    <fontcolor name="org-netbeans-spi-editor-hints-parser_annotation_hint_fixable"/>
112
    <fontcolor bgColor="ffdcdcd8" name="OtherThread_DBP"/>
113
    <fontcolor name="FieldBreakpoint"/>
114
    <fontcolor name="org-netbeans-modules-editor-annotations-implements-is-overridden-combined"/>
115
    <fontcolor bgColor="ffb4e4fc" name="takeSnapshotProfilingPoint"/>
116
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_DCBP_stroke"/>
117
    <fontcolor name="DisabledClassBreakpoint"/>
118
    <fontcolor bgColor="ffbde6aa" name="OtherThread_BP_broken"/>
119
    <fontcolor name="org-netbeans-modules-editor-annotations-is_overridden"/>
120
    <fontcolor name="org-netbeans-modules-editor-annotations-overrides"/>
121
    <fontcolor bgColor="ffe9ffe6" name="CurrentExpressionLine"/>
122
    <fontcolor bgColor="ffdcdcd8" name="CurrentPC2_DBP"/>
123
    <fontcolor bgColor="ffdcdcd8" name="resetResultsProfilingPointD"/>
124
    <fontcolor name="MethodBreakpoint_stroke"/>
125
    <fontcolor name="org-netbeans-spi-editor-hints-parser_annotation_verifier_fixable"/>
126
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_CBP_stroke"/>
127
    <fontcolor name="org-netbeans-modules-mercurial-Annotation"/>
128
    <fontcolor bgColor="ffbde6aa" name="CurrentPC2LinePart"/>
129
    <fontcolor bgColor="ffdcdcd8" name="takeSnapshotProfilingPointD"/>
130
    <fontcolor bgColor="fffc9d9f" name="OtherThread_BP"/>
131
    <fontcolor name="org-netbeans-modules-versioning-annotate-Annotation"/>
132
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_CBP_broken"/>
133
    <fontcolor bgColor="ffdcdcd8" name="stopwatchProfilingPointD"/>
134
    <fontcolor name="org-netbeans-spi-editor-hints-parser_annotation_hint"/>
135
    <fontcolor name="MethodBreakpoint"/>
136
    <fontcolor bgColor="ffbde6aa" name="debugger-PC_DBP"/>
137
    <fontcolor bgColor="fffc9d9f" name="CondBreakpoint"/>
138
    <fontcolor bgColor="fffc9d9f" name="CurrentPC2_BP"/>
139
    <fontcolor name="org-netbeans-modules-editor-annotations-has_implementations"/>
140
    <fontcolor bgColor="ffbde6aa" name="OtherThread_PC_BP"/>
141
    <fontcolor name="org-netbeans-spi-editor-hints-parser_annotation_todo_fixable"/>
142
    <fontcolor bgColor="ffffa0a0" name="org-netbeans-modules-xml-error"/>
143
    <fontcolor name="OtherThreads"/>
144
    <fontcolor name="org-netbeans-modules-editor-annotations-implements"/>
145
    <fontcolor bgColor="ffd1ffbc" name="CurrentExpression"/>
70
</fontscolors>
146
</fontscolors>
(-)a/editor/src/org/netbeans/modules/editor/resources/layer.xml (+3 lines)
Lines 303-308 Link Here
303
                        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.editor.Bundle"/>
303
                        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.editor.Bundle"/>
304
                        <attr name="nbeditor-settings-ColoringType" stringvalue="highlight"/>
304
                        <attr name="nbeditor-settings-ColoringType" stringvalue="highlight"/>
305
                    </file>
305
                    </file>
306
                    <file name="org-netbeans-modules-editor-annotations-colorings.xml" url="NetBeans-annotations.xml">
307
                        <attr name="nbeditor-settings-ColoringType" stringvalue="annotation"/>
308
                    </file>
306
                    <file name="org-netbeans-modules-editor-url-coloring.xml" url="urlFontsColors.xml">
309
                    <file name="org-netbeans-modules-editor-url-coloring.xml" url="urlFontsColors.xml">
307
                        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.editor.url.Bundle"/>
310
                        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.editor.url.Bundle"/>
308
                    </file>
311
                    </file>
(-)a/options.editor/manifest.mf (-1 / +1 lines)
Lines 2-7 Link Here
2
OpenIDE-Module: org.netbeans.modules.options.editor/1
2
OpenIDE-Module: org.netbeans.modules.options.editor/1
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/options/editor/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/options/editor/Bundle.properties
4
OpenIDE-Module-Layer: org/netbeans/modules/options/editor/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/options/editor/mf-layer.xml
5
OpenIDE-Module-Specification-Version: 1.46
5
OpenIDE-Module-Specification-Version: 1.47
6
AutoUpdate-Show-In-Client: false
6
AutoUpdate-Show-In-Client: false
7
7
(-)a/options.editor/nbproject/project.xml (-1 / +1 lines)
Lines 109-115 Link Here
109
                    <compile-dependency/>
109
                    <compile-dependency/>
110
                    <run-dependency>
110
                    <run-dependency>
111
                        <release-version>1</release-version>
111
                        <release-version>1</release-version>
112
                        <specification-version>1.12</specification-version>
112
                        <specification-version>1.42</specification-version>
113
                    </run-dependency>
113
                    </run-dependency>
114
                </dependency>
114
                </dependency>
115
                <dependency>
115
                <dependency>
(-)a/options.editor/src/org/netbeans/modules/options/colors/AnnotationsPanel.java (-11 / +37 lines)
Lines 89-95 Link Here
89
    private ColorModel          colorModel;
89
    private ColorModel          colorModel;
90
    private boolean		listen = false;
90
    private boolean		listen = false;
91
    private String              currentScheme;
91
    private String              currentScheme;
92
    private Map<String, Vector<AttributeSet>> schemes = new HashMap<String, Vector<AttributeSet>>();
92
    private Map<String, List<AttributeSet>> schemes = new HashMap<String, List<AttributeSet>>();
93
    private Set<String> toBeSaved = new HashSet<String>();
93
    private Set<String> toBeSaved = new HashSet<String>();
94
    private boolean             changed = false;
94
    private boolean             changed = false;
95
    
95
    
Lines 263-269 Link Here
263
        this.colorModel = colorModel;
263
        this.colorModel = colorModel;
264
        listen = false;
264
        listen = false;
265
        currentScheme = colorModel.getCurrentProfile ();
265
        currentScheme = colorModel.getCurrentProfile ();
266
        lCategories.setListData (getAnnotations (currentScheme));
266
        lCategories.setListData (getAnnotations (currentScheme).toArray(new AttributeSet[]{}));
267
        if (lCategories.getModel ().getSize () > 0)
267
        if (lCategories.getModel ().getSize () > 0)
268
            lCategories.setSelectedIndex (0);
268
            lCategories.setSelectedIndex (0);
269
        refreshUI ();
269
        refreshUI ();
Lines 273-279 Link Here
273
    
273
    
274
    public void cancel () {
274
    public void cancel () {
275
        toBeSaved = new HashSet<String>();
275
        toBeSaved = new HashSet<String>();
276
        schemes = new HashMap<String, Vector<AttributeSet>>();
276
        schemes = new HashMap<String, List<AttributeSet>>();
277
        changed = false;
277
        changed = false;
278
    }
278
    }
279
    
279
    
Lines 283-289 Link Here
283
            colorModel.setAnnotations(scheme, getAnnotations(scheme));
283
            colorModel.setAnnotations(scheme, getAnnotations(scheme));
284
        }
284
        }
285
        toBeSaved = new HashSet<String>();
285
        toBeSaved = new HashSet<String>();
286
        schemes = new HashMap<String, Vector<AttributeSet>>();
286
        schemes = new HashMap<String, List<AttributeSet>>();
287
    }
287
    }
288
    
288
    
289
    public boolean isChanged () {
289
    public boolean isChanged () {
Lines 293-299 Link Here
293
    public void setCurrentProfile (String currentScheme) {
293
    public void setCurrentProfile (String currentScheme) {
294
        String oldScheme = this.currentScheme;
294
        String oldScheme = this.currentScheme;
295
        this.currentScheme = currentScheme;
295
        this.currentScheme = currentScheme;
296
        Vector<AttributeSet> v = getAnnotations(currentScheme);
296
        List<AttributeSet> v = getAnnotations(currentScheme);
297
        if (v == null) {
297
        if (v == null) {
298
            // clone scheme
298
            // clone scheme
299
            v = getAnnotations (oldScheme);
299
            v = getAnnotations (oldScheme);
Lines 301-313 Link Here
301
            toBeSaved.add (currentScheme);
301
            toBeSaved.add (currentScheme);
302
            v = getAnnotations (currentScheme);
302
            v = getAnnotations (currentScheme);
303
        }
303
        }
304
        lCategories.setListData (v);
304
        lCategories.setListData (v.toArray(new AttributeSet[]{}));
305
        if (lCategories.getModel ().getSize () > 0)
305
        if (lCategories.getModel ().getSize () > 0)
306
            lCategories.setSelectedIndex (0);
306
            lCategories.setSelectedIndex (0);
307
        refreshUI ();
307
        refreshUI ();
308
    }
308
    }
309
    
309
    
310
    public void deleteProfile (String scheme) {
310
    public void deleteProfile (String scheme) {
311
        if (colorModel.isCustomProfile (scheme))
312
            schemes.remove (scheme);
313
        else {
314
            schemes.put (scheme, getDefaults (scheme));
315
            lCategories.setListData (getAnnotations(scheme).toArray(new AttributeSet[]{}));
316
            lCategories.repaint();
317
            lCategories.setSelectedIndex (0);   
318
            refreshUI ();
319
        }
320
        toBeSaved.add (scheme);
311
    }
321
    }
312
322
313
    public JComponent getComponent() {
323
    public JComponent getComponent() {
Lines 334-341 Link Here
334
    }
344
    }
335
345
336
    private void updateData () {
346
    private void updateData () {
337
        Vector<AttributeSet> annotations = getAnnotations(currentScheme);
347
        List<AttributeSet> annotations = getAnnotations(currentScheme);
338
        SimpleAttributeSet c = (SimpleAttributeSet) annotations.get(lCategories.getSelectedIndex());
348
        int index = lCategories.getSelectedIndex();
349
        SimpleAttributeSet c = new SimpleAttributeSet(annotations.get(index));
339
        
350
        
340
        Color color = ColorComboBoxSupport.getSelectedColor( (ColorComboBox)cbBackground );
351
        Color color = ColorComboBoxSupport.getSelectedColor( (ColorComboBox)cbBackground );
341
        if (color != null) {
352
        if (color != null) {
Lines 360-365 Link Here
360
            c.removeAttribute(EditorStyleConstants.WaveUnderlineColor);
371
            c.removeAttribute(EditorStyleConstants.WaveUnderlineColor);
361
        }
372
        }
362
        
373
        
374
        annotations.set(index, c);
375
        
363
        toBeSaved.add(currentScheme);
376
        toBeSaved.add(currentScheme);
364
        changed = true;
377
        changed = true;
365
    }
378
    }
Lines 396-402 Link Here
396
        }
409
        }
397
410
398
        // set values
411
        // set values
399
        Vector<AttributeSet> annotations = getAnnotations (currentScheme);
412
        List<AttributeSet> annotations = getAnnotations (currentScheme);
400
        AttributeSet c = annotations.get (index);
413
        AttributeSet c = annotations.get (index);
401
        ColorComboBoxSupport.setSelectedColor( (ColorComboBox)cbForeground, (Color) c.getAttribute (StyleConstants.Foreground));
414
        ColorComboBoxSupport.setSelectedColor( (ColorComboBox)cbForeground, (Color) c.getAttribute (StyleConstants.Foreground));
402
        ColorComboBoxSupport.setSelectedColor( (ColorComboBox)cbBackground, (Color) c.getAttribute (StyleConstants.Background));
415
        ColorComboBoxSupport.setSelectedColor( (ColorComboBox)cbBackground, (Color) c.getAttribute (StyleConstants.Background));
Lines 426-439 Link Here
426
        return null;
439
        return null;
427
    }
440
    }
428
    
441
    
429
    private Vector<AttributeSet> getAnnotations(String scheme) {
442
    private List<AttributeSet> getAnnotations(String scheme) {
430
        if (!schemes.containsKey(scheme)) {
443
        if (!schemes.containsKey(scheme)) {
431
            Collection<AttributeSet> c = colorModel.getAnnotations(currentScheme);
444
            Collection<AttributeSet> c = colorModel.getAnnotations(currentScheme);
432
            if (c == null) return null;
445
            if (c == null) return null;
433
            List<AttributeSet> l = new ArrayList<AttributeSet>(c);
446
            List<AttributeSet> l = new ArrayList<AttributeSet>(c);
434
            Collections.sort(l, new CategoryComparator());
447
            Collections.sort(l, new CategoryComparator());
435
            schemes.put(scheme, new Vector<AttributeSet>(l));
448
            schemes.put(scheme, new ArrayList<AttributeSet>(l));
436
        }
449
        }
437
        return schemes.get(scheme);
450
        return schemes.get(scheme);
438
    }
451
    }
452
    /** cache Map (String (profile name) > List (AttributeSet)). */
453
    private Map<String, List<AttributeSet>> profileToDefaults = new HashMap<String, List<AttributeSet>>();
454
    
455
    private List<AttributeSet> getDefaults(String profile) {
456
        if (!profileToDefaults.containsKey(profile)) {
457
            Collection<AttributeSet> c = colorModel.getAnnotationsDefaults(profile);
458
            List<AttributeSet> l = new ArrayList<AttributeSet>(c);
459
            Collections.sort(l, new CategoryComparator());
460
            profileToDefaults.put(profile, l);
461
        }
462
        List<AttributeSet> defaultprofile = profileToDefaults.get(profile);
463
        return new ArrayList<AttributeSet>(defaultprofile);
464
    }
439
}
465
}
(-)a/options.editor/src/org/netbeans/modules/options/colors/ColorModel.java (-8 / +37 lines)
Lines 128-133 Link Here
128
    // annotations .............................................................
128
    // annotations .............................................................
129
    
129
    
130
    public Collection<AttributeSet> getAnnotations(String profile) {
130
    public Collection<AttributeSet> getAnnotations(String profile) {
131
        Map<String, AttributeSet> annos = EditorSettings.getDefault().getAnnotations(profile);
132
        List<AttributeSet> annotations = processAnnotations(annos, false);
133
        return annotations;
134
    }
135
136
    public Collection<AttributeSet> getAnnotationsDefaults(String profile) {
137
        Map<String, AttributeSet> annos = EditorSettings.getDefault().getAnnotationDefaults(profile);
138
        List<AttributeSet> annotations = processAnnotations(annos, true);
139
        return annotations;
140
    }
141
142
    private List<AttributeSet> processAnnotations(Map<String, AttributeSet> annos, boolean isdefault) {
131
        List<AttributeSet> annotations = new ArrayList<AttributeSet>();
143
        List<AttributeSet> annotations = new ArrayList<AttributeSet>();
132
        for(Iterator it = AnnotationTypes.getTypes().getAnnotationTypeNames(); it.hasNext(); ) {
144
        for(Iterator it = AnnotationTypes.getTypes().getAnnotationTypeNames(); it.hasNext(); ) {
133
            String name = (String) it.next ();
145
            String name = (String) it.next ();
Lines 141-150 Link Here
141
            if (description == null) {
153
            if (description == null) {
142
                continue;
154
                continue;
143
            }
155
            }
144
156
            
145
            SimpleAttributeSet category = new SimpleAttributeSet();
157
            SimpleAttributeSet category = new SimpleAttributeSet();
146
            category.addAttribute(EditorStyleConstants.DisplayName, description);
158
            category.addAttribute(EditorStyleConstants.DisplayName, description);
147
            category.addAttribute(StyleConstants.NameAttribute, description);
159
            category.addAttribute(StyleConstants.NameAttribute, annotationType.getName());
148
            
160
            
149
            URL iconURL = annotationType.getGlyph ();
161
            URL iconURL = annotationType.getGlyph ();
150
            Image image = null;
162
            Image image = null;
Lines 173-198 Link Here
173
            }
185
            }
174
            
186
            
175
            category.addAttribute("annotationType", annotationType); //NOI18N
187
            category.addAttribute("annotationType", annotationType); //NOI18N
188
            if (annos.containsKey(name)) {
189
                if (isdefault) {
190
                    category.removeAttribute(StyleConstants.Background);
191
                    category.removeAttribute(StyleConstants.Foreground);
192
                    category.removeAttribute(EditorStyleConstants.WaveUnderlineColor);
193
                }
194
                AttributeSet as = annos.get(name);
195
                category.addAttributes(as);
196
                
197
            }
198
176
            annotations.add(category);
199
            annotations.add(category);
177
	}
200
        }
178
        
201
        return annotations;
179
	return annotations;
180
    }
202
    }
181
    
203
    
182
    public void setAnnotations (
204
    public void setAnnotations (
183
	String profile, 
205
	String profile, 
184
	Collection<AttributeSet> annotations
206
	Collection<AttributeSet> annotations
185
    ) {
207
    ) {
186
	//S ystem.out.println("ColorModelImpl.setAnnotations ");
208
	//S ystem.out.println("ColorModelImpl.setAnnotations ");      
209
        Collection<AttributeSet> annos = new ArrayList<AttributeSet>();
187
	for(AttributeSet category : annotations) {
210
	for(AttributeSet category : annotations) {
188
	    AnnotationType annotationType = (AnnotationType) 
211
	    AnnotationType annotationType = (AnnotationType) 
189
		category.getAttribute ("annotationType");
212
		category.getAttribute ("annotationType");
190
            
213
            
214
            SimpleAttributeSet c = new SimpleAttributeSet();
215
            c.addAttribute(StyleConstants.NameAttribute, category.getAttribute(StyleConstants.NameAttribute));
191
	    if (category.isDefined (StyleConstants.Background)) {
216
	    if (category.isDefined (StyleConstants.Background)) {
192
		annotationType.setUseHighlightColor (true);
217
		annotationType.setUseHighlightColor (true);
193
		annotationType.setHighlight (
218
		annotationType.setHighlight (
194
                    (Color) category.getAttribute (StyleConstants.Background)
219
                    (Color) category.getAttribute (StyleConstants.Background)
195
                );
220
                );
221
                c.addAttribute(StyleConstants.Background, category.getAttribute(StyleConstants.Background));
196
            } else
222
            } else
197
		annotationType.setUseHighlightColor (false);
223
		annotationType.setUseHighlightColor (false);
198
	    if (category.isDefined (StyleConstants.Foreground)) {
224
	    if (category.isDefined (StyleConstants.Foreground)) {
Lines 200-205 Link Here
200
		annotationType.setForegroundColor (
226
		annotationType.setForegroundColor (
201
                    (Color) category.getAttribute (StyleConstants.Foreground)
227
                    (Color) category.getAttribute (StyleConstants.Foreground)
202
                );
228
                );
229
                c.addAttribute(StyleConstants.Foreground, category.getAttribute(StyleConstants.Foreground));
203
            } else
230
            } else
204
		annotationType.setInheritForegroundColor (true);
231
		annotationType.setInheritForegroundColor (true);
205
	    if (category.isDefined (EditorStyleConstants.WaveUnderlineColor)) {
232
	    if (category.isDefined (EditorStyleConstants.WaveUnderlineColor)) {
Lines 207-219 Link Here
207
                annotationType.setWaveUnderlineColor (
234
                annotationType.setWaveUnderlineColor (
208
                    (Color) category.getAttribute (EditorStyleConstants.WaveUnderlineColor)
235
                    (Color) category.getAttribute (EditorStyleConstants.WaveUnderlineColor)
209
                );
236
                );
237
                c.addAttribute((EditorStyleConstants.WaveUnderlineColor), category.getAttribute (EditorStyleConstants.WaveUnderlineColor));
210
            } else
238
            } else
211
                annotationType.setUseWaveUnderlineColor (false);
239
                annotationType.setUseWaveUnderlineColor (false);
212
	    //S ystem.out.println("  " + category.getDisplayName () + " : " + annotationType + " : " + annotationType.getHighlight() + " : " + annotationType.isUseHighlightColor());
240
	    //S ystem.out.println("  " + category.getDisplayName () + " : " + annotationType + " : " + annotationType.getHighlight() + " : " + annotationType.isUseHighlightColor());
241
            annos.add(c);
213
	}
242
	}
243
        
244
        EditorSettings.getDefault().setAnnotations(profile, toMap(annos));
214
    }
245
    }
215
    
216
    
217
    // editor categories .......................................................
246
    // editor categories .......................................................
218
    
247
    
219
    /**
248
    /**

Return to bug 231735