mbien commented on code in PR #9776:
URL: https://github.com/apache/netbeans/pull/9776#discussion_r4496727984
##########
ide/projectui/src/org/netbeans/modules/project/ui/actions/LookupSensitiveAction.java:
##########
@@ -164,28 +174,50 @@ private void doRefresh(boolean immediate) {
r.setResourceBundle(NbBundle.getBundle(LookupSensitiveAction.class));
r.setParameters(new Object[]{
getClass(),
- lookup
+ context
});
r.setLoggerName(LOG.getName());
LOG.log(r);
}
- refresh(lookup, immediate);
+ refresh(context);
} finally {
refreshing = false;
}
needsRefresh = false;
}
- // Abstract methods
--------------------------------------------------------
-
/** Called when the action is performed
*/
protected abstract void actionPerformed( Lookup context );
- /** Place where to change properties (enablement/name) when
- * the set of current projects changes.
+ /**
+ * Place where to change properties (enablement/name) when
+ * the set of current projects changes.
+ *
+ * <p>Invoked on a background (request processor) thread for
+ * scheduled refreshes, or synchronously on the calling thread
+ * (usually the EDT) when {@link #isEnabled()} or
+ * {@link #getValue(String)} forces a refresh of stale state.
*/
- protected abstract void refresh(Lookup context, boolean immediate);
+ protected abstract void refresh(Lookup context);
Review Comment:
the regular case is RP. The exception would be e.g: user opens context menu
and action wasn't refreshed yet.
--
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