Class EmfValueModel
java.lang.Object
- All Implemented Interfaces:
IAttribute<org.eclipse.emf.ecore.EObject,
,org.eclipse.emf.ecore.EStructuralFeature> IEditableModel
,IEmfAttribute<org.eclipse.emf.ecore.EObject>
,IModel
,IEmfValueAttribute<Value,
,org.eclipse.emf.ecore.EObject> IValue<Value>
,IValidable
,IValueModel
- Direct Known Subclasses:
EmfCharacteristicsDescriptionValueModel
The Emf
IValueModel
implementation.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmfValueModel
(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project projectParameters, IColorProvider colorProvider, IFontProvider fontProvider) Creates a new model.EmfValueModel
(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EStructuralFeature typeDescriptionFeature, IV8Project v8project) Creates a new model. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createTypeDescriptionModel
(org.eclipse.emf.ecore.EStructuralFeature typeDescriptionFeature) Creates type description source model.void
dispose()
Disposes this model.get()
Returns the currentTypeItem
.Returns theTypeDescription
of the object that keeps theValue
.Returns the model ofTypeItem
.Returns the {@link IV8Project).protected void
Inits TypeItem model external.boolean
Checks the value for equality with the current stored value.void
setComponent
(IComponent<?> component) Associate this model with the component.Methods inherited from class com._1c.g5.aef2.emf.models.EmfValue
getChange, getObject, getProperty
Methods inherited from class com._1c.g5.aef2.models.value.Value
addValueListener, createWorkingCopy, discard, getCommittedValue, getUncommittedValue, getValidatorTarget, notifyValueChanged, queueNotifyValueChanged, removeValueListener, set, setCommittedValue, setUncommittedValue, setValue, toString
Methods inherited from class com._1c.g5.aef2.models.EditableModel
isEditable, setEditable
Methods inherited from class com._1c.g5.aef2.models.Model
addModelListener, beginExternalUpdate, checkOffline, checkOnline, commit, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setOnline
Methods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, removeValidator, validate, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, discard, getChange, getComponent, isOnline, removeModelListener
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
Methods inherited from interface com._1c.g5.aef2.models.value.IValue
addValueListener, createWorkingCopy, removeValueListener, set
Methods inherited from interface com._1c.g5.v8.dt.md.ui.aef.models.value.IValueModel
convertTypeItemToValue, getContentProvider, getObject
-
Field Details
-
typeDescriptionValue
-
typeItemValue
-
listener
-
-
Constructor Details
-
EmfValueModel
public EmfValueModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EStructuralFeature typeDescriptionFeature, IV8Project v8project) Creates a new model.- Parameters:
object
- theIBmObject
that keeps theValue
feature, cannot benull
feature
- the feature of theValue
object, cannot benull
typeDescriptionFeature
- the feature of theTypeDescription
object, cannot benull
v8project
- the V8 project, cannot benull
-
EmfValueModel
public EmfValueModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project projectParameters, IColorProvider colorProvider, IFontProvider fontProvider) Creates a new model.
-
-
Method Details
-
setComponent
Description copied from interface:IModel
Associate this model with the component.- Specified by:
setComponent
in interfaceIModel
- Overrides:
setComponent
in classModel
- Parameters:
component
- the component to associate with.
-
get
-
getTypeItemModel
Description copied from interface:IValueModel
Returns the model ofTypeItem
. It is the changeable model that can be changed from component, i.e. in case the user select the type from type selection dialog, or can be changed in automatically in case if theTypeDescription
was changed.- Specified by:
getTypeItemModel
in interfaceIValueModel
- Returns:
- the model of
TypeItem
, cannot benull
-
isEqual
Description copied from interface:IValue
Checks the value for equality with the current stored value. -
dispose
public void dispose()Description copied from interface:IModel
Disposes this model. -
getTypeDescription
Description copied from interface:IValueModel
Returns theTypeDescription
of the object that keeps theValue
.- Specified by:
getTypeDescription
in interfaceIValueModel
- Returns:
- the
TypeDescription
instance.
-
getCurrentTypeItem
Description copied from interface:IValueModel
Returns the currentTypeItem
. It is calculated object that is depends on current state ofIValueModel.getTypeItemModel()
andIValueModel.getTypeDescription()
.- Specified by:
getCurrentTypeItem
in interfaceIValueModel
- Returns:
- the current
TypeItem
.
-
getV8project
Description copied from interface:IValueModel
Returns the {@link IV8Project).- Specified by:
getV8project
in interfaceIValueModel
- Returns:
- the v8 project.
-
getColorProvider
- Specified by:
getColorProvider
in interfaceIValueModel
- Returns:
- the color provider, can be
null
-
getFontProvider
- Specified by:
getFontProvider
in interfaceIValueModel
- Returns:
- the font provider, can be
null
-
createTypeDescriptionModel
protected void createTypeDescriptionModel(org.eclipse.emf.ecore.EStructuralFeature typeDescriptionFeature) Creates type description source model.- Parameters:
typeDescriptionFeature
- the type description source field
-
initTypeItemModelExternal
protected void initTypeItemModelExternal()Inits TypeItem model external.
-