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 classValidator for creating object name.static classAbstractProjectWizard.WizardModel<M extends MdObject>Dependent wizard model instance. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringid 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, wizardExtensionsRegistryFields inherited from class org.eclipse.jface.wizard.Wizard
DEFAULT_IMAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TCreate wizard model.voiddispose()voidTheDtNewWizardimplementation of this wizard method does nothing.protected StringReturns help context id to bind help to.protected Collection<String>Returns the existed names for generate init object name.protected StringReturns the wizard new object default name.protected IModelgetModelForPageComponent(NewWizardPageComponent<?> component) Returns AEF model for the given component.protected org.eclipse.core.databinding.validation.IValidatorReturns validator for creating object name.protected StringReturns the new object name prefix.protected final TGet wizard model or create if it is not exists.protected StringReturns selected project name in the wizard, notnull.protected PathReturns selected project path in the wizard, notnull.voidinit(org.eclipse.ui.IWorkbench workbench, IStructuredSelection selection) protected booleanReturns 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, onParentChangedMethods 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, setShowParentSelectionPageMethods 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, setWindowTitleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
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
- 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
nullif no help is needed
-
getModelForPageComponent
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
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
-