Class ModelNavigatorAdapterBase<M extends org.eclipse.emf.ecore.EObject>

    • Constructor Detail

      • ModelNavigatorAdapterBase

        public ModelNavigatorAdapterBase​(org.eclipse.emf.ecore.EAttribute labelFeature,
                                         org.eclipse.jface.resource.ImageDescriptor icon,
                                         ISymbolicNameService symbolicNameService)
        Constructs the instance.
        labelFeature - model feature to get label text from. Could be null, if you wish to override getLabelFeature(Object) method to select the label feature dynamically.
        icon - the icon this adapter provides, may be null for no icon.
        symbolicNameService - the symbolic name service, cannot be null.
      • ModelNavigatorAdapterBase

        public ModelNavigatorAdapterBase​(org.eclipse.jface.resource.ImageDescriptor icon,
                                         ISymbolicNameService symbolicNameConverter)
        Constructs the instance. If you use this constructor, you should override getLabelFeature(Object) method to return the label feature.
        icon - the icon this adapter provides, may be null for no icon.
        symbolicNameConverter - the symbolic name converter, cannot be null.
    • Method Detail

      • getImageDescriptor

        public org.eclipse.jface.resource.ImageDescriptor getImageDescriptor​(Object object)
        Specified by:
        getImageDescriptor in interface org.eclipse.ui.model.IWorkbenchAdapter
        Specified by:
        getImageDescriptor in class NavigatorAdapterBase
      • getModel

        protected M getModel​(Object o)
      • getLabelFeature

        protected org.eclipse.emf.ecore.EAttribute getLabelFeature​(Object o)
        Gets the label feature to fetch the label from.
        o - the object this adapter tries to adapt, may not be null.
        the label feature.