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

(-)a/core.output2/src/org/netbeans/core/output2/NbIO.java (-1 / +1 lines)
Lines 541-547 Link Here
541
    }
541
    }
542
542
543
    private class IOColorsImpl extends IOColors {
543
    private class IOColorsImpl extends IOColors {
544
        Color[] clrs = new Color[4];
544
        Color[] clrs = new Color[OutputType.values().length];
545
545
546
        @Override
546
        @Override
547
        protected Color getColor(OutputType type) {
547
        protected Color getColor(OutputType type) {
(-)a/core.output2/src/org/netbeans/core/output2/options/Bundle.properties (+4 lines)
Lines 22-24 Link Here
22
OutputSettingsPanel.lblUnwrappedOnly.text=(Does not apply to wrapped text)
22
OutputSettingsPanel.lblUnwrappedOnly.text=(Does not apply to wrapped text)
23
OutputSettingsPanel.lblInputColor.text=&Input Color
23
OutputSettingsPanel.lblInputColor.text=&Input Color
24
OutputSettingsPanel.cmbInputColor.toolTipText=Select input text foreground color
24
OutputSettingsPanel.cmbInputColor.toolTipText=Select input text foreground color
25
OutputSettingsPanel.jLabel2.text=Debug:
26
OutputSettingsPanel.jLabel3.text=Warning:
27
OutputSettingsPanel.jLabel4.text=Failure:
28
OutputSettingsPanel.jLabel5.text=Success:
(-)a/core.output2/src/org/netbeans/core/output2/options/OutputOptions.java (-17 / +234 lines)
Lines 88-93 Link Here
88
            "color.link.important";                                     //NOI18N
88
            "color.link.important";                                     //NOI18N
89
    public static final String PROP_COLOR_BACKGROUND =
89
    public static final String PROP_COLOR_BACKGROUND =
90
            "color.backgorund";                                         //NOI18N
90
            "color.backgorund";                                         //NOI18N
91
    public static final String PROP_COLOR_WARNING = "color.warning";    //NOI18N
92
    public static final String PROP_COLOR_FAILURE = "color.failure";    //NOI18N
93
    public static final String PROP_COLOR_SUCCESS = "color.success";    //NOI18N
94
    public static final String PROP_COLOR_DEBUG = "color.debug";        //NOI18N
91
    public static final String PROP_STYLE_LINK = "style.link";          //NOI18N
95
    public static final String PROP_STYLE_LINK = "style.link";          //NOI18N
92
    public static final String PROP_FONT_SIZE_WRAP = "font.size.wrap";  //NOI18N
96
    public static final String PROP_FONT_SIZE_WRAP = "font.size.wrap";  //NOI18N
93
    private static final String PROP_INITIALIZED = "initialized";       //NOI18N
97
    private static final String PROP_INITIALIZED = "initialized";       //NOI18N
Lines 102-107 Link Here
102
    private Color colorLink;
106
    private Color colorLink;
103
    private Color colorLinkImportant;
107
    private Color colorLinkImportant;
104
    private Color colorBackground;
108
    private Color colorBackground;
109
    private Color colorWarning;
110
    private Color colorFailure;
111
    private Color colorSuccess;
112
    private Color colorDebug;
105
    private LinkStyle linkStyle = LinkStyle.UNDERLINE;
113
    private LinkStyle linkStyle = LinkStyle.UNDERLINE;
106
    private PropertyChangeSupport pcs = new PropertyChangeSupport(this);
114
    private PropertyChangeSupport pcs = new PropertyChangeSupport(this);
107
    private boolean defaultFontType = false;
115
    private boolean defaultFontType = false;
Lines 139-144 Link Here
139
                getDefaultFont().getSize());
147
                getDefaultFont().getSize());
140
        diskData.setFontForWrappedMode(
148
        diskData.setFontForWrappedMode(
141
                getDefaultFont().deriveFont((float) fontSizeWrapped));
149
                getDefaultFont().deriveFont((float) fontSizeWrapped));
150
        loadColors(preferences, diskData);
151
        String linkStyleStr = preferences.get(PREFIX + PROP_STYLE_LINK,
152
                "UNDERLINE");                                           //NOI18N
153
        try {
154
            diskData.setLinkStyle(LinkStyle.valueOf(linkStyleStr));
155
        } catch (Exception e) {
156
            LOG.log(Level.INFO, "Invalid link style {0}", linkStyleStr);//NOI18N
157
        }
158
        EventQueue.invokeLater(new Runnable() {
159
            @Override
160
            public void run() {
161
                assign(diskData);
162
                synchronized (OutputOptions.this) {
163
                    initialized = true;
164
                }
165
                pcs.firePropertyChange(PROP_INITIALIZED, false, true);
166
            }
167
        });
168
    }
169
170
    private void loadColors(final Preferences preferences,
171
            final OutputOptions diskData) {
142
        int rgbStandard = preferences.getInt(PREFIX + PROP_COLOR_STANDARD,
172
        int rgbStandard = preferences.getInt(PREFIX + PROP_COLOR_STANDARD,
143
                getDefaultColorStandard().getRGB());
173
                getDefaultColorStandard().getRGB());
144
        diskData.setColorStandard(new Color(rgbStandard));
174
        diskData.setColorStandard(new Color(rgbStandard));
Lines 157-180 Link Here
157
        int rgbLinkImportant = preferences.getInt(
187
        int rgbLinkImportant = preferences.getInt(
158
                PREFIX + PROP_COLOR_LINK_IMPORTANT,
188
                PREFIX + PROP_COLOR_LINK_IMPORTANT,
159
                getDefaultColorLinkImportant().getRGB());
189
                getDefaultColorLinkImportant().getRGB());
160
        String linkStyleStr = preferences.get(PREFIX + PROP_STYLE_LINK,
161
                "UNDERLINE");                                           //NOI18N
162
        try {
163
            diskData.setLinkStyle(LinkStyle.valueOf(linkStyleStr));
164
        } catch (Exception e) {
165
            LOG.log(Level.INFO, "Invalid link style {0}", linkStyleStr);//NOI18N
166
        }
167
        diskData.setColorLinkImportant(new Color(rgbLinkImportant));
190
        diskData.setColorLinkImportant(new Color(rgbLinkImportant));
168
        EventQueue.invokeLater(new Runnable() {
191
        int rgbDebug = preferences.getInt(
169
            @Override
192
                PREFIX + PROP_COLOR_DEBUG,
170
            public void run() {
193
                getDefaultColorDebug().getRGB());
171
                assign(diskData);
194
        diskData.setColorDebug(new Color(rgbDebug));
172
                synchronized (OutputOptions.this) {
195
        int rgbWarning = preferences.getInt(
173
                    initialized = true;
196
                PREFIX + PROP_COLOR_WARNING,
174
                }
197
                getDefaultColorWarning().getRGB());
175
                pcs.firePropertyChange(PROP_INITIALIZED, false, true);
198
        diskData.setColorWarning(new Color(rgbWarning));
176
            }
199
        int rgbFailure = preferences.getInt(
177
        });
200
                PREFIX + PROP_COLOR_FAILURE,
201
                getDefaultColorFailure().getRGB());
202
        diskData.setColorFailure(new Color(rgbFailure));
203
        int rgbSuccess = preferences.getInt(
204
                PREFIX + PROP_COLOR_SUCCESS,
205
                getDefaultColorSuccess().getRGB());
206
        diskData.setColorSuccess(new Color(rgbSuccess));
178
    }
207
    }
179
208
180
    public void saveTo(Preferences preferences) {
209
    public void saveTo(Preferences preferences) {
Lines 189-194 Link Here
189
                getColorBackground().getRGB());
218
                getColorBackground().getRGB());
190
        preferences.putInt(PREFIX + PROP_COLOR_LINK,
219
        preferences.putInt(PREFIX + PROP_COLOR_LINK,
191
                getColorLink().getRGB());
220
                getColorLink().getRGB());
221
        preferences.putInt(PREFIX + PROP_COLOR_WARNING,
222
                getColorWarning().getRGB());
223
        preferences.putInt(PREFIX + PROP_COLOR_FAILURE,
224
                getColorFailure().getRGB());
225
        preferences.putInt(PREFIX + PROP_COLOR_SUCCESS,
226
                getColorSuccess().getRGB());
227
        preferences.putInt(PREFIX + PROP_COLOR_DEBUG,
228
                getColorDebug().getRGB());
192
        preferences.putInt(PREFIX + PROP_COLOR_LINK_IMPORTANT,
229
        preferences.putInt(PREFIX + PROP_COLOR_LINK_IMPORTANT,
193
                getColorLinkImportant().getRGB());
230
                getColorLinkImportant().getRGB());
194
        preferences.putInt(PREFIX + PROP_FONT_SIZE, getFont().getSize());
231
        preferences.putInt(PREFIX + PROP_FONT_SIZE, getFont().getSize());
Lines 211-216 Link Here
211
        setColorLink(getDefaultColorLink());
248
        setColorLink(getDefaultColorLink());
212
        setColorLinkImportant(getDefaultColorLinkImportant());
249
        setColorLinkImportant(getDefaultColorLinkImportant());
213
        setColorBackground(getDefaultColorBackground());
250
        setColorBackground(getDefaultColorBackground());
251
        setColorWarning(getDefaultColorWarning());
252
        setColorFailure(getDefaultColorFailure());
253
        setColorSuccess(getDefaultColorSuccess());
254
        setColorDebug(getDefaultColorDebug());
214
    }
255
    }
215
256
216
    private void setDefaultFont() {
257
    private void setDefaultFont() {
Lines 274-279 Link Here
274
        return colorBackground;
315
        return colorBackground;
275
    }
316
    }
276
317
318
    public Color getColorWarning() {
319
        return colorWarning;
320
    }
321
322
    public Color getColorFailure() {
323
        return colorFailure;
324
    }
325
326
    public Color getColorSuccess() {
327
        return colorSuccess;
328
    }
329
330
    public Color getColorDebug() {
331
        return colorDebug;
332
    }
333
277
    public LinkStyle getLinkStyle() {
334
    public LinkStyle getLinkStyle() {
278
        return linkStyle;
335
        return linkStyle;
279
    }
336
    }
Lines 408-413 Link Here
408
        }
465
        }
409
    }
466
    }
410
467
468
    public void setColorWarning(Color colorWarning) {
469
        Parameters.notNull("colorWarning", colorWarning);               //NOI18N
470
        if (!colorWarning.equals(this.colorWarning)) {
471
            Color oldColorWarning = this.colorWarning;
472
            this.colorWarning = colorWarning;
473
            pcs.firePropertyChange(PROP_COLOR_WARNING, oldColorWarning,
474
                    colorWarning);
475
        }
476
    }
477
478
    public void setColorFailure(Color colorFailure) {
479
        Parameters.notNull("colorFailure", colorFailure);               //NOI18N
480
        if (!colorFailure.equals(this.colorFailure)) {
481
            Color oldColorFailure = this.colorFailure;
482
            this.colorFailure = colorFailure;
483
            pcs.firePropertyChange(PROP_COLOR_FAILURE, oldColorFailure,
484
                    colorFailure);
485
        }
486
    }
487
488
    public void setColorSuccess(Color colorSuccess) {
489
        Parameters.notNull("colorSuccess", colorSuccess);               //NOI18N
490
        if (!colorSuccess.equals(this.colorSuccess)) {
491
            Color oldColorSuccess = this.colorSuccess;
492
            this.colorSuccess = colorSuccess;
493
            pcs.firePropertyChange(PROP_COLOR_SUCCESS, oldColorSuccess,
494
                    colorSuccess);
495
        }
496
    }
497
498
    public void setColorDebug(Color colorDebug) {
499
        Parameters.notNull("colorDebug", colorDebug);                   //NOI18N
500
        if (!colorDebug.equals(this.colorDebug)) {
501
            Color oldColorDebug = this.colorDebug;
502
            this.colorDebug = colorDebug;
503
            pcs.firePropertyChange(PROP_COLOR_DEBUG, oldColorDebug,
504
                    colorDebug);
505
        }
506
    }
507
411
    public void setLinkStyle(LinkStyle linkStyle) {
508
    public void setLinkStyle(LinkStyle linkStyle) {
412
        Parameters.notNull("linkStyle", linkStyle);                     //NOI18N
509
        Parameters.notNull("linkStyle", linkStyle);                     //NOI18N
413
        if (!linkStyle.equals(this.linkStyle)) {
510
        if (!linkStyle.equals(this.linkStyle)) {
Lines 448-453 Link Here
448
        copy.colorBackground = this.colorBackground;
545
        copy.colorBackground = this.colorBackground;
449
        copy.colorLink = this.colorLink;
546
        copy.colorLink = this.colorLink;
450
        copy.colorLinkImportant = this.colorLinkImportant;
547
        copy.colorLinkImportant = this.colorLinkImportant;
548
        copy.colorWarning = this.colorWarning;
549
        copy.colorFailure = this.colorFailure;
550
        copy.colorSuccess = this.colorSuccess;
551
        copy.colorDebug = this.colorDebug;
451
        copy.initialized = initialized;
552
        copy.initialized = initialized;
452
        copy.linkStyle = linkStyle;
553
        copy.linkStyle = linkStyle;
453
        if (!initialized) {
554
        if (!initialized) {
Lines 480-485 Link Here
480
        this.setColorLink(outputOptions.getColorLink());
581
        this.setColorLink(outputOptions.getColorLink());
481
        this.setColorLinkImportant(outputOptions.getColorLinkImportant());
582
        this.setColorLinkImportant(outputOptions.getColorLinkImportant());
482
        this.setColorBackground(outputOptions.getColorBackground());
583
        this.setColorBackground(outputOptions.getColorBackground());
584
        this.setColorDebug(outputOptions.getColorDebug());
585
        this.setColorWarning(outputOptions.getColorWarning());
586
        this.setColorFailure(outputOptions.getColorFailure());
587
        this.setColorSuccess(outputOptions.getColorSuccess());
483
        this.setLinkStyle(outputOptions.getLinkStyle());
588
        this.setLinkStyle(outputOptions.getLinkStyle());
484
    }
589
    }
485
590
Lines 543-548 Link Here
543
        }
648
        }
544
    }
649
    }
545
650
651
    static Color getDefaultColorWarning() {
652
        Color c = UIManager.getColor("nb.output.warning.foreground");
653
        if (c == null) {
654
            c = ensureContrastingColor(Color.ORANGE, getDefaultColorBackground());
655
        }
656
        return c;
657
    }
658
659
    static Color getDefaultColorFailure() {
660
        Color c = UIManager.getColor("nb.output.failure.foreground");
661
        if (c == null) {
662
            c = ensureContrastingColor(Color.RED, getDefaultColorBackground());
663
        }
664
        return c;
665
    }
666
667
    static Color getDefaultColorSuccess() {
668
        Color c = UIManager.getColor("nb.output.success.foreground");
669
        if (c == null) {
670
            c = ensureContrastingColor(Color.GREEN.darker().darker(),
671
                    getDefaultColorBackground());
672
        }
673
        return c;
674
    }
675
676
    static Color getDefaultColorDebug() {
677
        Color c = UIManager.getColor("nb.output.debug.foreground");
678
        if (c == null) {
679
            c = ensureContrastingColor(Color.GRAY, getDefaultColorBackground());
680
        }
681
        return c;
682
    }
683
684
    /* From openide.awt/HtmlLabelUI.
685
     (int pos, String s, Graphics g, int x,
686
     int y, int w, int h, Font f, Color defaultColor, int style,
687
     boolean paint, Color background) {  */
688
    static Color ensureContrastingColor(Color fg, Color bg) {
689
        if (bg == null) {
690
            if (isNimbus()) {
691
                bg = UIManager.getColor("Tree.background"); //NOI18N
692
                if (null == bg) {
693
                    bg = Color.WHITE;
694
                }
695
            } else {
696
                bg = UIManager.getColor("text"); //NOI18N
697
698
                if (bg == null) {
699
                    bg = Color.WHITE;
700
                }
701
            }
702
        }
703
        if (fg == null) {
704
            if (isNimbus()) {
705
                fg = UIManager.getColor("Tree.foreground"); //NOI18N
706
                if (null == fg) {
707
                    fg = Color.BLACK;
708
                }
709
            } else {
710
                fg = UIManager.getColor("textText"); //NOI18N
711
                if (fg == null) {
712
                    fg = Color.BLACK;
713
                }
714
            }
715
        }
716
717
        if (Color.BLACK.equals(fg) && Color.WHITE.equals(fg)) {
718
            return fg;
719
        }
720
721
        boolean replace = fg.equals(bg);
722
        int dif = 0;
723
724
        if (!replace) {
725
            dif = difference(fg, bg);
726
            replace = dif < 60;
727
        }
728
729
        if (replace) {
730
            int lum = luminance(bg);
731
            boolean darker = lum >= 128;
732
733
            if (darker) {
734
                fg = fg.darker();
735
            } else {
736
                fg = fg.brighter();
737
            }
738
        }
739
740
        return fg;
741
    }
742
743
    private static int difference(Color a, Color b) {
744
        return Math.abs(luminance(a) - luminance(b));
745
    }
746
747
    private static int luminance(Color c) {
748
        return (299 * c.getRed() + 587 * c.getGreen() + 114 * c.getBlue()) / 1000;
749
    }
750
751
    static boolean isNimbus() {
752
        return "Nimbus".equals(UIManager.getLookAndFeel().getID());     //NOI18N
753
    }
754
546
    public Color getColorForType(IOColors.OutputType type) {
755
    public Color getColorForType(IOColors.OutputType type) {
547
        switch (type) {
756
        switch (type) {
548
            case OUTPUT:
757
            case OUTPUT:
Lines 555-560 Link Here
555
                return getColorLink();
764
                return getColorLink();
556
            case HYPERLINK_IMPORTANT:
765
            case HYPERLINK_IMPORTANT:
557
                return getColorLinkImportant();
766
                return getColorLinkImportant();
767
            case LOG_DEBUG:
768
                return getColorDebug();
769
            case LOG_WARNING:
770
                return getColorWarning();
771
            case LOG_FAILURE:
772
                return getColorFailure();
773
            case LOG_SUCCESS:
774
                return getColorSuccess();
558
            default:
775
            default:
559
                return getColorStandard();
776
                return getColorStandard();
560
        }
777
        }
(-)a/core.output2/src/org/netbeans/core/output2/options/OutputSettingsPanel.form (-18 / +117 lines)
Lines 20-35 Link Here
20
              <EmptySpace max="-2" attributes="0"/>
20
              <EmptySpace max="-2" attributes="0"/>
21
              <Group type="103" groupAlignment="0" attributes="0">
21
              <Group type="103" groupAlignment="0" attributes="0">
22
                  <Component id="previewPanel" alignment="1" max="32767" attributes="0"/>
22
                  <Component id="previewPanel" alignment="1" max="32767" attributes="0"/>
23
                  <Group type="102" attributes="0">
23
                  <Component id="jPanel2" max="32767" attributes="0"/>
24
                      <Group type="103" groupAlignment="0" attributes="0">
24
                  <Group type="102" alignment="1" attributes="0">
25
                          <Component id="jPanel2" max="32767" attributes="0"/>
25
                      <Component id="lblTitle" min="-2" max="-2" attributes="0"/>
26
                          <Group type="102" alignment="1" attributes="0">
26
                      <EmptySpace max="32767" attributes="0"/>
27
                              <Component id="lblTitle" min="-2" max="-2" attributes="0"/>
27
                      <Component id="btnRestore" min="-2" max="-2" attributes="0"/>
28
                              <EmptySpace max="32767" attributes="0"/>
29
                              <Component id="btnRestore" min="-2" max="-2" attributes="0"/>
30
                          </Group>
31
                      </Group>
32
                      <EmptySpace max="-2" attributes="0"/>
33
                  </Group>
28
                  </Group>
34
              </Group>
29
              </Group>
35
          </Group>
30
          </Group>
Lines 87-102 Link Here
87
                      </Group>
82
                      </Group>
88
                      <Component id="lblUnwrappedOnly" alignment="0" max="32767" attributes="0"/>
83
                      <Component id="lblUnwrappedOnly" alignment="0" max="32767" attributes="0"/>
89
                      <Group type="102" alignment="0" attributes="0">
84
                      <Group type="102" alignment="0" attributes="0">
90
                          <Component id="spnFontSize" min="-2" pref="71" max="-2" attributes="0"/>
85
                          <Group type="103" groupAlignment="1" max="-2" attributes="0">
86
                              <Component id="cmbLinkStyle" alignment="0" max="32767" attributes="0"/>
87
                              <Component id="cmbImportantLinkColor" alignment="0" max="32767" attributes="0"/>
88
                              <Component id="cmbLinkColor" alignment="0" max="32767" attributes="0"/>
89
                              <Component id="cmbInputColor" alignment="0" max="32767" attributes="0"/>
90
                              <Component id="cmbErrorColor" alignment="0" max="32767" attributes="0"/>
91
                              <Component id="cmbStandardColor" alignment="0" max="32767" attributes="0"/>
92
                              <Component id="spnFontSize" alignment="0" min="-2" pref="71" max="-2" attributes="0"/>
93
                              <Component id="cmbBackgroundColor" linkSize="1" alignment="0" max="32767" attributes="0"/>
94
                          </Group>
95
                          <EmptySpace type="separate" max="-2" attributes="0"/>
96
                          <Group type="103" groupAlignment="0" attributes="0">
97
                              <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
98
                              <Component id="jLabel3" min="-2" max="-2" attributes="0"/>
99
                              <Component id="jLabel4" min="-2" max="-2" attributes="0"/>
100
                              <Component id="jLabel5" min="-2" max="-2" attributes="0"/>
101
                          </Group>
102
                          <EmptySpace min="-2" pref="21" max="-2" attributes="0"/>
103
                          <Group type="103" groupAlignment="1" max="-2" attributes="0">
104
                              <Component id="cmbFailureColor" alignment="0" max="32767" attributes="0"/>
105
                              <Component id="cmbWarningColor" alignment="0" max="32767" attributes="0"/>
106
                              <Component id="cmbDebugColor" linkSize="1" alignment="1" pref="238" max="32767" attributes="0"/>
107
                              <Component id="cmbSuccessColor" max="32767" attributes="0"/>
108
                          </Group>
91
                          <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
109
                          <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
92
                      </Group>
110
                      </Group>
93
                      <Component id="cmbBackgroundColor" alignment="0" max="32767" attributes="0"/>
94
                      <Component id="cmbStandardColor" alignment="0" max="32767" attributes="0"/>
95
                      <Component id="cmbErrorColor" alignment="0" max="32767" attributes="0"/>
96
                      <Component id="cmbLinkColor" alignment="0" max="32767" attributes="0"/>
97
                      <Component id="cmbImportantLinkColor" alignment="0" max="32767" attributes="0"/>
98
                      <Component id="cmbLinkStyle" alignment="0" max="32767" attributes="0"/>
99
                      <Component id="cmbInputColor" max="32767" attributes="0"/>
100
                  </Group>
111
                  </Group>
101
                  <EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
112
                  <EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
102
              </Group>
113
              </Group>
Lines 122-142 Link Here
122
                  <Group type="103" groupAlignment="3" attributes="0">
133
                  <Group type="103" groupAlignment="3" attributes="0">
123
                      <Component id="lblBackgroundColor" alignment="3" min="-2" max="-2" attributes="0"/>
134
                      <Component id="lblBackgroundColor" alignment="3" min="-2" max="-2" attributes="0"/>
124
                      <Component id="cmbBackgroundColor" alignment="3" min="-2" max="-2" attributes="0"/>
135
                      <Component id="cmbBackgroundColor" alignment="3" min="-2" max="-2" attributes="0"/>
136
                      <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
137
                      <Component id="cmbDebugColor" alignment="3" min="-2" max="-2" attributes="0"/>
125
                  </Group>
138
                  </Group>
126
                  <EmptySpace max="-2" attributes="0"/>
139
                  <EmptySpace max="-2" attributes="0"/>
127
                  <Group type="103" groupAlignment="3" attributes="0">
140
                  <Group type="103" groupAlignment="3" attributes="0">
128
                      <Component id="cmbStandardColor" alignment="3" min="-2" max="-2" attributes="0"/>
141
                      <Component id="cmbStandardColor" alignment="3" min="-2" max="-2" attributes="0"/>
129
                      <Component id="lblStandardColor" alignment="3" min="-2" max="-2" attributes="0"/>
142
                      <Component id="lblStandardColor" alignment="3" min="-2" max="-2" attributes="0"/>
143
                      <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
144
                      <Component id="cmbWarningColor" alignment="3" min="-2" max="-2" attributes="0"/>
130
                  </Group>
145
                  </Group>
131
                  <EmptySpace max="-2" attributes="0"/>
146
                  <EmptySpace max="-2" attributes="0"/>
132
                  <Group type="103" groupAlignment="3" attributes="0">
147
                  <Group type="103" groupAlignment="3" attributes="0">
133
                      <Component id="cmbErrorColor" alignment="3" min="-2" max="-2" attributes="0"/>
148
                      <Component id="cmbErrorColor" alignment="3" min="-2" max="-2" attributes="0"/>
134
                      <Component id="lblErrorColor" alignment="3" min="-2" max="-2" attributes="0"/>
149
                      <Component id="lblErrorColor" alignment="3" min="-2" max="-2" attributes="0"/>
150
                      <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
151
                      <Component id="cmbFailureColor" alignment="3" min="-2" max="-2" attributes="0"/>
135
                  </Group>
152
                  </Group>
136
                  <EmptySpace max="-2" attributes="0"/>
153
                  <EmptySpace max="-2" attributes="0"/>
137
                  <Group type="103" groupAlignment="3" attributes="0">
154
                  <Group type="103" groupAlignment="3" attributes="0">
138
                      <Component id="lblInputColor" alignment="3" min="-2" max="-2" attributes="0"/>
155
                      <Component id="lblInputColor" alignment="3" min="-2" max="-2" attributes="0"/>
139
                      <Component id="cmbInputColor" alignment="3" min="-2" max="-2" attributes="0"/>
156
                      <Component id="cmbInputColor" alignment="3" min="-2" max="-2" attributes="0"/>
157
                      <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
158
                      <Component id="cmbSuccessColor" alignment="3" min="-2" max="-2" attributes="0"/>
140
                  </Group>
159
                  </Group>
141
                  <EmptySpace max="-2" attributes="0"/>
160
                  <EmptySpace max="-2" attributes="0"/>
142
                  <Group type="103" groupAlignment="3" attributes="0">
161
                  <Group type="103" groupAlignment="3" attributes="0">
Lines 393-398 Link Here
393
            <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new ColorComboBox()"/>
412
            <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new ColorComboBox()"/>
394
          </AuxValues>
413
          </AuxValues>
395
        </Component>
414
        </Component>
415
        <Component class="javax.swing.JLabel" name="jLabel2">
416
          <Properties>
417
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
418
              <ResourceString bundle="org/netbeans/core/output2/options/Bundle.properties" key="OutputSettingsPanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
419
            </Property>
420
          </Properties>
421
        </Component>
422
        <Component class="javax.swing.JLabel" name="jLabel3">
423
          <Properties>
424
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
425
              <ResourceString bundle="org/netbeans/core/output2/options/Bundle.properties" key="OutputSettingsPanel.jLabel3.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
426
            </Property>
427
          </Properties>
428
        </Component>
429
        <Component class="javax.swing.JLabel" name="jLabel4">
430
          <Properties>
431
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
432
              <ResourceString bundle="org/netbeans/core/output2/options/Bundle.properties" key="OutputSettingsPanel.jLabel4.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
433
            </Property>
434
          </Properties>
435
        </Component>
436
        <Component class="javax.swing.JLabel" name="jLabel5">
437
          <Properties>
438
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
439
              <ResourceString bundle="org/netbeans/core/output2/options/Bundle.properties" key="OutputSettingsPanel.jLabel5.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
440
            </Property>
441
          </Properties>
442
        </Component>
443
        <Component class="javax.swing.JComboBox" name="cmbDebugColor">
444
          <Properties>
445
            <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
446
              <StringArray count="0"/>
447
            </Property>
448
          </Properties>
449
          <Events>
450
            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cmbDebugColorActionPerformed"/>
451
          </Events>
452
          <AuxValues>
453
            <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new ColorComboBox()"/>
454
          </AuxValues>
455
        </Component>
456
        <Component class="javax.swing.JComboBox" name="cmbWarningColor">
457
          <Properties>
458
            <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
459
              <StringArray count="0"/>
460
            </Property>
461
          </Properties>
462
          <Events>
463
            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cmbWarningColorActionPerformed"/>
464
          </Events>
465
          <AuxValues>
466
            <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new ColorComboBox()"/>
467
          </AuxValues>
468
        </Component>
469
        <Component class="javax.swing.JComboBox" name="cmbFailureColor">
470
          <Properties>
471
            <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
472
              <StringArray count="0"/>
473
            </Property>
474
          </Properties>
475
          <Events>
476
            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cmbFailureColorActionPerformed"/>
477
          </Events>
478
          <AuxValues>
479
            <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new ColorComboBox()"/>
480
          </AuxValues>
481
        </Component>
482
        <Component class="javax.swing.JComboBox" name="cmbSuccessColor">
483
          <Properties>
484
            <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
485
              <StringArray count="0"/>
486
            </Property>
487
          </Properties>
488
          <Events>
489
            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cmbSuccessColorActionPerformed"/>
490
          </Events>
491
          <AuxValues>
492
            <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new ColorComboBox()"/>
493
          </AuxValues>
494
        </Component>
396
      </SubComponents>
495
      </SubComponents>
397
    </Container>
496
    </Container>
398
    <Container class="javax.swing.JPanel" name="previewPanel">
497
    <Container class="javax.swing.JPanel" name="previewPanel">
(-)a/core.output2/src/org/netbeans/core/output2/options/OutputSettingsPanel.java (-21 / +122 lines)
Lines 123-128 Link Here
123
        lblUnwrappedOnly = new javax.swing.JLabel();
123
        lblUnwrappedOnly = new javax.swing.JLabel();
124
        lblInputColor = new javax.swing.JLabel();
124
        lblInputColor = new javax.swing.JLabel();
125
        cmbInputColor = new ColorComboBox();
125
        cmbInputColor = new ColorComboBox();
126
        jLabel2 = new javax.swing.JLabel();
127
        jLabel3 = new javax.swing.JLabel();
128
        jLabel4 = new javax.swing.JLabel();
129
        jLabel5 = new javax.swing.JLabel();
130
        cmbDebugColor = new ColorComboBox();
131
        cmbWarningColor = new ColorComboBox();
132
        cmbFailureColor = new ColorComboBox();
133
        cmbSuccessColor = new ColorComboBox();
126
        previewPanel = new javax.swing.JPanel();
134
        previewPanel = new javax.swing.JPanel();
127
        btnRestore = new javax.swing.JButton();
135
        btnRestore = new javax.swing.JButton();
128
136
Lines 225-230 Link Here
225
            }
233
            }
226
        });
234
        });
227
235
236
        org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(OutputSettingsPanel.class, "OutputSettingsPanel.jLabel2.text")); // NOI18N
237
238
        org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(OutputSettingsPanel.class, "OutputSettingsPanel.jLabel3.text")); // NOI18N
239
240
        org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(OutputSettingsPanel.class, "OutputSettingsPanel.jLabel4.text")); // NOI18N
241
242
        org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(OutputSettingsPanel.class, "OutputSettingsPanel.jLabel5.text")); // NOI18N
243
244
        cmbDebugColor.addActionListener(new java.awt.event.ActionListener() {
245
            public void actionPerformed(java.awt.event.ActionEvent evt) {
246
                cmbDebugColorActionPerformed(evt);
247
            }
248
        });
249
250
        cmbWarningColor.addActionListener(new java.awt.event.ActionListener() {
251
            public void actionPerformed(java.awt.event.ActionEvent evt) {
252
                cmbWarningColorActionPerformed(evt);
253
            }
254
        });
255
256
        cmbFailureColor.addActionListener(new java.awt.event.ActionListener() {
257
            public void actionPerformed(java.awt.event.ActionEvent evt) {
258
                cmbFailureColorActionPerformed(evt);
259
            }
260
        });
261
262
        cmbSuccessColor.addActionListener(new java.awt.event.ActionListener() {
263
            public void actionPerformed(java.awt.event.ActionEvent evt) {
264
                cmbSuccessColorActionPerformed(evt);
265
            }
266
        });
267
228
        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
268
        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
229
        jPanel2.setLayout(jPanel2Layout);
269
        jPanel2.setLayout(jPanel2Layout);
230
        jPanel2Layout.setHorizontalGroup(
270
        jPanel2Layout.setHorizontalGroup(
Lines 249-265 Link Here
249
                        .addComponent(btnSelectFont))
289
                        .addComponent(btnSelectFont))
250
                    .addComponent(lblUnwrappedOnly, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
290
                    .addComponent(lblUnwrappedOnly, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
251
                    .addGroup(jPanel2Layout.createSequentialGroup()
291
                    .addGroup(jPanel2Layout.createSequentialGroup()
252
                        .addComponent(spnFontSize, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
292
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
253
                        .addGap(0, 0, Short.MAX_VALUE))
293
                            .addComponent(cmbLinkStyle, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
254
                    .addComponent(cmbBackgroundColor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
294
                            .addComponent(cmbImportantLinkColor, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
255
                    .addComponent(cmbStandardColor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
295
                            .addComponent(cmbLinkColor, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
256
                    .addComponent(cmbErrorColor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
296
                            .addComponent(cmbInputColor, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
257
                    .addComponent(cmbLinkColor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
297
                            .addComponent(cmbErrorColor, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
258
                    .addComponent(cmbImportantLinkColor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
298
                            .addComponent(cmbStandardColor, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
259
                    .addComponent(cmbLinkStyle, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
299
                            .addComponent(spnFontSize, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
260
                    .addComponent(cmbInputColor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
300
                            .addComponent(cmbBackgroundColor, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
301
                        .addGap(18, 18, 18)
302
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
303
                            .addComponent(jLabel2)
304
                            .addComponent(jLabel3)
305
                            .addComponent(jLabel4)
306
                            .addComponent(jLabel5))
307
                        .addGap(21, 21, 21)
308
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
309
                            .addComponent(cmbFailureColor, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
310
                            .addComponent(cmbWarningColor, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
311
                            .addComponent(cmbDebugColor, 0, 238, Short.MAX_VALUE)
312
                            .addComponent(cmbSuccessColor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
313
                        .addGap(0, 0, Short.MAX_VALUE)))
261
                .addGap(1, 1, 1))
314
                .addGap(1, 1, 1))
262
        );
315
        );
316
317
        jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cmbBackgroundColor, cmbDebugColor});
318
263
        jPanel2Layout.setVerticalGroup(
319
        jPanel2Layout.setVerticalGroup(
264
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
320
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
265
            .addGroup(jPanel2Layout.createSequentialGroup()
321
            .addGroup(jPanel2Layout.createSequentialGroup()
Lines 277-295 Link Here
277
                .addGap(18, 18, 18)
333
                .addGap(18, 18, 18)
278
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
334
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
279
                    .addComponent(lblBackgroundColor)
335
                    .addComponent(lblBackgroundColor)
280
                    .addComponent(cmbBackgroundColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
336
                    .addComponent(cmbBackgroundColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
337
                    .addComponent(jLabel2)
338
                    .addComponent(cmbDebugColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
281
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
339
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
282
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
340
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
283
                    .addComponent(cmbStandardColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
341
                    .addComponent(cmbStandardColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
284
                    .addComponent(lblStandardColor))
342
                    .addComponent(lblStandardColor)
343
                    .addComponent(jLabel3)
344
                    .addComponent(cmbWarningColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
285
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
345
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
286
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
346
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
287
                    .addComponent(cmbErrorColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
347
                    .addComponent(cmbErrorColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
288
                    .addComponent(lblErrorColor))
348
                    .addComponent(lblErrorColor)
349
                    .addComponent(jLabel4)
350
                    .addComponent(cmbFailureColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
289
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
351
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
290
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
352
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
291
                    .addComponent(lblInputColor)
353
                    .addComponent(lblInputColor)
292
                    .addComponent(cmbInputColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
354
                    .addComponent(cmbInputColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
355
                    .addComponent(jLabel5)
356
                    .addComponent(cmbSuccessColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
293
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
357
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
294
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
358
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
295
                    .addComponent(lblLinkColor)
359
                    .addComponent(lblLinkColor)
Lines 324-337 Link Here
324
                .addContainerGap()
388
                .addContainerGap()
325
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
389
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
326
                    .addComponent(previewPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
390
                    .addComponent(previewPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
327
                    .addGroup(layout.createSequentialGroup()
391
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
328
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
392
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
329
                            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
393
                        .addComponent(lblTitle)
330
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
394
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
331
                                .addComponent(lblTitle)
395
                        .addComponent(btnRestore))))
332
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
333
                                .addComponent(btnRestore)))
334
                        .addContainerGap())))
335
        );
396
        );
336
        layout.setVerticalGroup(
397
        layout.setVerticalGroup(
337
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
398
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
Lines 429-434 Link Here
429
        }
490
        }
430
    }//GEN-LAST:event_cmbInputColorActionPerformed
491
    }//GEN-LAST:event_cmbInputColorActionPerformed
431
492
493
    private void cmbDebugColorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbDebugColorActionPerformed
494
        Color debug = ((ColorComboBox) cmbDebugColor).getSelectedColor();
495
        if (debug != null) {
496
            outputOptions.setColorDebug(debug);
497
        }
498
    }//GEN-LAST:event_cmbDebugColorActionPerformed
499
500
    private void cmbWarningColorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbWarningColorActionPerformed
501
        Color warning = ((ColorComboBox) cmbWarningColor).getSelectedColor();
502
        if (warning != null) {
503
            outputOptions.setColorWarning(warning);
504
        }
505
    }//GEN-LAST:event_cmbWarningColorActionPerformed
506
507
    private void cmbFailureColorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbFailureColorActionPerformed
508
        Color failure = ((ColorComboBox) cmbFailureColor).getSelectedColor();
509
        if (failure != null) {
510
            outputOptions.setColorFailure(failure);
511
        }
512
    }//GEN-LAST:event_cmbFailureColorActionPerformed
513
514
    private void cmbSuccessColorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbSuccessColorActionPerformed
515
        Color success = ((ColorComboBox) cmbSuccessColor).getSelectedColor();
516
        if (success != null) {
517
            outputOptions.setColorSuccess(success);
518
        }
519
    }//GEN-LAST:event_cmbSuccessColorActionPerformed
520
432
    void load() {
521
    void load() {
433
        if (previewInputOutput == null) {
522
        if (previewInputOutput == null) {
434
            initPreview();
523
            initPreview();
Lines 465-478 Link Here
465
    private javax.swing.JButton btnRestore;
554
    private javax.swing.JButton btnRestore;
466
    private javax.swing.JButton btnSelectFont;
555
    private javax.swing.JButton btnSelectFont;
467
    private javax.swing.JComboBox cmbBackgroundColor;
556
    private javax.swing.JComboBox cmbBackgroundColor;
557
    private javax.swing.JComboBox cmbDebugColor;
468
    private javax.swing.JComboBox cmbErrorColor;
558
    private javax.swing.JComboBox cmbErrorColor;
559
    private javax.swing.JComboBox cmbFailureColor;
469
    private javax.swing.JComboBox cmbImportantLinkColor;
560
    private javax.swing.JComboBox cmbImportantLinkColor;
470
    private javax.swing.JComboBox cmbInputColor;
561
    private javax.swing.JComboBox cmbInputColor;
471
    private javax.swing.JComboBox cmbLinkColor;
562
    private javax.swing.JComboBox cmbLinkColor;
472
    private javax.swing.JComboBox cmbLinkStyle;
563
    private javax.swing.JComboBox cmbLinkStyle;
473
    private javax.swing.JComboBox cmbStandardColor;
564
    private javax.swing.JComboBox cmbStandardColor;
565
    private javax.swing.JComboBox cmbSuccessColor;
566
    private javax.swing.JComboBox cmbWarningColor;
474
    private javax.swing.JTextField fldFontFamily;
567
    private javax.swing.JTextField fldFontFamily;
475
    private javax.swing.JLabel jLabel1;
568
    private javax.swing.JLabel jLabel1;
569
    private javax.swing.JLabel jLabel2;
570
    private javax.swing.JLabel jLabel3;
571
    private javax.swing.JLabel jLabel4;
572
    private javax.swing.JLabel jLabel5;
476
    private javax.swing.JPanel jPanel2;
573
    private javax.swing.JPanel jPanel2;
477
    private javax.swing.JLabel lblBackgroundColor;
574
    private javax.swing.JLabel lblBackgroundColor;
478
    private javax.swing.JLabel lblErrorColor;
575
    private javax.swing.JLabel lblErrorColor;
Lines 550-555 Link Here
550
        selectColor(cmbInputColor, outputOptions.getColorInput());
647
        selectColor(cmbInputColor, outputOptions.getColorInput());
551
        selectColor(cmbBackgroundColor, outputOptions.getColorBackground());
648
        selectColor(cmbBackgroundColor, outputOptions.getColorBackground());
552
        selectColor(cmbLinkColor, outputOptions.getColorLink());
649
        selectColor(cmbLinkColor, outputOptions.getColorLink());
650
        selectColor(cmbDebugColor, outputOptions.getColorDebug());
651
        selectColor(cmbWarningColor, outputOptions.getColorWarning());
652
        selectColor(cmbFailureColor, outputOptions.getColorFailure());
653
        selectColor(cmbSuccessColor, outputOptions.getColorSuccess());
553
        selectColor(cmbImportantLinkColor,
654
        selectColor(cmbImportantLinkColor,
554
                outputOptions.getColorLinkImportant());
655
                outputOptions.getColorLinkImportant());
555
        cmbLinkStyle.setSelectedItem(
656
        cmbLinkStyle.setSelectedItem(
(-)a/core.output2/test/unit/src/org/netbeans/core/output2/NbIOTest.java (+49 lines)
Lines 47-55 Link Here
47
import java.awt.Color;
47
import java.awt.Color;
48
import java.io.IOException;
48
import java.io.IOException;
49
import java.io.Reader;
49
import java.io.Reader;
50
import static junit.framework.Assert.assertEquals;
50
import junit.framework.TestCase;
51
import junit.framework.TestCase;
51
import org.openide.util.Exceptions;
52
import org.openide.util.Exceptions;
52
import org.openide.windows.IOColorLines;
53
import org.openide.windows.IOColorLines;
54
import org.openide.windows.IOColors;
53
import org.openide.windows.OutputEvent;
55
import org.openide.windows.OutputEvent;
54
import org.openide.windows.OutputListener;
56
import org.openide.windows.OutputListener;
55
import org.openide.windows.OutputWriter;
57
import org.openide.windows.OutputWriter;
Lines 232-235 Link Here
232
            assertEquals(0, nullOuts[0]);
234
            assertEquals(0, nullOuts[0]);
233
        }
235
        }
234
    }
236
    }
237
238
    public void testIOColorsImpl() {
239
        NbIO io = new NbIO("test");
240
        io.getOptions().setColorStandard(Color.RED);
241
        io.getOptions().setColorError(Color.WHITE);
242
        io.getOptions().setColorInput(Color.YELLOW);
243
        io.getOptions().setColorLink(Color.PINK);
244
        io.getOptions().setColorLinkImportant(Color.LIGHT_GRAY);
245
        io.getOptions().setColorDebug(Color.CYAN);
246
        io.getOptions().setColorWarning(Color.BLACK);
247
        io.getOptions().setColorFailure(Color.MAGENTA);
248
        io.getOptions().setColorSuccess(Color.BLUE);
249
        assertEquals(Color.RED,
250
                IOColors.getColor(io, IOColors.OutputType.OUTPUT));
251
        assertEquals(Color.WHITE,
252
                IOColors.getColor(io, IOColors.OutputType.ERROR));
253
        assertEquals(Color.YELLOW,
254
                IOColors.getColor(io, IOColors.OutputType.INPUT));
255
        assertEquals(Color.PINK,
256
                IOColors.getColor(io, IOColors.OutputType.HYPERLINK));
257
        assertEquals(Color.LIGHT_GRAY,
258
                IOColors.getColor(io, IOColors.OutputType.HYPERLINK_IMPORTANT));
259
        assertEquals(Color.CYAN,
260
                IOColors.getColor(io, IOColors.OutputType.LOG_DEBUG));
261
        assertEquals(Color.BLACK,
262
                IOColors.getColor(io, IOColors.OutputType.LOG_WARNING));
263
        assertEquals(Color.MAGENTA,
264
                IOColors.getColor(io, IOColors.OutputType.LOG_FAILURE));
265
        assertEquals(Color.BLUE,
266
                IOColors.getColor(io, IOColors.OutputType.LOG_SUCCESS));
267
    }
268
269
    public void testIOColorsImplSetting() {
270
        NbIO io = new NbIO("test");
271
        io.getOptions().setColorStandard(Color.ORANGE);
272
        io.getOptions().setColorDebug(Color.WHITE);
273
        assertEquals(Color.ORANGE,
274
                IOColors.getColor(io, IOColors.OutputType.OUTPUT));
275
        assertEquals(Color.WHITE,
276
                IOColors.getColor(io, IOColors.OutputType.LOG_DEBUG));
277
        IOColors.setColor(io, IOColors.OutputType.OUTPUT, Color.BLUE);
278
        IOColors.setColor(io, IOColors.OutputType.LOG_DEBUG, Color.GREEN);
279
        assertEquals(Color.BLUE,
280
                IOColors.getColor(io, IOColors.OutputType.OUTPUT));
281
        assertEquals(Color.GREEN,
282
                IOColors.getColor(io, IOColors.OutputType.LOG_DEBUG));
283
    }
235
}
284
}
(-)a/maven/manifest.mf (-1 / +1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.maven/2
2
OpenIDE-Module: org.netbeans.modules.maven/2
3
OpenIDE-Module-Specification-Version: 2.77
3
OpenIDE-Module-Specification-Version: 2.78
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/maven/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/maven/Bundle.properties
5
OpenIDE-Module-Layer: org/netbeans/modules/maven/layer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/maven/layer.xml
6
AutoUpdate-Show-In-Client: false
6
AutoUpdate-Show-In-Client: false
(-)a/maven/nbproject/project.xml (-1 / +1 lines)
Lines 362-368 Link Here
362
                    <build-prerequisite/>
362
                    <build-prerequisite/>
363
                    <compile-dependency/>
363
                    <compile-dependency/>
364
                    <run-dependency>
364
                    <run-dependency>
365
                        <specification-version>1.13</specification-version>
365
                        <specification-version>1.40</specification-version>
366
                    </run-dependency>
366
                    </run-dependency>
367
                </dependency>
367
                </dependency>
368
                <dependency>
368
                <dependency>
(-)a/maven/src/org/netbeans/modules/maven/api/output/OutputVisitor.java (+32 lines)
Lines 46-51 Link Here
46
import javax.swing.Action;
46
import javax.swing.Action;
47
import org.netbeans.api.annotations.common.CheckForNull;
47
import org.netbeans.api.annotations.common.CheckForNull;
48
import org.netbeans.api.project.Project;
48
import org.netbeans.api.project.Project;
49
import org.openide.windows.IOColors;
50
import org.openide.windows.InputOutput;
49
import org.openide.windows.OutputListener;
51
import org.openide.windows.OutputListener;
50
52
51
/**
53
/**
Lines 59-64 Link Here
59
    private boolean important;
61
    private boolean important;
60
    private String line;
62
    private String line;
61
    private boolean skipLine = false;
63
    private boolean skipLine = false;
64
    private IOColors.OutputType outputType;
62
    private Color color;
65
    private Color color;
63
    private Context context;
66
    private Context context;
64
    
67
    
Lines 92-97 Link Here
92
        line = null;
95
        line = null;
93
        skipLine = false;
96
        skipLine = false;
94
        color = null;
97
        color = null;
98
        outputType = null;
95
    }
99
    }
96
    
100
    
97
    public OutputListener getOutputListener() {
101
    public OutputListener getOutputListener() {
Lines 155-160 Link Here
155
        return skipLine;
159
        return skipLine;
156
    }
160
    }
157
161
162
    /**
163
     * Get the color. If the output type was set using
164
     * {@link #setOutputType(org.openide.windows.IOColors.OutputType)}, try to
165
     * resolve the actual color. If the output type was not set, or the actual
166
     * color cannot be resolved, return value that was set using
167
     * {@link #setColor(java.awt.Color)}; supported.
168
     *
169
     * @since maven/2.78
170
     */
171
    public Color getColor(InputOutput io) {
172
        Color c = this.outputType == null
173
                ? null
174
                : IOColors.getColor(io, this.outputType);
175
        return c == null
176
                ? getColor()
177
                : c;
178
    }
179
158
    public Color getColor() {
180
    public Color getColor() {
159
        return color;
181
        return color;
160
    }
182
    }
Lines 163-168 Link Here
163
        this.color = color;
185
        this.color = color;
164
    }
186
    }
165
    
187
    
188
    /**
189
     * Set output type that will be used in method
190
     * {@link #getColor(org.openide.windows.InputOutput)}.
191
     *
192
     * @since maven/2.78
193
     */
194
    public void setOutputType(IOColors.OutputType outputType) {
195
        this.outputType = outputType;
196
    }
197
166
    public @CheckForNull Context getContext() {
198
    public @CheckForNull Context getContext() {
167
        return context;
199
        return context;
168
    }
200
    }
(-)a/maven/src/org/netbeans/modules/maven/execute/AbstractOutputHandler.java (-13 / +12 lines)
Lines 64-69 Link Here
64
import org.openide.util.RequestProcessor;
64
import org.openide.util.RequestProcessor;
65
import org.openide.windows.IOColorLines;
65
import org.openide.windows.IOColorLines;
66
import org.openide.windows.IOColorPrint;
66
import org.openide.windows.IOColorPrint;
67
import org.openide.windows.IOColors;
67
import org.openide.windows.InputOutput;
68
import org.openide.windows.InputOutput;
68
import org.openide.windows.OutputWriter;
69
import org.openide.windows.OutputWriter;
69
70
Lines 192-200 Link Here
192
                    ex.printStackTrace();
193
                    ex.printStackTrace();
193
                }
194
                }
194
            } else {
195
            } else {
195
                if (visitor.getColor() != null && IOColorLines.isSupported(getIO())) {
196
                if (visitor.getColor(getIO()) != null && IOColorLines.isSupported(getIO())) {
196
                    try {
197
                    try {
197
                        IOColorLines.println(getIO(), visitor.getLine(), visitor.getColor());
198
                        IOColorLines.println(getIO(), visitor.getLine(), visitor.getColor(getIO()));
198
                    } catch (IOException ex) {
199
                    } catch (IOException ex) {
199
                        Exceptions.printStackTrace(ex);
200
                        Exceptions.printStackTrace(ex);
200
                    }
201
                    }
Lines 295-328 Link Here
295
        }
296
        }
296
        if (!visitor.isLineSkipped()) {
297
        if (!visitor.isLineSkipped()) {
297
            String line = visitor.getLine() == null ? input : visitor.getLine();
298
            String line = visitor.getLine() == null ? input : visitor.getLine();
298
            if (visitor.getColor() == null && visitor.getOutputListener() == null) {
299
            if (visitor.getColor(getIO()) == null && visitor.getOutputListener() == null) {
299
                switch (level) {
300
                switch (level) {
300
                case DEBUG:
301
                case DEBUG:
301
                    visitor.setColor(Color.GRAY);
302
                    visitor.setOutputType(IOColors.OutputType.LOG_DEBUG);
302
                    break;
303
                    break;
303
                case WARNING:
304
                case WARNING:
304
                    visitor.setColor(Color.ORANGE.darker());
305
                    visitor.setOutputType(IOColors.OutputType.LOG_WARNING);
305
                    break;
306
                    break;
306
                case ERROR:
307
                case ERROR:
307
                    visitor.setColor(Color.RED);
308
                    break;
309
                case FATAL:
308
                case FATAL:
310
                    visitor.setColor(Color.MAGENTA);
309
                    visitor.setOutputType(IOColors.OutputType.LOG_FAILURE);
311
                    break;
310
                    break;
312
                }
311
                }
313
            }
312
            }
314
            try {
313
            try {
315
                if (visitor.getOutputListener() != null) {
314
                if (visitor.getOutputListener() != null) {
316
                    if (visitor.getColor() != null && IOColorPrint.isSupported(getIO())) {
315
                    if (visitor.getColor(getIO()) != null && IOColorPrint.isSupported(getIO())) {
317
                        IOColorPrint.print(getIO(), line + "\n", visitor.getOutputListener(), visitor.isImportant(), visitor.getColor());
316
                        IOColorPrint.print(getIO(), line + "\n", visitor.getOutputListener(), visitor.isImportant(), visitor.getColor(getIO()));
318
                    } else {
317
                    } else {
319
                        writer.println(line, visitor.getOutputListener(), visitor.isImportant());
318
                        writer.println(line, visitor.getOutputListener(), visitor.isImportant());
320
                    }
319
                    }
321
                } else {
320
                } else {
322
                    if (level.compareTo(Level.ERROR) >= 0 && IOColorPrint.isSupported(getIO())) {
321
                    if (level.compareTo(Level.ERROR) >= 0 && IOColorPrint.isSupported(getIO())) {
323
                        IOColorPrint.print(getIO(), line + "\n", null, true, visitor.getColor());
322
                        IOColorPrint.print(getIO(), line + "\n", null, true, visitor.getColor(getIO()));
324
                    } else if (visitor.getColor() != null && IOColorLines.isSupported(getIO())) {
323
                    } else if (visitor.getColor(getIO()) != null && IOColorLines.isSupported(getIO())) {
325
                        IOColorLines.println(getIO(), line, visitor.getColor());
324
                        IOColorLines.println(getIO(), line, visitor.getColor(getIO()));
326
                    } else {
325
                    } else {
327
                        writer.println(line);
326
                        writer.println(line);
328
                    }
327
                    }
(-)a/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java (-1 / +2 lines)
Lines 88-93 Link Here
88
import org.openide.util.RequestProcessor;
88
import org.openide.util.RequestProcessor;
89
import org.openide.util.Utilities;
89
import org.openide.util.Utilities;
90
import org.openide.windows.IOColorLines;
90
import org.openide.windows.IOColorLines;
91
import org.openide.windows.IOColors;
91
import org.openide.windows.InputOutput;
92
import org.openide.windows.InputOutput;
92
import org.openide.windows.OutputEvent;
93
import org.openide.windows.OutputEvent;
93
import org.openide.windows.OutputListener;
94
import org.openide.windows.OutputListener;
Lines 490-496 Link Here
490
    private static void printGray(InputOutput io, String text) {
491
    private static void printGray(InputOutput io, String text) {
491
        if (IOColorLines.isSupported(io)) {
492
        if (IOColorLines.isSupported(io)) {
492
            try {
493
            try {
493
                IOColorLines.println(io, text, Color.GRAY);
494
                IOColorLines.println(io, text, IOColors.getColor(io, IOColors.OutputType.LOG_DEBUG));
494
            } catch (IOException ex) {
495
            } catch (IOException ex) {
495
                Exceptions.printStackTrace(ex);
496
                Exceptions.printStackTrace(ex);
496
            }
497
            }
(-)a/maven/src/org/netbeans/modules/maven/output/GlobalOutputProcessor.java (-3 / +4 lines)
Lines 72-77 Link Here
72
import org.openide.util.Exceptions;
72
import org.openide.util.Exceptions;
73
import org.openide.util.NbBundle.Messages;
73
import org.openide.util.NbBundle.Messages;
74
import org.openide.util.RequestProcessor;
74
import org.openide.util.RequestProcessor;
75
import org.openide.windows.IOColors;
75
import org.openide.windows.InputOutput;
76
import org.openide.windows.InputOutput;
76
import org.openide.windows.OutputEvent;
77
import org.openide.windows.OutputEvent;
77
import org.openide.windows.OutputListener;
78
import org.openide.windows.OutputListener;
Lines 117-127 Link Here
117
        }
118
        }
118
        //silly prepend of  [INFO} to reuse the same regexp
119
        //silly prepend of  [INFO} to reuse the same regexp
119
        if (CommandLineOutputHandler.startPatternM3.matcher("[INFO] " + line).matches() || CommandLineOutputHandler.startPatternM2.matcher("[INFO] " + line).matches()) {
120
        if (CommandLineOutputHandler.startPatternM3.matcher("[INFO] " + line).matches() || CommandLineOutputHandler.startPatternM2.matcher("[INFO] " + line).matches()) {
120
            visitor.setColor(Color.GRAY);
121
            visitor.setOutputType(IOColors.OutputType.LOG_DEBUG);
121
            return;
122
            return;
122
        } 
123
        } 
123
        if (line.startsWith("BUILD SUCCESS")) { //NOI18N 3.0.4 has build success, some older versions have build successful
124
        if (line.startsWith("BUILD SUCCESS")) { //NOI18N 3.0.4 has build success, some older versions have build successful
124
            visitor.setColor(Color.GREEN.darker().darker());
125
            visitor.setOutputType(IOColors.OutputType.LOG_SUCCESS);
125
            return;
126
            return;
126
        }
127
        }
127
        
128
        
Lines 173-179 Link Here
173
        
174
        
174
        if (LOW_MVN.matcher(line).matches()) {
175
        if (LOW_MVN.matcher(line).matches()) {
175
            visitor.setLine(line + '\n' + TXT_ChangeSettings());
176
            visitor.setLine(line + '\n' + TXT_ChangeSettings());
176
            visitor.setColor(Color.RED);
177
            visitor.setOutputType(IOColors.OutputType.LOG_FAILURE);
177
            visitor.setOutputListener(new OutputListener() {
178
            visitor.setOutputListener(new OutputListener() {
178
                @Override public void outputLineSelected(OutputEvent ev) {}
179
                @Override public void outputLineSelected(OutputEvent ev) {}
179
                @Override public void outputLineAction(OutputEvent ev) {
180
                @Override public void outputLineAction(OutputEvent ev) {
(-)a/o.apache.tools.ant.module/nbproject/project.xml (-1 / +1 lines)
Lines 181-187 Link Here
181
                    <build-prerequisite/>
181
                    <build-prerequisite/>
182
                    <compile-dependency/>
182
                    <compile-dependency/>
183
                    <run-dependency>
183
                    <run-dependency>
184
                        <specification-version>1.23</specification-version>
184
                        <specification-version>1.40</specification-version>
185
                    </run-dependency>
185
                    </run-dependency>
186
                </dependency>
186
                </dependency>
187
                <dependency>
187
                <dependency>
(-)a/o.apache.tools.ant.module/src/org/apache/tools/ant/module/run/StandardLogger.java (-3 / +7 lines)
Lines 71-76 Link Here
71
import org.openide.util.lookup.ServiceProvider;
71
import org.openide.util.lookup.ServiceProvider;
72
import org.openide.windows.IOColorLines;
72
import org.openide.windows.IOColorLines;
73
import org.openide.windows.IOColorPrint;
73
import org.openide.windows.IOColorPrint;
74
import org.openide.windows.IOColors;
75
import org.openide.windows.IOColors;
74
import org.openide.windows.InputOutput;
76
import org.openide.windows.InputOutput;
75
import org.openide.windows.OutputListener;
77
import org.openide.windows.OutputListener;
76
78
Lines 252-258 Link Here
252
            InputOutput io = session.getIO();
254
            InputOutput io = session.getIO();
253
            if (IOColorLines.isSupported(io)) {
255
            if (IOColorLines.isSupported(io)) {
254
                try {
256
                try {
255
                    IOColorLines.println(io, msg, Color.GRAY);
257
                    IOColorLines.println(io, msg, IOColors.getColor(io, IOColors.OutputType.LOG_DEBUG));
256
                } catch (IOException x) {
258
                } catch (IOException x) {
257
                    ERR.log(Level.INFO, null, x);
259
                    ERR.log(Level.INFO, null, x);
258
                }
260
                }
Lines 350-356 Link Here
350
        InputOutput io = session.getIO();
352
        InputOutput io = session.getIO();
351
        if (IOColorLines.isSupported(io)) {
353
        if (IOColorLines.isSupported(io)) {
352
            try {
354
            try {
353
                IOColorLines.println(io, msg, error ? Color.RED : Color.GREEN.darker().darker());
355
                IOColorLines.println(io, msg, IOColors.getColor(io, error
356
                        ? IOColors.OutputType.LOG_FAILURE
357
                        : IOColors.OutputType.LOG_SUCCESS));
354
                return;
358
                return;
355
            } catch (IOException x) {
359
            } catch (IOException x) {
356
                ERR.log(Level.INFO, null, x);
360
                ERR.log(Level.INFO, null, x);
Lines 382-388 Link Here
382
                InputOutput io = session.getIO();
386
                InputOutput io = session.getIO();
383
                if (IOColorLines.isSupported(io)) {
387
                if (IOColorLines.isSupported(io)) {
384
                    try {
388
                    try {
385
                        IOColorLines.println(io, msg, Color.GRAY);
389
                        IOColorLines.println(io, msg, IOColors.getColor(io, IOColors.OutputType.LOG_DEBUG));
386
                    } catch (IOException x) {
390
                    } catch (IOException x) {
387
                        ERR.log(Level.INFO, null, x);
391
                        ERR.log(Level.INFO, null, x);
388
                    }
392
                    }
(-)a/openide.io/apichanges.xml (+18 lines)
Lines 107-112 Link Here
107
    <!-- ACTUAL CHANGES BEGIN HERE: -->
107
    <!-- ACTUAL CHANGES BEGIN HERE: -->
108
108
109
<changes>
109
<changes>
110
    <change id="coloredLoggingText">
111
      <api name="io"/>
112
      <summary>Added LOG_SUCCESS, LOG_FAILURE, LOG_WARNING and LOG_DEBUG into IOColors.OutputType to be able to specify a color of logging messages.</summary>
113
      <version major="1" minor="40"/>
114
      <date day="25" month="4" year="2013"/>
115
      <author login="jhavlin"/>
116
      <compatibility addition="yes" binary="compatible" semantic="compatible" />
117
      <description>
118
          <p>
119
              Added enum elements <code>LOG_SUCCESS, LOG_FAILURE, LOG_WARNING
120
              and LOG_DEBUG</code> into <code>IOColors.OutputType</code>
121
              that can be passed to get/setColor methods to have access
122
              to color of standard logging messages.
123
          </p>
124
      </description>
125
      <class package="org.openide.windows" name="IOColors"/>
126
      <issue number="225439" />
127
    </change>
110
    <change id="coloredInput">
128
    <change id="coloredInput">
111
      <api name="io"/>
129
      <api name="io"/>
112
      <summary>Added IOColors.OutputType.INPUT to be able to specify a color of input text.</summary>
130
      <summary>Added IOColors.OutputType.INPUT to be able to specify a color of input text.</summary>
(-)a/openide.io/manifest.mf (-1 / +1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.openide.io
2
OpenIDE-Module: org.openide.io
3
OpenIDE-Module-Specification-Version: 1.39
3
OpenIDE-Module-Specification-Version: 1.40
4
OpenIDE-Module-Localizing-Bundle: org/openide/io/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/openide/io/Bundle.properties
5
OpenIDE-Module-Recommends: org.openide.windows.IOProvider, org.openide.windows.IOContainer$Provider
5
OpenIDE-Module-Recommends: org.openide.windows.IOProvider, org.openide.windows.IOContainer$Provider
6
AutoUpdate-Essential-Module: true
6
AutoUpdate-Essential-Module: true
(-)a/openide.io/src/org/openide/windows/IOColors.java (+16 lines)
Lines 91-96 Link Here
91
        /** input text
91
        /** input text
92
         * @since 1.39 */
92
         * @since 1.39 */
93
        INPUT,
93
        INPUT,
94
        /** Info about success. Change is not guaranteed to affect colored
95
         * output written in the past.
96
         * @since 1.40 */
97
        LOG_SUCCESS,
98
        /** Info about failure. Change is not guaranteed to affect colored
99
         * output written in the past.
100
         * @since 1.40 */
101
        LOG_FAILURE,
102
        /**Info about warning. Change is not guaranteed to affect colored
103
         * output written in the past.
104
         * @since 1.40 */
105
        LOG_WARNING,
106
        /** Debugging info. Change is not guaranteed to affect colored
107
         * output written in the past.
108
         * @since 1.40 */
109
        LOG_DEBUG
94
    }
110
    }
95
111
96
    /**
112
    /**

Return to bug 225439