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

    • Constructor Detail

      • DtNewWizardContext

        public DtNewWizardContext()
    • Method Detail

      • addRelatedModel

        public void addRelatedModel​(org.eclipse.emf.ecore.EObject model)
        Adds the model to the list of related models.
        Specified by:
        addRelatedModel in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        model - model to add.
      • findRelatedModel

        public <T> T findRelatedModel​(Class<T> class_)
        Finds related model by its class.
        Specified by:
        findRelatedModel in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        class_ - model class.
        Returns:
        found model or null, if no model found.
      • get

        public <T> T get​(Class<T> class_)
        Gets additional context information by its class.
        Specified by:
        get in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        class_ - class to lookup by.
        Returns:
        found additional context information or null, if there is no such information.
        See Also:
        IDtNewWizardContext.put(Object)
      • getFeature

        public org.eclipse.emf.ecore.EStructuralFeature getFeature()
        Specified by:
        getFeature in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Returns:
        parent's model feature to place newly created model to.
      • getFqn

        public String getFqn()
        Gets FQN.
        Specified by:
        getFqn in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Returns:
        FQN, may be null.
      • getModel

        public M getModel()
        Specified by:
        getModel in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Returns:
        newly created model.
      • getModelClass

        public org.eclipse.emf.ecore.EClass getModelClass()
        Specified by:
        getModelClass in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Returns:
        EClass of the model being created.
      • getParent

        public org.eclipse.emf.ecore.EObject getParent()
        Specified by:
        getParent in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Returns:
        model parent.
      • getRelatedModels

        public Iterable<org.eclipse.emf.ecore.EObject> getRelatedModels()
        Specified by:
        getRelatedModels in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Returns:
        related models created by the wizard.
      • isDiscardableEditingSupport

        public boolean isDiscardableEditingSupport()
        Checks if the editing support associated with this context should be discarded in the end.
        Specified by:
        isDiscardableEditingSupport in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Returns:
        True if the editing support should be discarded; false otherwise.
      • isNeedSave

        public boolean isNeedSave()
        Checks if the wizard need to perform save of the wizard context at the end of processing.
        Specified by:
        isNeedSave in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Returns:
        True if the data changed in wizard should be persisted.
      • setV8project

        public void setV8project​(IV8Project v8project)
        Sets associated V8 project.
        Specified by:
        setV8project in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        v8project - the V8 project to associate (not null).
      • setDiscardableEditingSupport

        public void setDiscardableEditingSupport​(boolean discardableEditingSupport)
        Sets the discard editing support flag.
        Specified by:
        setDiscardableEditingSupport in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        discardableEditingSupport - The flag to set.
      • setEditingContext

        public void setEditingContext​(IBmEditingContext editingContext)
        Sets editing context for the wizard context.
        Specified by:
        setEditingContext in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        editingContext - The editing context to set.
      • setFeature

        public void setFeature​(org.eclipse.emf.ecore.EStructuralFeature feature)
        Sets parent's model feature to place newly created model to.
        Specified by:
        setFeature in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        feature - parent's model feature to place newly created model to.
      • setFqn

        public void setFqn​(String fqn)
        Sets FQN.
        Specified by:
        setFqn in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        fqn - FQN, may be null.
      • setModel

        public void setModel​(M model)
        Sets newly created model.
        Specified by:
        setModel in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        model - model to set.
      • setModelClass

        public void setModelClass​(org.eclipse.emf.ecore.EClass modelClass)
        Sets EClass of the model being created.
        Specified by:
        setModelClass in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        modelClass - EClass of the model being created..
      • setNeedSave

        public void setNeedSave​(boolean needSave)
        Sets the save designator for the context.
        Specified by:
        setNeedSave in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        needSave - True if the context should be saved; false otherwise.
      • setParent

        public void setParent​(org.eclipse.emf.ecore.EObject parent)
        Sets model parent.
        Specified by:
        setParent in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        parent - model parent to set.
      • isParentChanged

        public boolean isParentChanged()
        Description copied from interface: IDtNewWizardContext
        Checks whether the wizard context parent was changed after initial parent set.
        Specified by:
        isParentChanged in interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
        Returns:
        true if the wizard context parent was changed.