Package com._1c.g5.v8.dt.form.ui.wizard
Class FormWizard
- 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.base.aef.DtAefMdNewWizard<BasicForm>
-
- com._1c.g5.v8.dt.form.ui.wizard.FormWizard
-
- All Implemented Interfaces:
IDtNewWizard<BasicForm>
,org.eclipse.core.runtime.IExecutableExtension
,org.eclipse.jface.window.IShellProvider
,org.eclipse.jface.wizard.IWizard
,org.eclipse.ui.INewWizard
,org.eclipse.ui.IWorkbenchWizard
public class FormWizard extends DtAefMdNewWizard<BasicForm>
New form wizard.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FormWizard.FormModel
The model for form wizard pages.
-
Field Summary
Fields Modifier and Type Field Description protected IFormFieldGenerator
formFieldGenerator
protected IFormGenerator
formGenerator
-
Fields inherited from class com._1c.g5.v8.dt.md.ui.wizards.base.aef.DtAefMdNewWizard
mdObjectAvailability
-
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 FormWizard()
Instantiates a new form wizard.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MdModelNewWizardPageComponent<? extends IMdObjectModel>
createMdMainPage()
protected FormWizard.FormModel
createWizardModel()
Creates a wizard model.protected void
disposeMdObjectModel()
Disposes the model if it is not null.void
doAddPages()
TheDtNewWizard
implementation of this wizard method does nothing.protected org.eclipse.emf.ecore.EStructuralFeature
getDefaultFeature()
protected IMdObjectModel
getMdObjectModel()
ReturnsIMdObjectModel
.protected FormWizard.FormModel
getModel()
protected IModel
getModelForPageComponent(NewWizardPageComponent<?> component)
Returns AEF model for the given component.protected String
getNamePrefix()
Returns the name prefix for the editingMdObject
.org.eclipse.jface.wizard.IWizardPage
getNextPage(org.eclipse.jface.wizard.IWizardPage page)
In some cases needs skip next page.org.eclipse.jface.wizard.IWizardPage
getPreviousPage(org.eclipse.jface.wizard.IWizardPage page)
In some cases needs skip previous page.void
init(org.eclipse.ui.IWorkbench workbench, IStructuredSelection selection)
protected boolean
isConfigurationDefaultForm()
protected boolean
isConstantDefaultForm()
protected void
postProcessBmIntegration(IBmTransaction transaction, org.eclipse.core.runtime.IProgressMonitor monitor)
Descendants could add additional data postprocessing to the model being integrated.protected void
setupMdMainPageViewModel(NewWizardPageViewModel viewModel)
Setups theNewWizardPageViewModel
for main page.-
Methods inherited from class com._1c.g5.v8.dt.md.ui.wizards.base.aef.DtAefMdNewWizard
createMdObjectModel, dispose, disposeMainPageComponent, getMainPageComponent, getProjectNamePrefix
-
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, getSelection, integrateModel, performFinish, preProcessBmIntegration, setContainer, setInitializationData, setModelClassDetectionStrategy, setOpenEditorAfterCreation, setParentDetectionStrategy, setSelectAfterCreation, setShowParentSelectionPage
-
Methods inherited from class org.eclipse.jface.wizard.Wizard
addPage, getContainer, getDefaultPageImage, getDialogSettings, getPage, getPageCount, getPages, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle
-
-
-
-
Field Detail
-
formGenerator
@Inject protected IFormGenerator formGenerator
-
formFieldGenerator
@Inject protected IFormFieldGenerator formFieldGenerator
-
-
Method Detail
-
init
public void init(org.eclipse.ui.IWorkbench workbench, IStructuredSelection selection)
Description copied from class:DtNewWizard
- Specified by:
init
in interfaceorg.eclipse.ui.IWorkbenchWizard
- Overrides:
init
in classDtNewWizard<BasicForm>
-
doAddPages
public void doAddPages()
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 classDtAefMdNewWizard<BasicForm>
-
getNextPage
public org.eclipse.jface.wizard.IWizardPage getNextPage(org.eclipse.jface.wizard.IWizardPage page)
In some cases needs skip next page.- Specified by:
getNextPage
in interfaceorg.eclipse.jface.wizard.IWizard
- Overrides:
getNextPage
in classorg.eclipse.jface.wizard.Wizard
-
getPreviousPage
public org.eclipse.jface.wizard.IWizardPage getPreviousPage(org.eclipse.jface.wizard.IWizardPage page)
In some cases needs skip previous page.- Specified by:
getPreviousPage
in interfaceorg.eclipse.jface.wizard.IWizard
- Overrides:
getPreviousPage
in classDtNewWizard<BasicForm>
-
getNamePrefix
protected String getNamePrefix()
Description copied from class:DtAefMdNewWizard
Returns the name prefix for the editingMdObject
.
For example, forCatalog
object it would be "Catalog" string. Its value is used for unique name generation. So, if the name prefix is specified that is mentioned above, then unique names would be generated as "Catalog1", "Catalog2" etc.- Specified by:
getNamePrefix
in classDtAefMdNewWizard<BasicForm>
- Returns:
- the name prefix.
-
setupMdMainPageViewModel
protected void setupMdMainPageViewModel(NewWizardPageViewModel viewModel)
Description copied from class:DtAefMdNewWizard
Setups theNewWizardPageViewModel
for main page.
Actually it is needed to set title and description features.- Specified by:
setupMdMainPageViewModel
in classDtAefMdNewWizard<BasicForm>
- Parameters:
viewModel
- the view model.
-
createMdMainPage
protected MdModelNewWizardPageComponent<? extends IMdObjectModel> createMdMainPage()
Description copied from class:DtAefMdNewWizard
- Overrides:
createMdMainPage
in classDtAefMdNewWizard<BasicForm>
- Returns:
- a newly created page component.
-
disposeMdObjectModel
protected void disposeMdObjectModel()
Description copied from class:DtAefMdNewWizard
Disposes the model if it is not null.- Overrides:
disposeMdObjectModel
in classDtAefMdNewWizard<BasicForm>
-
getMdObjectModel
protected IMdObjectModel getMdObjectModel()
Description copied from class:DtAefMdNewWizard
ReturnsIMdObjectModel
.- Overrides:
getMdObjectModel
in classDtAefMdNewWizard<BasicForm>
- Returns:
- the
IMdObjectModel
-
getModelForPageComponent
protected IModel getModelForPageComponent(NewWizardPageComponent<?> component)
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 classDtAefMdNewWizard<BasicForm>
- Parameters:
component
- the component- Returns:
- model for the given component or
null
.
-
createWizardModel
protected FormWizard.FormModel createWizardModel()
Creates a wizard model.- Returns:
- the newly created wizard model.
-
isConstantDefaultForm
protected boolean isConstantDefaultForm()
- Returns:
true
if the wizard is executed to create constant default form.
-
isConfigurationDefaultForm
protected boolean isConfigurationDefaultForm()
- Returns:
true
if the wizard is executed to create configuration default form.
-
getDefaultFeature
protected org.eclipse.emf.ecore.EStructuralFeature getDefaultFeature()
- Returns:
- the default feature from wizard context.
-
getModel
protected FormWizard.FormModel getModel()
- Returns:
- the wizard model
-
postProcessBmIntegration
protected void postProcessBmIntegration(IBmTransaction transaction, org.eclipse.core.runtime.IProgressMonitor monitor)
Descendants could add additional data postprocessing to the model being integrated.- Overrides:
postProcessBmIntegration
in classDtNewWizard<BasicForm>
- Parameters:
transaction
- The transaction the task is being executed in.monitor
- The task progress monitor.
-
-