org.netbeans.modules.projectuiapi/1 1.51.1 8

org.netbeans.spi.project.ui.support
Class CommonProjectActions

java.lang.Object
  extended by org.netbeans.spi.project.ui.support.CommonProjectActions

public class CommonProjectActions
extends Object

Factory for commonly needed generic project actions.


Field Summary
static String EXISTING_SOURCES_FOLDER
          FileObject value honored by newProjectAction() that defines initial value for existing sources directory choosers.
 
Method Summary
static Action closeProjectAction()
          Create an action "Close Project".
static Action copyProjectAction()
          Create an action "Copy Project".
static Action customizeProjectAction()
          Create an action "Customize Project".
static Action deleteProjectAction()
          Create an action "Delete Project".
static Action[] forType(String projectType)
          Loads actions to be displayed in the context menu of LogicalViewProvider.createLogicalView().
static Action moveProjectAction()
          Create an action "Move Project".
static Action newFileAction()
          Create an action project dependent "New File" action.
static Action newProjectAction()
          Creates action that invokes New Project wizard.
static Action openSubprojectsAction()
          Create an action "Open Subprojects".
static Action renameProjectAction()
          Create an action "Rename Project".
static Action setAsMainProjectAction()
          Create an action "Set As Main Project".
static Action setProjectConfigurationAction()
          Creates an action that sets the configuration of the selected project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXISTING_SOURCES_FOLDER

public static final String EXISTING_SOURCES_FOLDER
FileObject value honored by newProjectAction() that defines initial value for existing sources directory choosers.

Since:
org.netbeans.modules.projectuiapi/1 1.3
See Also:
Constant Field Values
Method Detail

setAsMainProjectAction

public static Action setAsMainProjectAction()
Create an action "Set As Main Project". It should be invoked with an action context containing one Project.

You might include this in the context menu of a logical view.

Returns:
an action

customizeProjectAction

public static Action customizeProjectAction()
Create an action "Customize Project". It should be invoked with an action context containing one Project.

You might include this in the context menu of a logical view.

Returns:
an action

openSubprojectsAction

public static Action openSubprojectsAction()
Create an action "Open Subprojects". It should be invoked with an action context containing one or more Projects.

You might include this in the context menu of a logical view.

Returns:
an action
See Also:
SubprojectProvider

closeProjectAction

public static Action closeProjectAction()
Create an action "Close Project". It should be invoked with an action context containing one or more Projects.

You might include this in the context menu of a logical view.

Returns:
an action

newFileAction

public static Action newFileAction()
Create an action project dependent "New File" action.

You might include this in the context menu of a logical view.

Returns:
an action
See Also:
PrivilegedTemplates, RecommendedTemplates

deleteProjectAction

public static Action deleteProjectAction()
Create an action "Delete Project". It should be invoked with an action context containing one or more Projects.

You might include this in the context menu of a logical view.

Returns:
an action
Since:
1.8

copyProjectAction

public static Action copyProjectAction()
Create an action "Copy Project". It should be invoked with an action context containing one or more Projects.

You might include this in the context menu of a logical view.

Returns:
an action
Since:
1.10

moveProjectAction

public static Action moveProjectAction()
Create an action "Move Project". It should be invoked with an action context containing one or more Projects.

You might include this in the context menu of a logical view.

Returns:
an action
Since:
1.10

renameProjectAction

public static Action renameProjectAction()
Create an action "Rename Project". It should be invoked with an action context containing one or more Projects.

You might include this in the context menu of a logical view.

Returns:
an action
Since:
1.10

newProjectAction

public static Action newProjectAction()
Creates action that invokes New Project wizard.

EXISTING_SOURCES_FOLDER keyed action value can carry FileObject that points to existing sources folder. Set this value if you open the wizard and you know user expectations about initial value for wizard choosers that refers to existing sources location.

Returns:
an action
Since:
org.netbeans.modules.projectuiapi/1 1.3

setProjectConfigurationAction

public static Action setProjectConfigurationAction()
Creates an action that sets the configuration of the selected project. It should be displayed with an action context containing exactly one Project. The action itself should not be invoked but you may use its popup presenter.

You might include this in the context menu of a logical view.

Returns:
an action
Since:
org.netbeans.modules.projectuiapi/1 1.17
See Also:
ProjectConfigurationProvider

forType

public static Action[] forType(String projectType)
Loads actions to be displayed in the context menu of LogicalViewProvider.createLogicalView(). The current implementation simply loads actions from Projects/<projectType>/Actions but in the future it may merge in actions from another location as well.

The folder is recommended to contain a link to Projects/Actions at some position in order to pick up miscellaneous actions applicable to all project types.

Parameters:
projectType - a type token, such as org-netbeans-modules-java-j2seproject
Returns:
a list of actions
Since:
org.netbeans.modules.projectuiapi/1 1.43

org.netbeans.modules.projectuiapi/1 1.51.1 8

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.