You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/03/19 04:01:45 UTC

[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2031: [NETBEANS-3942] FlatLaf: fix editor annotations when switching LaF and switching color profile too on restart

JaroslavTulach commented on a change in pull request #2031: [NETBEANS-3942] FlatLaf: fix editor annotations when switching LaF and switching color profile too on restart
URL: https://github.com/apache/netbeans/pull/2031#discussion_r394779075
 
 

 ##########
 File path: platform/core.windows/src/org/netbeans/core/windows/options/LafPanel.java
 ##########
 @@ -296,7 +297,11 @@ private void switchEditorColorsProfile() {
         try {
             Class klz = cl.loadClass( COLOR_MODEL_CLASS_NAME );
             Object colorModel = klz.newInstance();
-            Method m = klz.getDeclaredMethod( "setCurrentProfile", String.class ); //NOI18N
+            Method m = klz.getDeclaredMethod( "getAnnotations", String.class ); //NOI18N
 
 Review comment:
   Wow! That is ugly. Isn't the UI misplaced when it needs to use reflection to load a class from other module? If not, then ideally there would be an SPI interface `CurrentProfile` and one would use `Lookup.getDefault().lookupAll(CurrentProfile.class).forEach(it -> it.setProfile(preferredProfile))`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists