| java.lang.Object org.netbeans.modules.project.ui.actions.ActionsUtil
ActionsUtil | class ActionsUtil (Code) | | Nice utility methods to be used in ProjectBased Actions
author: Pet Hrebejk |
Inner Class :public static class ShortcutsManager | |
SHORCUTS_MANAGER | final public static ShortcutsManager SHORCUTS_MANAGER(Code) | | |
commandSupported | public static boolean commandSupported(Project project, String command, Lookup context)(Code) | | Tests whether given command is available on the project and whether
the action as to be enabled in current Context
Parameters: project - Project to test Parameters: command - Command for test Parameters: context - Lookup representing current context or null if contextdoes not matter. |
formatName | public static String formatName(String namePattern, int numberOfObjects, Object firstObjectName)(Code) | | Good for formating names of actions with some two parameter pattern
{0} nuber of objects (e.g. Projects or files ) and {1} name of one
or first object (e.g. Project or file) or null if the number is == 0
{2} whats the type of the name 0 == normal, 1 == menu, 2 == popup
|
getFilesFromLookup | public static FileObject[] getFilesFromLookup(Lookup lookup, Project project)(Code) | | In given lookup will find all FileObjects owned by given project
with given command supported.
|
getProjectsFromLookup | public static Project[] getProjectsFromLookup(Lookup lookup, String command)(Code) | | Finds all projects in given lookup. If the command is not null it will check
whther given command is enabled on all projects. If and only if all projects
have the command supported it will return array including the project. If there
is one project with the command disabled it will return empty array.
|
|
|