Package com._1c.g5.v8.dt.ui.wizards
Interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
-
- All Known Implementing Classes:
DtNewWizardContext
public interface IDtNewWizardContext<M extends org.eclipse.emf.ecore.EObject>
Defines public contract of DT wizard context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addRelatedModel(org.eclipse.emf.ecore.EObject model)
Adds the model to the list of related models.<T> T
findRelatedModel(Class<T> class_)
Finds related model by its class.<T> T
get(Class<T> class_)
Gets additional context information by its class.IBmTransaction
getActiveTransaction()
IBmEditingContext
getEditingContext()
org.eclipse.emf.ecore.EStructuralFeature
getFeature()
String
getFqn()
Gets FQN.M
getModel()
org.eclipse.emf.ecore.EClass
getModelClass()
MdModelTypesExtension
getModelType()
Version
getModelVersion()
org.eclipse.emf.ecore.EObject
getParent()
Iterable<org.eclipse.emf.ecore.EObject>
getRelatedModels()
IV8Project
getV8project()
boolean
isDiscardableEditingSupport()
Checks if the editing support associated with this context should be discarded in the end.boolean
isNeedSave()
Checks if the wizard need to perform save of the wizard context at the end of processing.boolean
isParentChanged()
Checks whether the wizard context parent was changed after initial parent set.void
put(Object object)
Stores additional context information.void
resetParentChange()
Resets context parent change.void
setActiveTransaction(IBmTransaction transaction)
Sets active BM transaction.void
setDiscardableEditingSupport(boolean discardableEditingSupport)
Sets the discard editing support flag.void
setEditingContext(IBmEditingContext editingContext)
Sets editing context for the wizard context.void
setFeature(org.eclipse.emf.ecore.EStructuralFeature feature)
Sets parent's model feature to place newly created model to.void
setFqn(String fqn)
Sets FQN.void
setModel(M model)
Sets newly created model.void
setModelClass(org.eclipse.emf.ecore.EClass modelClass)
SetsEClass
of the model being created.void
setModelType(MdModelTypesExtension modelType)
Sets model type of the model being createdvoid
setModelVersion(Version version)
Sets model version.void
setNeedSave(boolean needSave)
Sets the save designator for the context.void
setParent(org.eclipse.emf.ecore.EObject parent)
Sets model parent.void
setV8project(IV8Project v8project)
Sets associated V8 project.
-
-
-
Method Detail
-
addRelatedModel
void addRelatedModel(org.eclipse.emf.ecore.EObject model)
Adds the model to the list of related models.- Parameters:
model
- model to add.
-
findRelatedModel
<T> T findRelatedModel(Class<T> class_)
Finds related model by its class.- Parameters:
class_
- model class.- Returns:
- found model or
null
, if no model found.
-
get
<T> T get(Class<T> class_)
Gets additional context information by its class.- Parameters:
class_
- class to lookup by.- Returns:
- found additional context information or
null
, if there is no such information. - See Also:
put(Object)
-
getV8project
IV8Project getV8project()
- Returns:
- associated V8 project, cannot be
null
.
-
getEditingContext
IBmEditingContext getEditingContext()
- Returns:
- associated editing context
-
getActiveTransaction
IBmTransaction getActiveTransaction()
- Returns:
- active BM transaction
-
getFeature
org.eclipse.emf.ecore.EStructuralFeature getFeature()
- Returns:
- parent's model feature to place newly created model to.
-
getFqn
String getFqn()
Gets FQN.- Returns:
- FQN, may be
null
.
-
getModel
M getModel()
- Returns:
- newly created model.
-
getModelClass
org.eclipse.emf.ecore.EClass getModelClass()
- Returns:
EClass
of the model being created.
-
getModelType
MdModelTypesExtension getModelType()
- Returns:
- model type of the model being created or
null
, if there is no model type. - See Also:
MdModelTypesExtension
-
getModelVersion
Version getModelVersion()
- Returns:
- model version.
-
getParent
org.eclipse.emf.ecore.EObject getParent()
- Returns:
- model parent.
-
getRelatedModels
Iterable<org.eclipse.emf.ecore.EObject> getRelatedModels()
- Returns:
- related models created by the wizard.
-
isDiscardableEditingSupport
boolean isDiscardableEditingSupport()
Checks if the editing support associated with this context should be discarded in the end.- Returns:
- True if the editing support should be discarded; false otherwise.
-
isNeedSave
boolean isNeedSave()
Checks if the wizard need to perform save of the wizard context at the end of processing.- Returns:
- True if the data changed in wizard should be persisted.
-
put
void put(Object object)
Stores additional context information.- Parameters:
object
- object to store.- See Also:
get(Class)
-
setV8project
void setV8project(IV8Project v8project)
Sets associated V8 project.- Parameters:
v8project
- the V8 project to associate (notnull
).
-
setDiscardableEditingSupport
void setDiscardableEditingSupport(boolean discardableEditingSupport)
Sets the discard editing support flag.- Parameters:
discardableEditingSupport
- The flag to set.
-
setEditingContext
void setEditingContext(IBmEditingContext editingContext)
Sets editing context for the wizard context.- Parameters:
editingContext
- The editing context to set.
-
setActiveTransaction
void setActiveTransaction(IBmTransaction transaction)
Sets active BM transaction.- Parameters:
transaction
- the transaction.
-
setFeature
void setFeature(org.eclipse.emf.ecore.EStructuralFeature feature)
Sets parent's model feature to place newly created model to.- Parameters:
feature
- parent's model feature to place newly created model to.
-
setFqn
void setFqn(String fqn)
Sets FQN.- Parameters:
fqn
- FQN, may benull
.
-
setModel
void setModel(M model)
Sets newly created model.- Parameters:
model
- model to set.
-
setModelClass
void setModelClass(org.eclipse.emf.ecore.EClass modelClass)
SetsEClass
of the model being created.- Parameters:
modelClass
-EClass
of the model being created..
-
setModelType
void setModelType(MdModelTypesExtension modelType)
Sets model type of the model being created- Parameters:
model
- type of the model being created ornull
, if there is no model type.- See Also:
MdModelTypesExtension
-
setModelVersion
void setModelVersion(Version version)
Sets model version.- Parameters:
version
- version to set.
-
setNeedSave
void setNeedSave(boolean needSave)
Sets the save designator for the context.- Parameters:
needSave
- True if the context should be saved; false otherwise.
-
setParent
void setParent(org.eclipse.emf.ecore.EObject parent)
Sets model parent.- Parameters:
parent
- model parent to set.
-
isParentChanged
boolean isParentChanged()
Checks whether the wizard context parent was changed after initial parent set.- Returns:
true
if the wizard context parent was changed.
-
resetParentChange
void resetParentChange()
Resets context parent change.
-
-