Skip to content

Commit be395d4

Browse files
authored
More javadoc for RootAction.isPrimary (#10767)
2 parents 736c3b6 + d90812c commit be395d4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

core/src/main/java/hudson/model/RootAction.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ public interface RootAction extends Action, ExtensionPoint {
5454
/**
5555
* Identifies if the action is a primary action.
5656
* Primary actions may be handled differently in the UI (for example, by always showing on the header rather than in an actions dropdown).
57-
* In almost all cases this should return {@code false} which is the default
58-
* @return {@code true} iff this action should be considered primary.
57+
* In almost all cases this should return {@code false} which is the default.
58+
* Examples of a Primary action would be where actions would be used regularly or they would need to be prominent to convey some status.
59+
* As a concrete example, an action that provides a Help action with a submenu containing various different links, would be a prime candidate for this to return {@code true}.
60+
* If your action has the possibility of a {@link #getBadge() badge} then this is another indicator that the action should return {@code true} (or otherwise restructured).
61+
* @return {@code true} if and only if this action should be considered primary.
5962
* @since 2.516
6063
*/
6164
default boolean isPrimaryAction() {

0 commit comments

Comments
 (0)