Class DtNewWizard<M extends org.eclipse.emf.ecore.EObject>

  • 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:

    public class DtNewWizard<M extends org.eclipse.emf.ecore.EObject>
    extends org.eclipse.jface.wizard.Wizard
    implements IDtNewWizard<M>, org.eclipse.core.runtime.IExecutableExtension
    Base class for all DT model-related wizards.
    • Constructor Detail

      • DtNewWizard

        public DtNewWizard()
    • Method Detail

      • init

        public void init​(org.eclipse.ui.IWorkbench workbench,
                         IStructuredSelection selection)
        Specified by:
        init in interface org.eclipse.ui.IWorkbenchWizard
      • dispose

        public void dispose()
        Specified by:
        dispose in interface org.eclipse.jface.wizard.IWizard
        dispose in class org.eclipse.jface.wizard.Wizard
      • addPages

        public final void addPages()

        Should not be referenced by clients. Sublass must override doAddPages() instead.

        Specified by:
        addPages in interface org.eclipse.jface.wizard.IWizard
        addPages in class org.eclipse.jface.wizard.Wizard
      • createPageControls

        public void createPageControls​(org.eclipse.swt.widgets.Composite pageContainer)
        Specified by:
        createPageControls in interface org.eclipse.jface.wizard.IWizard
        createPageControls in class org.eclipse.jface.wizard.Wizard
      • performFinish

        public boolean performFinish()
        Specified by:
        performFinish in interface org.eclipse.jface.wizard.IWizard
        Specified by:
        performFinish in class org.eclipse.jface.wizard.Wizard
      • getPreviousPage

        public org.eclipse.jface.wizard.IWizardPage getPreviousPage​(org.eclipse.jface.wizard.IWizardPage page)
        Specified by:
        getPreviousPage in interface org.eclipse.jface.wizard.IWizard
        getPreviousPage in class org.eclipse.jface.wizard.Wizard
      • detectParent

        public void detectParent​(IStructuredSelection selection)
        Detects a parent for a given selection and stores it in the wizard context.
        Specified by:
        detectParent in interface IDtNewWizard<M extends org.eclipse.emf.ecore.EObject>
        selection - selection to detect model from.
      • createModel

        public void createModel()
        Creates a model from the information stored in the wizard context. Stores the model in the wizard context. Called after IDtNewWizard.detectModelClass().
        Specified by:
        createModel in interface IDtNewWizard<M extends org.eclipse.emf.ecore.EObject>
      • integrateModel

        public void integrateModel​(org.eclipse.core.runtime.IProgressMonitor monitor)
                            throws org.eclipse.core.runtime.CoreException
        Integrates the created model in the enclosing model. Called at wizard finish.
        Specified by:
        integrateModel in interface IDtNewWizard<M extends org.eclipse.emf.ecore.EObject>
        monitor - the progress monitor to report progress to or null if progress report is not needed
        org.eclipse.core.runtime.CoreException - if model integrations fails with some reason
      • setInitializationData

        public void setInitializationData​(org.eclipse.core.runtime.IConfigurationElement configurationElement,
                                          String propertyName,
                                          Object data)
                                   throws org.eclipse.core.runtime.CoreException
        Specified by:
        setInitializationData in interface org.eclipse.core.runtime.IExecutableExtension
      • getSelection

        public ISelection getSelection()
        Returns the selection at the moment the wizard was created.
        Selection at the moment the wizard was created
      • addExtensionPages

        protected void addExtensionPages()
        Add extensions pages to the DT wizard.
      • doAddPages

        protected void doAddPages()
        The DtNewWizard 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 calling addPage.
      • preProcessBmIntegration

        protected void preProcessBmIntegration​(IBmTransaction transaction,
                                               org.eclipse.core.runtime.IProgressMonitor monitor)
        Descendants could add additional data preprocessing before integrated to the model.
        transaction - the transaction the task is being executed in, cannot be null
        monitor - the task progress monitor, cannot be null
      • postProcessBmIntegration

        protected void postProcessBmIntegration​(IBmTransaction transaction,
                                                org.eclipse.core.runtime.IProgressMonitor monitor)
        Descendants could add additional data postprocessing to the model being integrated.
        transaction - The transaction the task is being executed in.
        monitor - The task progress monitor.
      • setContainer

        public void setContainer​(org.eclipse.jface.wizard.IWizardContainer wizardContainer)
        Specified by:
        setContainer in interface org.eclipse.jface.wizard.IWizard
        setContainer in class org.eclipse.jface.wizard.Wizard
      • canFinish

        public boolean canFinish()
        Specified by:
        canFinish in interface org.eclipse.jface.wizard.IWizard
        canFinish in class org.eclipse.jface.wizard.Wizard
      • setOpenEditorAfterCreation

        protected void setOpenEditorAfterCreation​(boolean value)
        Sets wizard editor behavior.
        value - true to open editor when wizard finishes, false do not open.
      • setSelectAfterCreation

        protected void setSelectAfterCreation​(boolean value)
        Sets wizard editor behavior.
        value - true to select and reveal the object after it is created.
      • setShowParentSelectionPage

        protected void setShowParentSelectionPage​(boolean value)
        Sets wizard parent selection page behavior.
        value - true to show the parent selection page if parent can't be detected automatically, false never show parent selection page.