Revivius / nb-darcula

Darcula LAF for NetBeans
277 stars 83 forks source link

Hide exceptions stack traces in simple NetBeans Platform based apps #97

Closed AlexFalappa closed 1 year ago

AlexFalappa commented 8 years ago

This PR "suppresses" the stacktraces logged by plugin when it tries to apply LAF tweaks by reflection and it does not find the java classes. This scenario is frequent if you build simple applications based on the NetBeans Rich-Client Platform as those apps do not start with all NetBeans modules.

After applying the PR the log messages of the plugin in a typical NetBeans Platform application are reduced to:

...
INFO [com.revivius.nb.darcula.DarculaLFCustoms]: Could not tweak Darcula Look and Feel in the following classes:
    org.netbeans.modules.web.core.syntax.completion.api.JspCompletionItem (java.lang.ClassNotFoundException)
    org.netbeans.modules.editor.search.SearchBar (java.lang.ClassNotFoundException)
    org.netbeans.editor.GlyphGutter (java.lang.ClassNotFoundException)
    org.netbeans.modules.html.editor.api.completion.HtmlCompletionItem$Tag (java.lang.ClassNotFoundException)
    org.netbeans.modules.form.layoutdesign.LayoutPainter (java.lang.ClassNotFoundException)
    org.netbeans.modules.db.sql.editor.completion.SQLCompletionItem (java.lang.ClassNotFoundException)
    org.netbeans.modules.csl.editor.completion.GsfCompletionItem$CompletionFormatter (java.lang.ClassNotFoundException)
...
INFO [com.revivius.nb.darcula.Installer]: Cannot get the current editor colors profile (java.lang.ClassNotFoundException).
...

Fixes #96 and #69

AlexFalappa commented 6 years ago

Should also fix #158