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
Modifier and TypeMethodDescriptionvoid
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
Gets additional context information by its class.org.eclipse.emf.ecore.EStructuralFeature
getFqn()
Gets FQN.getModel()
org.eclipse.emf.ecore.EClass
org.eclipse.emf.ecore.EObject
Iterable<org.eclipse.emf.ecore.EObject>
boolean
Checks if the editing support associated with this context should be discarded in the end.boolean
Checks if the wizard need to perform save of the wizard context at the end of processing.boolean
Checks whether the wizard context parent was changed after initial parent set.void
Stores additional context information.void
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
Sets FQN.void
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 Details
-
addRelatedModel
void addRelatedModel(org.eclipse.emf.ecore.EObject model) Adds the model to the list of related models.- Parameters:
model
- model to add.
-
findRelatedModel
Finds related model by its class.- Parameters:
class_
- model class.- Returns:
- found model or
null
, if no model found.
-
get
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:
-
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:
-
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
Stores additional context information.- Parameters:
object
- object to store.- See Also:
-
setV8project
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
Sets editing context for the wizard context.- Parameters:
editingContext
- The editing context to set.
-
setActiveTransaction
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
Sets FQN.- Parameters:
fqn
- FQN, may benull
.
-
setModel
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
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:
-
setModelVersion
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.
-