mbien commented on code in PR #9051:
URL: https://github.com/apache/netbeans/pull/9051#discussion_r2573509388
##########
ide/bugtracking.bridge/src/org/netbeans/modules/bugtracking/vcs/HookPanel.java:
##########
@@ -239,4 +241,7 @@ public void stateChanged(ChangeEvent e) {
enableFields();
}
+ private boolean hasRegisteredConnectors() {
+ return
!Lookup.getDefault().lookupResult(BugtrackingConnector.class).allClasses().isEmpty();
Review Comment:
nit: `Lookup.getDefault().lookup(BugtrackingConnector.class) != null;`
potentially simpler/more efficient?
##########
ide/bugtracking.bridge/src/org/netbeans/modules/bugtracking/bridge/nodes/BugtrackingRootNode.java:
##########
@@ -85,10 +87,18 @@ public static BugtrackingRootNode getDefault() {
public Action[] getActions(boolean context) {
return new Action[] {
new AbstractAction(NbBundle.getMessage(BugtrackingRootNode.class,
"LBL_CreateRepository")) { // NOI18N
+ boolean enabled =
!Lookup.getDefault().lookupResult(BugtrackingConnector.class).allClasses().isEmpty();
Review Comment:
nit: `Lookup.getDefault().lookup(BugtrackingConnector.class) != null;`
potentially simpler/more efficient?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists