@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public class ContextMenuIconUtils extends Object
Icon, IconSet and
ModelObjectWithContextMenu.ContextMenu.| Modifier and Type | Method and Description |
|---|---|
static void |
addMenuItem(jenkins.model.ModelObjectWithContextMenu.ContextMenu menu,
hudson.model.Action action)
Adds a menu item for the specified action.
|
static void |
addMenuItem(jenkins.model.ModelObjectWithContextMenu.ContextMenu menu,
String prefix,
hudson.model.Action action)
Adds a menu item for the specified action with the supplied prefix offset.
|
static void |
addMenuItem(jenkins.model.ModelObjectWithContextMenu.ContextMenu menu,
String prefix,
hudson.model.Action action,
jenkins.model.ModelObjectWithContextMenu.ContextMenu subMenu)
Adds a menu item for the specified action with the supplied prefix offset and optional sub menu.
|
static String |
buildUrl(String... segments)
Combine segments of an URL in the style expected by
ModelObjectWithContextMenu.MenuItem. |
static org.jenkins.ui.icon.Icon |
getIcon(hudson.model.Action action)
IconSet support has not been implemented for ModelObjectWithContextMenu.ContextMenu as of
Jenkins 2.5. |
static org.jenkins.ui.icon.Icon |
getIconByClassSpec(String spec)
Navigate the signature changes in different versions of
IconSet. |
static String |
getMenuItemIconUrl(String url)
Converts a regular icon url into a menu item icon url
|
static String |
getMenuItemIconUrlByClassSpec(String spec)
Gets the qualified URL for an icon spec.
|
static String |
getQualifiedUrl(org.jenkins.ui.icon.Icon icon)
Gets the qualified URL of the specified icon.
|
@NonNull public static String buildUrl(String... segments)
ModelObjectWithContextMenu.MenuItem.segments - the segments.public static void addMenuItem(@NonNull
jenkins.model.ModelObjectWithContextMenu.ContextMenu menu,
@CheckForNull
String prefix,
@NonNull
hudson.model.Action action,
@CheckForNull
jenkins.model.ModelObjectWithContextMenu.ContextMenu subMenu)
menu - the menu to add to.prefix - the prefix offset of the action urls.action - the action.subMenu - the sub menu.public static void addMenuItem(@NonNull
jenkins.model.ModelObjectWithContextMenu.ContextMenu menu,
@CheckForNull
String prefix,
@NonNull
hudson.model.Action action)
menu - the menu to add to.prefix - the prefix offset of the action urls.action - the action.public static void addMenuItem(@NonNull
jenkins.model.ModelObjectWithContextMenu.ContextMenu menu,
@NonNull
hudson.model.Action action)
menu - the menu to add to.action - the action.@CheckForNull public static String getMenuItemIconUrlByClassSpec(@CheckForNull String spec)
spec - the icon spec.public static String getMenuItemIconUrl(String url)
url - the "regular" icon url.@CheckForNull public static org.jenkins.ui.icon.Icon getIconByClassSpec(String spec)
IconSet.spec - the spec to look up.Icon or null@CheckForNull
public static org.jenkins.ui.icon.Icon getIcon(@NonNull
hudson.model.Action action)
IconSet support has not been implemented for ModelObjectWithContextMenu.ContextMenu as of
Jenkins 2.5. Hacks to work around
some of the fun method signature migrations in IconSet.action - the action.Icon or null@CheckForNull public static String getQualifiedUrl(@CheckForNull org.jenkins.ui.icon.Icon icon)
icon - the icon.Copyright © 2016–2017. All rights reserved.