|
org.netbeans.modules.projectuiapi/1 1.47.2 8 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.spi.project.ui.templates.support.Templates
public class Templates
Default implementations of template UI.
| Nested Class Summary | |
|---|---|
static class |
Templates.SimpleTargetChooserBuilder
A builder for simple target choosers. |
| Method Summary | |
|---|---|
static Templates.SimpleTargetChooserBuilder |
buildSimpleTargetChooser(Project project,
SourceGroup[] folders)
Builder for simple target choosers. |
static WizardDescriptor.Panel<WizardDescriptor> |
createSimpleTargetChooser(Project project,
SourceGroup[] folders)
Deprecated. Use buildSimpleTargetChooser(org.netbeans.api.project.Project, org.netbeans.api.project.SourceGroup[]) instead. |
static WizardDescriptor.Panel<WizardDescriptor> |
createSimpleTargetChooser(Project project,
SourceGroup[] folders,
WizardDescriptor.Panel<WizardDescriptor> bottomPanel)
Deprecated. Use buildSimpleTargetChooser(org.netbeans.api.project.Project, org.netbeans.api.project.SourceGroup[]) instead. |
static boolean |
getDefinesMainProject(WizardDescriptor wizardDescriptor)
Checks whether a project wizard will set the main project. |
static FileObject |
getExistingSourcesFolder(WizardDescriptor wizardDescriptor)
Find the existing sources folder selected for a custom template wizard iterator. |
static Project |
getProject(WizardDescriptor wizardDescriptor)
Find the project selected for a custom template wizard iterator. |
static FileObject |
getTargetFolder(WizardDescriptor wizardDescriptor)
Find the target folder selected for a custom template wizard iterator. |
static String |
getTargetName(WizardDescriptor wizardDescriptor)
Method to communicate current choice of target name to a custom WizardDescriptor.InstantiatingIterator associated with particular template. |
static FileObject |
getTemplate(WizardDescriptor wizardDescriptor)
Find the template with which a custom template wizard iterator is associated. |
static void |
setDefinesMainProject(WizardDescriptor wizardDescriptor,
boolean definesMainProject)
Specify whether a project wizard will set the main project. |
static void |
setTargetFolder(WizardDescriptor wizardDescriptor,
FileObject folder)
Stores a target folder so that it can be remembered later using getTargetFolder(org.openide.WizardDescriptor). |
static void |
setTargetName(WizardDescriptor wizardDescriptor,
String targetName)
Sets the target name for given WizardDescriptor to be used from custom target choosers |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Project getProject(WizardDescriptor wizardDescriptor)
If the user selects File | New File, this will be the project chosen in the first panel.
If the user selects New from CommonProjectActions.newFileAction(), this will
be the project on which the context menu was invoked.
wizardDescriptor - the wizard as passed to WizardDescriptor.InstantiatingIterator#initialize
or TemplateWizard.Iterator#initialize
public static FileObject getTemplate(WizardDescriptor wizardDescriptor)
If the user selects File | New File, this will be the template chosen in the first panel.
If the user selects New from CommonProjectActions.newFileAction(), this will
be the template selected from the context submenu.
wizardDescriptor - the wizard as passed to WizardDescriptor.InstantiatingIterator#initialize
or TemplateWizard.Iterator#initialize
public static FileObject getTargetFolder(WizardDescriptor wizardDescriptor)
If the user selects File | New File
this may not be set, unless you have called setTargetFolder(org.openide.WizardDescriptor, org.openide.filesystems.FileObject)
in an earlier panel (such as that created by createSimpleTargetChooser(Project,SourceGroup[])).
It may however have a preselected folder, e.g. if the user invoked New from
the context menu of a folder.
wizardDescriptor - the wizard as passed to WizardDescriptor.InstantiatingIterator#initialize
or TemplateWizard.Iterator#initialize
public static FileObject getExistingSourcesFolder(WizardDescriptor wizardDescriptor)
This may not be set, unless you have CommonProjectActions.newProjectAction with CommonProjectActions.EXISTING_SOURCES_FOLDER value.
wizardDescriptor - the wizard as passed to WizardDescriptor.InstantiatingIterator#initialize
or TemplateWizard.Iterator#initialize
public static void setTargetFolder(WizardDescriptor wizardDescriptor,
FileObject folder)
getTargetFolder(org.openide.WizardDescriptor).
wizardDescriptor - a template wizardfolder - a target folder to rememberpublic static String getTargetName(WizardDescriptor wizardDescriptor)
WizardDescriptor.InstantiatingIterator associated with particular template.
XXX why is this public? only used from NewFileIterator in projectui?
wizardDescriptor - a file wizard
TemplateWizard.getTargetName(),
ProjectChooserFactory.WIZARD_KEY_TARGET_NAME
public static void setTargetName(WizardDescriptor wizardDescriptor,
String targetName)
XXX why is this public? only used from SimpleTargetChooserPanel in projectui?
wizardDescriptor - a file wizardtargetName - a desired target nameTemplateWizard.setTargetName(java.lang.String),
ProjectChooserFactory.WIZARD_KEY_TARGET_NAMEpublic static boolean getDefinesMainProject(WizardDescriptor wizardDescriptor)
wizardDescriptor - a New Project wizard
public static void setDefinesMainProject(WizardDescriptor wizardDescriptor,
boolean definesMainProject)
wizardDescriptor - a New Project wizarddefinesMainProject - true if it will set a main project
@Deprecated
public static WizardDescriptor.Panel<WizardDescriptor> createSimpleTargetChooser(Project project,
SourceGroup[] folders)
buildSimpleTargetChooser(org.netbeans.api.project.Project, org.netbeans.api.project.SourceGroup[]) instead.
@Deprecated
public static WizardDescriptor.Panel<WizardDescriptor> createSimpleTargetChooser(Project project,
SourceGroup[] folders,
WizardDescriptor.Panel<WizardDescriptor> bottomPanel)
buildSimpleTargetChooser(org.netbeans.api.project.Project, org.netbeans.api.project.SourceGroup[]) instead.
public static Templates.SimpleTargetChooserBuilder buildSimpleTargetChooser(Project project,
SourceGroup[] folders)
DataObject.createFromTemplate(org.openide.loaders.DataFolder).
project - The project to work on.folders - a list of possible roots to create the new file in
|
org.netbeans.modules.projectuiapi/1 1.47.2 8 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||