| java.lang.Object org.netbeans.spi.project.ui.support.ProjectSensitiveActions
ProjectSensitiveActions | public class ProjectSensitiveActions (Code) | | Factory for creating project-sensitive actions.
author: Petr Hrebejk |
projectCommandAction | public static Action projectCommandAction(String command, String namePattern, Icon icon)(Code) | | Creates an action sensitive to the set of currently selected projects.
When performed the action will call the given command on the
org.netbeans.spi.project.ActionProvider of
the selected project(s). The action will only be enabled when the exactly one
project is selected and the command is enabled in the project's action provider.
Shortcuts for actions are shared according to command, i.e. actions based on the same command
will have the same shortcut.
Parameters: command - the command which should be invoked when the action isperformed (see e.g. constants in org.netbeans.spi.project.ActionProvider) Parameters: namePattern - a pattern which should be used for determining the action'sname (label). It takes two parameters a la java.text.MessageFormat: {0} - number of selected projects;{1} - name of the first project. Parameters: icon - icon of the action (or null) an action sensitive to the current project |
projectSensitiveAction | public static Action projectSensitiveAction(ProjectActionPerformer performer, String namePattern, Icon icon)(Code) | | Creates an action sensitive to the set of currently selected projects.
When performed the action will call
ProjectActionPerformer.perform on the action performer supplied
as a parameter. The action will only be enabled when the exactly one
project is selected and
ProjectActionPerformer.enable returns true.
Notice that it is not guaranteed that the
ProjectActionPerformer.enable method will be called unless the project selection changes and someone is
listeningon the action or explicitely asks for some of the action's values.
Parameters: performer - an action performer. Parameters: namePattern - pattern which should be used for determining the action'sname (label). It takes two parameters a la java.text.MessageFormat: {0} - number of selected projects;{1} - name of the first project. Parameters: icon - icon of the action (XXX or null?) an action sensitive to the current project |
|
|