Package com._1c.g5.v8.dt.ui.aef.models
Class EmfValueSelectionModel<T>
- java.lang.Object
-
- com._1c.g5.aef2.validators.Validable
-
- com._1c.g5.aef2.models.Model
-
- com._1c.g5.aef2.models.EditableModel
-
- com._1c.g5.aef2.models.value.Value<T>
-
- com._1c.g5.aef2.emf.models.EmfValue<T>
-
- com._1c.g5.v8.dt.ui.aef.models.EmfValueSelectionModel<T>
-
- All Implemented Interfaces:
IAttribute<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EStructuralFeature>
,IEditableModel
,IEmfAttribute<org.eclipse.emf.ecore.EObject>
,IModel
,IEmfValueAttribute<T,org.eclipse.emf.ecore.EObject>
,IValue<T>
,IValidable
,IEmfSelectionModel<org.eclipse.emf.ecore.EObject>
,IEmfValueSelectionModel<T,org.eclipse.emf.ecore.EObject>
,ISelectionModel
- Direct Known Subclasses:
EmfTreeToSingleItemSelectionModel
public class EmfValueSelectionModel<T> extends EmfValue<T> implements IEmfValueSelectionModel<T,org.eclipse.emf.ecore.EObject>
TheIEmfValueSelectionModel
implementation.
-
-
Constructor Summary
Constructors Constructor Description EmfValueSelectionModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project, IElementComparer comparer, IStructuredContentProvider contentProvider, ILabelProvider labelProvider, String... waitingPartIds)
Creates a new model.EmfValueSelectionModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project, IStructuredContentProvider contentProvider, ILabelProvider labelProvider, String... waitingPartIds)
Creates a new model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Disposes this model.ViewerComparator
getComparator()
Returns theViewerComparator
.IElementComparer
getComparer()
Returns theIElementComparer
.IStructuredContentProvider
getContentProvider()
Returns theIStructuredContentProvider
.Object
getInput()
Returns the input object for contentProvider.ILabelProvider
getLabelProvider()
Returns theILabelProvider
.org.eclipse.core.resources.IProject
getProject()
Returns theIProject
for current object.IV8Project
getV8project()
Returns the V8 project.Collection<String>
getWaitingPartIds()
Returns the derived state ids that is needed to wait.boolean
isMulti()
Returns the multi value flag.boolean
isValidState()
Returnstrue
if theIAttribute.getObject()
is in valid state.-
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, get, getCommittedValue, getUncommittedValue, getValidatorTarget, isEqual, 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, setComponent, 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.IAttribute
getObject, getProperty
-
Methods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, discard, getChange, getComponent, isOnline, removeModelListener, setComponent
-
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, get, isEqual, removeValueListener, set
-
-
-
-
Constructor Detail
-
EmfValueSelectionModel
public EmfValueSelectionModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project, IElementComparer comparer, IStructuredContentProvider contentProvider, ILabelProvider labelProvider, String... waitingPartIds)
Creates a new model.- Parameters:
object
- the object, cannot benull
feature
- the feature, cannot benull
v8project
- the V8 project, cannot benull
comparer
- the element comparer, can benull
contentProvider
- the content provider that produces elements in dialog, can benull
labelProvider
- the label provider, can benull
waitingPartIds
- the waiting part ids, can benull
-
EmfValueSelectionModel
public EmfValueSelectionModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project, IStructuredContentProvider contentProvider, ILabelProvider labelProvider, String... waitingPartIds)
Creates a new model. With default element comparer.- Parameters:
object
- the object, cannot benull
feature
- the feature, cannot benull
projectParameters
- project parameters, cannot benull
contentProvider
- the content provider that produces elements in dialog, can benull
labelProvider
- the label provider, can benull
waitingPartIds
- the waiting part ids, can benull
-
-
Method Detail
-
getWaitingPartIds
public Collection<String> getWaitingPartIds()
Description copied from interface:IEmfSelectionModel
Returns the derived state ids that is needed to wait.- Specified by:
getWaitingPartIds
in interfaceIEmfSelectionModel<T>
- Returns:
- the ids
-
getLabelProvider
public ILabelProvider getLabelProvider()
Description copied from interface:ISelectionModel
Returns theILabelProvider
.- Specified by:
getLabelProvider
in interfaceISelectionModel
- Returns:
- the
ILabelProvider
.
-
getContentProvider
public IStructuredContentProvider getContentProvider()
Description copied from interface:ISelectionModel
Returns theIStructuredContentProvider
.- Specified by:
getContentProvider
in interfaceISelectionModel
- Returns:
- the
IStructuredContentProvider
.
-
getComparer
public IElementComparer getComparer()
Description copied from interface:ISelectionModel
Returns theIElementComparer
.- Specified by:
getComparer
in interfaceISelectionModel
- Returns:
- the
IElementComparer
, returnnull
if need default comparer.
-
getInput
public Object getInput()
Description copied from interface:ISelectionModel
Returns the input object for contentProvider. In the most cases it is the same object to#getObject()
.- Specified by:
getInput
in interfaceISelectionModel
- Returns:
- the input object.
-
isMulti
public boolean isMulti()
Description copied from interface:ISelectionModel
Returns the multi value flag.- Specified by:
isMulti
in interfaceISelectionModel
- Returns:
- the multi value flag.
-
getProject
public org.eclipse.core.resources.IProject getProject()
Description copied from interface:ISelectionModel
Returns theIProject
for current object.- Specified by:
getProject
in interfaceISelectionModel
- Returns:
- the
IProject
.
-
dispose
public void dispose()
Description copied from interface:IModel
Disposes this model.
-
getV8project
public IV8Project getV8project()
Description copied from interface:ISelectionModel
Returns the V8 project.- Specified by:
getV8project
in interfaceISelectionModel
- Returns:
- the V8 project, never
null
.
-
isValidState
public boolean isValidState()
Description copied from interface:IEmfSelectionModel
Returnstrue
if theIAttribute.getObject()
is in valid state.- Specified by:
isValidState
in interfaceIEmfSelectionModel<T>
- Returns:
- the
true
if theIAttribute.getObject()
is in valid state.
-
getComparator
public ViewerComparator getComparator()
Description copied from interface:ISelectionModel
Returns theViewerComparator
.- Specified by:
getComparator
in interfaceISelectionModel
- Returns:
- the
ViewerComparator
, can benull
.
-
-