Class NavigatorTreeModel

    • 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 be null
        features - the features, cannot be null
        trackingFeatures - a collection of EStructuralFeatures those are needed to track. Can be null.
        nodesToFlatten - the nodes to flatten in FlatteningTreeContentProvider. Can be null.
        treeItemFilter - the filters in FilteringTreeContentProvider. Can be null.
      • 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 be null
        features - the feature, cannot be null
        trackingFeatures - a collection of EStructuralFeatures those are needed to track. Can be null.
        nodesToFlatten - the nodes to flatten in FlatteningTreeContentProvider. Can be null.
        treeItemFilters - the filters in FilteringTreeContentProvider. Can be null.
    • Method Detail

      • getContentService

        public org.eclipse.ui.navigator.INavigatorContentService getContentService()
        Gets actual INavigatorContentService
        Returns:
        actual INavigatorContentService for getting navigator content and label provider, never null
      • dispose

        public void dispose()
        Description copied from interface: IModel
        Disposes this model.
        Specified by:
        dispose in interface IModel
        Overrides:
        dispose in class Model
      • getChange

        public IChange getChange()
        Specified by:
        getChange in interface IModel
        Returns:
        change describing the modifications done to the model.
      • 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 given EClass.
        Parameters:
        eClass - the EClass.
        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
      • 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 be null
        Parameters:
        subtreeInducer - the subtree inducer, cannot be null
        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