Package com._1c.g5.v8.dt.ui.aef.models
Class BmValueSelectionModel<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.v8.dt.aef2.bm.models.BmValue<T>
-
- com._1c.g5.v8.dt.ui.aef.models.BmValueSelectionModel<T>
-
- All Implemented Interfaces:
IAttribute<IBmObject,org.eclipse.emf.ecore.EStructuralFeature>
,IEditableModel
,IEmfAttribute<IBmObject>
,IModel
,IEmfValueAttribute<T,IBmObject>
,IValue<T>
,IValidable
,IModelApiAwareModel
,IEmfSelectionModel<IBmObject>
,IEmfValueSelectionModel<T,IBmObject>
,ISelectionModel
- Direct Known Subclasses:
BmTreeToSingleItemSelectionModel
,ExtendedConfigurationObjectSelectionModel
public class BmValueSelectionModel<T> extends BmValue<T> implements IEmfValueSelectionModel<T,IBmObject>
The BmIEmfValueSelectionModel
implementation.
-
-
Constructor Summary
Constructors Constructor Description BmValueSelectionModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IDerivedDataManagerProvider derivedDataManagerProvider, IStructuredContentProvider contentProvider, ILabelProvider labelProvider, IV8Project v8project, String... waitingPartIds)
Creates a new model.BmValueSelectionModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IDerivedDataManagerProvider derivedDataManagerProvider, IStructuredContentProvider contentProvider, ILabelProvider labelProvider, IElementComparer comparer, IV8Project v8project, 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.void
setComparator(ViewerComparator comparator)
Sets this viewer's comparator to be used for sorting elements.-
Methods inherited from class com._1c.g5.v8.dt.aef2.bm.models.BmValue
adapt, createTask, getChange, getModelApi, getObject, getObjectValue, getProperty, processBmValueChange, setModelApi, setObjectValue
-
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
-
BmValueSelectionModel
public BmValueSelectionModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IDerivedDataManagerProvider derivedDataManagerProvider, IStructuredContentProvider contentProvider, ILabelProvider labelProvider, IElementComparer comparer, IV8Project v8project, String... waitingPartIds)
Creates a new model.- Parameters:
object
- the object.feature
- the feature.derivedDataManagerProvider
- derived data manager provider, cannot benull
.contentProvider
- the content provider that produces elements in dialog.labelProvider
- the label provider.comparer
- the element comparer.v8project
- the V8 project, cannot benull
waitingPartIds
- the waiting part ids.
-
BmValueSelectionModel
public BmValueSelectionModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IDerivedDataManagerProvider derivedDataManagerProvider, IStructuredContentProvider contentProvider, ILabelProvider labelProvider, IV8Project v8project, String... waitingPartIds)
Creates a new model. With default element comparer.- Parameters:
object
- the object.feature
- the feature.derivedDataManagerProvider
- derived data manager provider, cannot benull
.contentProvider
- the content provider that produces elements in dialog.labelProvider
- the label provider.v8project
- the V8 project, cannot benull
waitingPartIds
- the waiting part ids.
-
-
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
.
-
setComparator
public void setComparator(ViewerComparator comparator)
Sets this viewer's comparator to be used for sorting elements.- Parameters:
comparator
- a viewer comparator, ornull
if none
-
-