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.
Created attachment 130753 [details] Maven output colors image Maven output colors are hardcoded. This makes the output obscure on custom LNFs
Created attachment 130754 [details] Attachment contains code that exposes the maven output colors for customization.
thank you for the patch, since you have the Contributor agreement signed, I've applied it straight away.
https://hg.netbeans.org/core-main/rev/01ece7bb9008
on second thought, it appears that output windows has it's own configuration when it comes to colors in Tools/Misc/Output. With the patch applied, the changed colors in tools don't appear to change in maven output, but they do in ant (and they do in maven for old builds without your patch) I will have to revert the patch.
reverted: https://hg.netbeans.org/core-main/rev/430d95150400 not a defect, works more or less as designed. reassigning to output window for evaluation
Milos Thanks for the quick turnaround. Maven module doesn't use the colors in the Tools/Options/Misc/Output. If you look at the code, the colors are hardcoded prior to the patch. I think the patch is still valid. Please look at the AbstractOutputHandler Class to see how Color.Red is hardcoded for Error Logging level. Also, if you try maven without the patch applied and colors changed in tools/Misc/output, you will not see the colors changed. I don't see tools/misc/output in 7.2.1, I am guessing this must be a new feature in 7.3beta. Do you know if there is a work planned to add the maven colors to the tools/misc/output. Your thoughts..
(In reply to comment #6) > Thanks for the quick turnaround. Maven module doesn't use the colors in the > Tools/Options/Misc/Output. If you look at the code, the colors are hardcoded > prior to the patch. I think the patch is still valid. I also think that the patch should still be valid. I'll check it. > Please look at the AbstractOutputHandler Class to see how Color.Red is > hardcoded for Error Logging level. Also, if you try maven without the patch > applied and colors changed in tools/Misc/output, you will not see the colors > changed. In tools/Misc/output, only a few standard colors can be configured. Customized colors that are set by Output Window clients (e.g. Maven Support) are not modified. > I don't see tools/misc/output in 7.2.1, I am guessing this must be a new > feature in 7.3beta. Yes, it is new in 7.3. > Do you know if there is a work planned to add the maven > colors to the tools/misc/output. No such work is planned. I even think that it should not be there (Output Window should not be required to understand Maven or to depend on it). Milos, please, any ideas? Thank you.
The majority of output will be modified by Tools/output (hyperlinks, regular output, background etc) if some of the entries are not available via API, we have to hardcode them, yes. The problem with standard error output is that it assumes 2 independent streams, but for maven output we mostly have just one stream and printing a line here and another one there is error prone. So we hardcode the color and print to stdout. If there's a standard way that would map to the default color from the Tools/Options I'm happy to use it. same with gray output for debug messages etc. the UIManager keys like "nb.output.error.foreground", how are they related to the values shown in Tools/Options? are they invented on the maven support level? BTW: as an experiment, I've changed all foreground color to green in Tools/Options. neither Ant nor Maven output complied 100%. So the issue is not entirely related to maven only but needs to be handled in a general way, allowing at least to share some UI keys. However there will always be a conflict between someone tweaking the UI from PLAF level and from UI level. Unless UI exposes all coloring settings somehow.. (In reply to comment #7) > (In reply to comment #6) > > Thanks for the quick turnaround. Maven module doesn't use the colors in the > > Tools/Options/Misc/Output. If you look at the code, the colors are hardcoded > > prior to the patch. I think the patch is still valid. > I also think that the patch should still be valid. I'll check it. > > > Please look at the AbstractOutputHandler Class to see how Color.Red is > > hardcoded for Error Logging level. Also, if you try maven without the patch > > applied and colors changed in tools/Misc/output, you will not see the colors > > changed. > In tools/Misc/output, only a few standard colors can be configured. Customized > colors that are set by Output Window clients (e.g. Maven Support) are not > modified. > > > I don't see tools/misc/output in 7.2.1, I am guessing this must be a new > > feature in 7.3beta. > Yes, it is new in 7.3. > > > Do you know if there is a work planned to add the maven > > colors to the tools/misc/output. > No such work is planned. I even think that it should not be there (Output > Window should not be required to understand Maven or to depend on it). > > Milos, please, any ideas? > > Thank you.
I would have to look at your comment at leisure and I will. But on the surface, maven colors are typical logging colors and the output colors are something netbeans uses. We could expand the output color set by including the logging level colors. We could then use the logging level colors inside maven module. This way any plugin who wants to log can use these colors. Your thoughts ...
Integrated into 'main-golden', will be available in build *201301300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/01ece7bb9008 User: Milos Kleint <mkleint@netbeans.org> Log: #225439 avoid hardcoding colors in maven output, patch provided by venkatramakkineni@netbeans.org
(In reply to comment #9) > Maven colors are typical logging colors and the output colors are something > netbeans uses. We could expand the output color set by including the logging > level colors. We could then use the logging level colors inside maven module. > This way any plugin who wants to log can use these colors. Your thoughts ... I agree this is the right solution. Thanks.
Created attachment 133838 [details] Proposed Patch Full patch. Changes in Ant, Maven Projects, I/O APIs and Output Window.
Created attachment 133840 [details] Changes in I/O APIs
Created attachment 133841 [details] Changes in Maven Projects API
Please review API changes in module I/O APIs (openide.io, public API) and in module Maven Projects (maven, friend-private API). The patch can be applied over patch for bug 228480, in branch output_folding_208022 in repository core-main. (If you are not interested in all changes, you can check attached diffs containing only relevant changes in the API.) Thank you in advance.
If there are no objections, I'll integrate the patch tomorrow morning. Thank you for reviewing.
Integrated as http://hg.netbeans.org/core-main/rev/33d52f118356
Thanks a million jhavlin. I looked at the code and it is doesn't seem like it is a breaking change for me. Great work and thanks for the relatively quick turnaround even though this change might not be a priority for the core netbeans development.
Integrated into 'main-golden', will be available in build *201305032300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2f2b0132b1f6 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #225439: Maven output colors are hardcoded