Package com._1c.g5.v8.dt.ui.aef.models
Class NavigatorTreeModel
- java.lang.Object
-
- com._1c.g5.aef2.validators.Validable
-
- com._1c.g5.aef2.models.Model
-
- com._1c.g5.aef2.models.EditableModel
-
- com._1c.g5.v8.dt.ui.aef.models.NavigatorTreeModel
-
- All Implemented Interfaces:
IEditableModel
,IModel
,IValidable
,IDynamicTreeModel<Object>
- Direct Known Subclasses:
AttributesNavigatorTreeModel
,CommonAttributeContentModel
,ConfigurationStandaloneContentModel
,CubeObjectsNavigatorTreeModel
,ExchangePlanContentModel
,ExternalDataSourceObjectsNavigatorTreeModel
,StandardObjectsNavigatorTreeModel
public class NavigatorTreeModel extends EditableModel implements IDynamicTreeModel<Object>
TheIDynamicTreeModel
implementation for navigator objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NavigatorTreeModel.PredicateFilter
Navigator tree component predicate filter.
-
Constructor Summary
Constructors Constructor Description NavigatorTreeModel(Object input, List<org.eclipse.emf.ecore.EStructuralFeature> features, Collection<EObjectFeature> trackingObjectFeatures, Collection<org.eclipse.emf.ecore.EStructuralFeature> trackingFeatures, Class<?>[] nodesToFlatten, List<TreeItemFilter> treeItemFilters)
Creates a new model.NavigatorTreeModel(org.eclipse.emf.ecore.EObject eObject, List<org.eclipse.emf.ecore.EStructuralFeature> features, Collection<org.eclipse.emf.ecore.EStructuralFeature> trackingFeatures, Class<?>[] nodesToFlatten, List<TreeItemFilter> treeItemFilter)
Creates a new model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ILabelProvider
createLabelProvider()
Creates label provider.protected ITreeContentProvider
createTreeContentProvider()
Creates tree content provider.void
dispose()
Disposes this model.IChange
getChange()
ICheckStateProvider
getCheckStateProvider()
org.eclipse.ui.navigator.INavigatorContentService
getContentService()
Gets actualINavigatorContentService
Collection<org.eclipse.emf.ecore.EStructuralFeature>
getFeatures()
Returns the collection of features backed by this model.NavigatorTreeModel.PredicateFilter
getFilter()
Returns the main predicate filter used by this model.List<TreeItemFilter>
getFilters()
Returns the list of tree item filters used by this model.Object
getInput()
ILabelProvider
getLabelProvider()
Collection<org.eclipse.emf.ecore.EStructuralFeature>
getTrackingFeatures(org.eclipse.emf.ecore.EClass eClass)
Returns the collection of features that are needed to track for a givenEClass
.Collection<EObjectFeature>
getTrackingObjectFeatures()
Returns the list of models this model listens to.ITreeContentProvider
getTreeContentProvider()
void
setSubtreeInducer(ISubtreeInducer subtreeInducer)
Sets subtree inducer for the navigator, cannot benull
-
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, createWorkingCopy, discard, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setComponent, setOnline, toString
-
Methods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, getValidatorTarget, 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, createWorkingCopy, discard, getComponent, isOnline, removeModelListener, setComponent
-
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
-
-
-
Field Detail
-
features
protected List<org.eclipse.emf.ecore.EStructuralFeature> features
-
-
Constructor Detail
-
NavigatorTreeModel
public NavigatorTreeModel(org.eclipse.emf.ecore.EObject eObject, List<org.eclipse.emf.ecore.EStructuralFeature> features, Collection<org.eclipse.emf.ecore.EStructuralFeature> trackingFeatures, Class<?>[] nodesToFlatten, List<TreeItemFilter> treeItemFilter)
Creates a new model.- Parameters:
eObject
- the object, cannot benull
features
- the features, cannot benull
trackingFeatures
- a collection ofEStructuralFeature
s those are needed to track. Can benull
.nodesToFlatten
- the nodes to flatten inFlatteningTreeContentProvider
. Can benull
.treeItemFilter
- the filters inFilteringTreeContentProvider
. Can benull
.
-
NavigatorTreeModel
public NavigatorTreeModel(Object input, List<org.eclipse.emf.ecore.EStructuralFeature> features, Collection<EObjectFeature> trackingObjectFeatures, Collection<org.eclipse.emf.ecore.EStructuralFeature> trackingFeatures, Class<?>[] nodesToFlatten, List<TreeItemFilter> treeItemFilters)
Creates a new model.- Parameters:
input
- the content input, cannot benull
features
- the feature, cannot benull
trackingFeatures
- a collection ofEStructuralFeature
s those are needed to track. Can benull
.nodesToFlatten
- the nodes to flatten inFlatteningTreeContentProvider
. Can benull
.treeItemFilters
- the filters inFilteringTreeContentProvider
. Can benull
.
-
-
Method Detail
-
getInput
public Object getInput()
- Specified by:
getInput
in interfaceIDynamicTreeModel<Object>
- Returns:
- the input for content provider
-
getContentService
public org.eclipse.ui.navigator.INavigatorContentService getContentService()
Gets actualINavigatorContentService
- Returns:
- actual
INavigatorContentService
for getting navigator content and label provider, nevernull
-
getTreeContentProvider
public ITreeContentProvider getTreeContentProvider()
- Specified by:
getTreeContentProvider
in interfaceIDynamicTreeModel<Object>
- Returns:
- the domain model content provider
-
getCheckStateProvider
public ICheckStateProvider getCheckStateProvider()
- Specified by:
getCheckStateProvider
in interfaceIDynamicTreeModel<Object>
- Returns:
- the
ICheckStateProvider
-
getLabelProvider
public ILabelProvider getLabelProvider()
- Specified by:
getLabelProvider
in interfaceIDynamicTreeModel<Object>
- Returns:
- the
ILabelProvider
-
dispose
public void dispose()
Description copied from interface:IModel
Disposes this model.
-
getChange
public IChange getChange()
-
getTrackingFeatures
public Collection<org.eclipse.emf.ecore.EStructuralFeature> getTrackingFeatures(org.eclipse.emf.ecore.EClass eClass)
Returns the collection of features that are needed to track for a givenEClass
.- Parameters:
eClass
- theEClass
.- Returns:
- the collection of features.
-
getTrackingObjectFeatures
public Collection<EObjectFeature> getTrackingObjectFeatures()
Returns the list of models this model listens to.- Returns:
- the list of models
-
getFilters
public List<TreeItemFilter> getFilters()
Returns the list of tree item filters used by this model.- Returns:
- the list of tree item filters
-
getFilter
public NavigatorTreeModel.PredicateFilter getFilter()
Returns the main predicate filter used by this model.- Returns:
- the predicate filter of the model
-
getFeatures
public Collection<org.eclipse.emf.ecore.EStructuralFeature> getFeatures()
Returns the collection of features backed by this model.- Returns:
- the collection of features
-
setSubtreeInducer
public void setSubtreeInducer(ISubtreeInducer subtreeInducer)
Sets subtree inducer for the navigator, cannot benull
- Parameters:
subtreeInducer
- the subtree inducer, cannot benull
- See Also:
ISubtreeInducer
-
createLabelProvider
protected ILabelProvider createLabelProvider()
Creates label provider.- Returns:
- the label provider, cannot be
null
-
createTreeContentProvider
protected ITreeContentProvider createTreeContentProvider()
Creates tree content provider.- Returns:
- the tree content provider, cannot be
null
-
-