public class CommonProjectActions extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EXISTING_SOURCES_FOLDER
FileObject value honored by CommonProjectActions.newProjectAction()
that defines initial value for existing sources directory choosers. |
static String |
INITIAL_VALUE_PROPERTIES
String []-valued action property honored by CommonProjectActions.newProjectAction()
for propagating custom properties to the new project wizard's
WizardDescriptor |
static String |
PRESELECT_CATEGORY
String -valued action property honored by CommonProjectActions.newProjectAction()
that defines the project category (subfolder code name) to be selected. |
static String |
PROJECT_PARENT_FOLDER
File value honored by CommonProjectActions.newProjectAction()
that defines initial value for parent folder |
Modifier and Type | Method and Description |
---|---|
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 |
newProjectAction(String categoryPath,
Map<String,Object> initialProperties)
Creates action that invokes the New Project wizard, preselects the
given category path and propagates a set of custom properties the wizard's
WizardDescriptor . |
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.
|
public static final String EXISTING_SOURCES_FOLDER
FileObject
value honored by CommonProjectActions.newProjectAction()
that defines initial value for existing sources directory choosers.public static final String PROJECT_PARENT_FOLDER
File
value honored by CommonProjectActions.newProjectAction()
that defines initial value for parent folderpublic static final String PRESELECT_CATEGORY
String
-valued action property honored by CommonProjectActions.newProjectAction()
that defines the project category (subfolder code name) to be selected.public static final String INITIAL_VALUE_PROPERTIES
String
[]-valued action property honored by CommonProjectActions.newProjectAction()
for propagating custom properties to the new project wizard's
WizardDescriptor
public static Action setAsMainProjectAction()
Project
.
You might include this in the context menu of a logical view.
public static Action customizeProjectAction()
Project
.
You might include this in the context menu of a logical view.
public static Action openSubprojectsAction()
Project
s.
You might include this in the context menu of a logical view.
SubprojectProvider
,
ProjectContainerProvider
public static Action closeProjectAction()
Project
s.
You might include this in the context menu of a logical view.
public static Action newFileAction()
You might include this in the context menu of a logical view.
PrivilegedTemplates
,
RecommendedTemplates
public static Action deleteProjectAction()
Project
s.
You might include this in the context menu of a logical view.
public static Action copyProjectAction()
Project
s.
You might include this in the context menu of a logical view.
public static Action moveProjectAction()
Project
s.
You might include this in the context menu of a logical view.
public static Action renameProjectAction()
Project
s.
You might include this in the context menu of a logical view.
public static Action newProjectAction()
CommonProjectActions.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.
CommonProjectActions.PRESELECT_CATEGORY
keyed action value can carry a String
that presents a category path to be selected in the new project wizard.
CommonProjectActions.INITIAL_VALUE_PROPERTIES
keyed action value can carry a
String
array of custom property names which are to be propagated
to the new project wizard's WizardDescriptor
Action a = newProjectAction(); a.putValue(INITIAL_VALUE_PROPERTIES, new String[] {key1, key2}); a.putValue(key1, value1); a.putValue(key2, value2);
public static Action newProjectAction(String categoryPath, Map<String,Object> initialProperties)
WizardDescriptor
.categoryPath
- the category path to be selectedinitialProperties
- a map of custom properties which are propagated
to the new project wizard's WizardDescriptor
public static Action setProjectConfigurationAction()
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.
ProjectConfigurationProvider
public static Action[] forType(String projectType)
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.
projectType
- a type token, such as org-netbeans-modules-java-j2seproject