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 ClassesModifier and TypeClassDescriptionprotected class
Validator for creating object name.static class
AbstractProjectWizard.WizardModel<M extends MdObject>
Dependent wizard model instance. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final String
id 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
Fields inherited from class org.eclipse.jface.wizard.Wizard
DEFAULT_IMAGE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected T
Create wizard model.void
dispose()
void
TheDtNewWizard
implementation of this wizard method does nothing.protected String
Returns help context id to bind help to.protected Collection<String>
Returns the existed names for generate init object name.protected String
Returns the wizard new object default name.protected IModel
getModelForPageComponent
(NewWizardPageComponent<?> component) Returns AEF model for the given component.protected org.eclipse.core.databinding.validation.IValidator
Returns validator for creating object name.protected String
Returns the new object name prefix.protected final T
Get wizard model or create if it is not exists.protected String
Returns selected project name in the wizard, notnull
.protected Path
Returns selected project path in the wizard, notnull
.void
init
(org.eclipse.ui.IWorkbench workbench, IStructuredSelection selection) protected boolean
Returns whether the wizard needs to create new project during model integration.protected void
setNeedToCreateProject
(boolean needToCreateProject) Sets whether the wizard needs to create a new project during model integration.protected void
setObjectNamePrefix
(String prefix) Set the new object name prefix.protected void
setObjectTypeNameMessage
(String objectTypeNameMsg) Set the object type name for validation messages.void
setPageDescription
(String pageDescription) Set the wizard main page description.void
setPageTitle
(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, getMinimumWizardSize, getNextPage, getPage, getPageCount, getPages, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jface.wizard.IWizard
getContainer, getDefaultPageImage, getDialogSettings, getMinimumWizardSize, getNextPage, getPage, getPageCount, getPages, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel
-
Field Details
-
id
id for view modelNewWizardPageViewModel
.- See Also:
-
-
Constructor Details
-
AbstractProjectWizard
public AbstractProjectWizard()
-
-
Method Details
-
init
Description copied from class:DtNewWizard
- Specified by:
init
in interfaceorg.eclipse.ui.IWorkbenchWizard
- Overrides:
init
in classDtNewWizard<M extends MdObject>
-
doAddPages
public void doAddPages()Description copied from class:DtNewWizard
TheDtNewWizard
implementation 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:
doAddPages
in classDtNewWizard<M extends MdObject>
-
dispose
public void dispose()- Specified by:
dispose
in interfaceorg.eclipse.jface.wizard.IWizard
- Overrides:
dispose
in classDtAefNewWizard<M extends MdObject>
-
getPageTitle
- Returns:
- the pageTitle
-
getPageDescription
- Returns:
- the pageDescription
-
setPageDescription
Set the wizard main page description.- Parameters:
pageDescription
- the wizard main page description to set, cannot benull
-
setPageTitle
Set the wizard main page title.- Parameters:
pageTitle
- the wizard main page title to set, cannot benull
-
getContextHelpId
Returns help context id to bind help to.- Returns:
- help context id or
null
if no help is needed
-
getModelForPageComponent
Description copied from class:DtAefNewWizard
Returns AEF model for the given component. Override to support components that is added as pages withDtAefNewWizard.addPage(NewWizardPageComponent)
.- Overrides:
getModelForPageComponent
in classDtAefNewWizard<M extends MdObject>
- Parameters:
component
- the component- Returns:
- model for the given component or
null
.
-
createWizardModel
Create wizard model.- Returns:
- a new wizard model, never
null
-
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
Returns the wizard new object default name. Can be customized oversetObjectNamePrefix()
andgetExistedNames()
.- Returns:
- new object name
-
setObjectNamePrefix
Set the new object name prefix.- Parameters:
new
- object name prefix to set, cannot benull
-
getObjectNamePrefix
Returns the new object name prefix.- Returns:
- object name prefix, cannot be
null
-
getExistedNames
Returns the existed names for generate init object name.- Returns:
- collection of already taken names, cannot be
null
-
setObjectTypeNameMessage
Set the object type name for validation messages. For example "Configuration name".- Parameters:
object
- type name for validation messages to set, cannot benull
-
getProjectPath
Returns selected project path in the wizard, notnull
.- Returns:
- the selected project path in the wizard, not
null
.
-
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
-