Package com._1c.g5.v8.dt.md.ui.wizards
Class AbstractProjectWizard<M extends MdObject,T extends AbstractProjectWizard.WizardModel<M>>
- java.lang.Object
-
- org.eclipse.jface.wizard.Wizard
-
- com._1c.g5.v8.dt.md.ui.wizards.base.DtNewWizard<M>
-
- com._1c.g5.v8.dt.md.ui.wizards.base.aef.DtAefNewWizard<M>
-
- com._1c.g5.v8.dt.md.ui.wizards.AbstractProjectWizard<M,T>
-
- All Implemented Interfaces:
IDtNewWizard<M>,org.eclipse.core.runtime.IExecutableExtension,org.eclipse.jface.window.IShellProvider,org.eclipse.jface.wizard.IWizard,org.eclipse.ui.INewWizard,org.eclipse.ui.IWorkbenchWizard
- Direct Known Subclasses:
AbstractDependentProjectWizard,ConfigurationWizard
public class AbstractProjectWizard<M extends MdObject,T extends AbstractProjectWizard.WizardModel<M>> extends DtAefNewWizard<M>
Abstract wizard of dt projects or their root objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractProjectWizard.ObjectNameValidatorValidator for creating object name.static classAbstractProjectWizard.WizardModel<M extends MdObject>Dependent wizard model instance.
-
Field Summary
Fields Modifier and Type Field Description protected Stringidid for view modelNewWizardPageViewModel.-
Fields inherited from class com._1c.g5.v8.dt.md.ui.wizards.base.DtNewWizard
configurationProvider, derivedDataManagerProvider, modelManager, resourceLookup, runtimeVersionSupport, selectionService, topObjectFqnGenerator, v8projectManager, wizardExtensionsRegistry
-
-
Constructor Summary
Constructors Constructor Description AbstractProjectWizard()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TcreateWizardModel()Create wizard model.voiddispose()voiddoAddPages()TheDtNewWizardimplementation of this wizard method does nothing.protected StringgetContextHelpId()Returns help context id to bind help to.protected Collection<String>getExistedNames()Returns the existed names for generate init object name.protected StringgetInitObjectName()Returns the wizard new object default name.protected IModelgetModelForPageComponent(NewWizardPageComponent<?> component)Returns AEF model for the given component.protected org.eclipse.core.databinding.validation.IValidatorgetNameValidator()Returns validator for creating object name.protected StringgetObjectNamePrefix()Returns the new object name prefix.protected TgetOrCreateWizardModel()Get wizard model or create if it is not exists.StringgetPageDescription()StringgetPageTitle()protected StringgetProjectName()Returns selected project name in the wizard, notnull.protected PathgetProjectPath()Returns selected project path in the wizard, notnull.voidinit(org.eclipse.ui.IWorkbench workbench, IStructuredSelection selection)protected booleanneedToCreateProject()Returns whether the wizard needs to create new project during model integration.protected voidsetNeedToCreateProject(boolean needToCreateProject)Sets whether the wizard needs to create a new project during model integration.protected voidsetObjectNamePrefix(String prefix)Set the new object name prefix.protected voidsetObjectTypeNameMessage(String objectTypeNameMsg)Set the object type name for validation messages.voidsetPageDescription(String pageDescription)Set the wizard main page description.voidsetPageTitle(String pageTitle)Set the wizard main page title.-
Methods inherited from class com._1c.g5.v8.dt.md.ui.wizards.base.aef.DtAefNewWizard
addPage, getEngine, onParentChanged
-
Methods inherited from class com._1c.g5.v8.dt.md.ui.wizards.base.DtNewWizard
addExtensionPages, addPages, canFinish, createModel, createPageControls, detectModelClass, detectParent, getContext, getPreviousPage, getSelection, integrateModel, integrateModel, performFinish, postProcessBmIntegration, preProcessBmIntegration, setContainer, setInitializationData, setModelClassDetectionStrategy, setOpenEditorAfterCreation, setParentDetectionStrategy, setSelectAfterCreation, setShowParentSelectionPage
-
Methods inherited from class org.eclipse.jface.wizard.Wizard
addPage, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle
-
-
-
-
Field Detail
-
id
protected final String id
id for view modelNewWizardPageViewModel.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(org.eclipse.ui.IWorkbench workbench, IStructuredSelection selection)Description copied from class:DtNewWizard- Specified by:
initin interfaceorg.eclipse.ui.IWorkbenchWizard- Overrides:
initin classDtNewWizard<M extends MdObject>
-
doAddPages
public void doAddPages()
Description copied from class:DtNewWizardTheDtNewWizardimplementation of this wizard method does nothing. Subclasses should extend if extra pages need to be added before the wizard opens. New pages should be added by callingaddPage.- Overrides:
doAddPagesin classDtNewWizard<M extends MdObject>
-
dispose
public void dispose()
- Specified by:
disposein interfaceorg.eclipse.jface.wizard.IWizard- Overrides:
disposein classDtAefNewWizard<M extends MdObject>
-
getPageTitle
public String getPageTitle()
- Returns:
- the pageTitle
-
getPageDescription
public String getPageDescription()
- Returns:
- the pageDescription
-
setPageDescription
public void setPageDescription(String pageDescription)
Set the wizard main page description.- Parameters:
pageDescription- the wizard main page description to set, cannot benull
-
setPageTitle
public void setPageTitle(String pageTitle)
Set the wizard main page title.- Parameters:
pageTitle- the wizard main page title to set, cannot benull
-
getContextHelpId
protected String getContextHelpId()
Returns help context id to bind help to.- Returns:
- help context id or
nullif no help is needed
-
getModelForPageComponent
protected IModel getModelForPageComponent(NewWizardPageComponent<?> component)
Description copied from class:DtAefNewWizardReturns AEF model for the given component. Override to support components that is added as pages withDtAefNewWizard.addPage(NewWizardPageComponent).- Overrides:
getModelForPageComponentin classDtAefNewWizard<M extends MdObject>- Parameters:
component- the component- Returns:
- model for the given component or
null.
-
createWizardModel
protected T createWizardModel()
Create wizard model.- Returns:
- a new wizard model, never
null
-
getOrCreateWizardModel
protected final T getOrCreateWizardModel()
Get wizard model or create if it is not exists.- Returns:
- a new wizard model, cannot be
null
-
needToCreateProject
protected boolean needToCreateProject()
Returns whether the wizard needs to create new project during model integration. Default value isfalse, implementation may change it withsetNeedToCreateProject(boolean).- Returns:
- whether the wizard needs to create new project during model integration
-
setNeedToCreateProject
protected void setNeedToCreateProject(boolean needToCreateProject)
Sets whether the wizard needs to create a new project during model integration.- Parameters:
needToCreateProject- the flag to set
-
getInitObjectName
protected String getInitObjectName()
Returns the wizard new object default name. Can be customized oversetObjectNamePrefix()andgetExistedNames().- Returns:
- new object name
-
setObjectNamePrefix
protected void setObjectNamePrefix(String prefix)
Set the new object name prefix.- Parameters:
new- object name prefix to set, cannot benull
-
getObjectNamePrefix
protected String getObjectNamePrefix()
Returns the new object name prefix.- Returns:
- object name prefix, cannot be
null
-
getExistedNames
protected Collection<String> getExistedNames()
Returns the existed names for generate init object name.- Returns:
- collection of already taken names, cannot be
null
-
setObjectTypeNameMessage
protected void setObjectTypeNameMessage(String objectTypeNameMsg)
Set the object type name for validation messages. For example "Configuration name".- Parameters:
object- type name for validation messages to set, cannot benull
-
getProjectPath
protected Path getProjectPath()
Returns selected project path in the wizard, notnull.- Returns:
- the selected project path in the wizard, not
null.
-
getProjectName
protected String getProjectName()
Returns selected project name in the wizard, notnull.- Returns:
- the selected project name in the wizard, not
null.
-
getNameValidator
protected org.eclipse.core.databinding.validation.IValidator getNameValidator()
Returns validator for creating object name.- Returns:
- object name validator, cannot be
null
-
-