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

java.lang.Object
org.eclipse.ui.model.WorkbenchAdapter
com._1c.g5.v8.dt.navigator.adapters.NavigatorAdapterBase
com._1c.g5.v8.dt.navigator.adapters.ModelNavigatorAdapterBase<M>
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.model.IWorkbenchAdapter, org.eclipse.ui.model.IWorkbenchAdapter2, org.eclipse.ui.model.IWorkbenchAdapter3
Direct Known Subclasses:
MdModelNavigatorAdapterBase, StandardAttributeNavigatorAdapter, StandardTabularSectionDescriptionNavigatorAdapter

public abstract class ModelNavigatorAdapterBase<M extends org.eclipse.emf.ecore.EObject> extends NavigatorAdapterBase
Base adapter for model nodes.
  • Field Details

  • Constructor Details

    • ModelNavigatorAdapterBase

      public ModelNavigatorAdapterBase(org.eclipse.emf.ecore.EAttribute labelFeature, org.eclipse.jface.resource.ImageDescriptor icon, ISymbolicNameService symbolicNameService)
      Constructs the instance.
      Parameters:
      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.
      Parameters:
      icon - the icon this adapter provides, may be null for no icon.
      symbolicNameConverter - the symbolic name converter, cannot be null.
  • Method Details

    • getChildren

      public Object[] getChildren(Object o)
      Specified by:
      getChildren in interface org.eclipse.ui.model.IWorkbenchAdapter
      Specified by:
      getChildren in class NavigatorAdapterBase
    • hasChildren

      public boolean hasChildren(Object element)
      Description copied from class: NavigatorAdapterBase
      Return true in case of have children.
      Specified by:
      hasChildren in class NavigatorAdapterBase
      Returns:
    • 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
    • getLabel

      public String getLabel(Object o)
      Specified by:
      getLabel in interface org.eclipse.ui.model.IWorkbenchAdapter
      Specified by:
      getLabel 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.
      Parameters:
      o - the object this adapter tries to adapt, may not be null.
      Returns:
      the label feature.