mbien commented on code in PR #8326: URL: https://github.com/apache/netbeans/pull/8326#discussion_r2020292908
########## ide/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanel.java: ########## @@ -381,16 +385,26 @@ private JToolBar getToolBar() { toolbar.add(expandButton); toolbar.add(logicalViewButton); toolbar.add(physicalViewButton); - if (ui instanceof RefactoringCustomUI) { + toolbar.add(previewButton); + if (refactoringUI instanceof RefactoringCustomUI) { toolbar.add(customViewButton); } return toolbar; } - + + private Preferences getPreferences() { + return NbPreferences.forModule(RefactoringPanel.class); + } + + private String preferencesKeyForUI(String uiPreference) { + Class<?> targetClass = refactoringUI.getClass(); + return targetClass.getName() + "." + uiPreference; + } Review Comment: this is just a nitpick but there are about 20 `RefactoringUI` subclasses - I am wondering if this kind of granularity is needed. It might look like a bug to the user that the rename refactoring preview setting isn't the same as the add-override refactoring setting. It might potentially be better to use something like ```java getClass().getName() + "_" + (isQuery ? "query" : "refactoring") + "." + uiPreference; ``` as key. The windows should be fairly similar to each other, the main difference is diff vs regular preview. edit: `isQuery` essentially marks if this is the read only find-usages window or a refactoring window. https://github.com/apache/netbeans/blob/e889e333f231e89b78aa8744626888032f87d076/ide/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanel.java#L689 -- 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. To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists