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 Summary
Fields Modifier and Type Field Description protected ISymbolicNameService
symbolicNameService
-
Fields inherited from class com._1c.g5.v8.dt.navigator.adapters.NavigatorAdapterBase
NO_CHILDREN
-
-
Constructor Summary
Constructors Constructor Description ModelNavigatorAdapterBase(org.eclipse.emf.ecore.EAttribute labelFeature, org.eclipse.jface.resource.ImageDescriptor icon, ISymbolicNameService symbolicNameService)
Constructs the instance.ModelNavigatorAdapterBase(org.eclipse.jface.resource.ImageDescriptor icon, ISymbolicNameService symbolicNameConverter)
Constructs the instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]
getChildren(Object o)
org.eclipse.jface.resource.ImageDescriptor
getImageDescriptor(Object object)
String
getLabel(Object o)
protected org.eclipse.emf.ecore.EAttribute
getLabelFeature(Object o)
Gets the label feature to fetch the label from.protected M
getModel(Object o)
boolean
hasChildren(Object element)
Return true in case of have children.-
Methods inherited from class com._1c.g5.v8.dt.navigator.adapters.NavigatorAdapterBase
getAdapter, getParent
-
-
-
-
Field Detail
-
symbolicNameService
protected final ISymbolicNameService symbolicNameService
-
-
Constructor Detail
-
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 benull
, if you wish to overridegetLabelFeature(Object)
method to select the label feature dynamically.icon
- the icon this adapter provides, may benull
for no icon.symbolicNameService
- the symbolic name service, cannot benull
.
-
ModelNavigatorAdapterBase
public ModelNavigatorAdapterBase(org.eclipse.jface.resource.ImageDescriptor icon, ISymbolicNameService symbolicNameConverter)
Constructs the instance. If you use this constructor, you should overridegetLabelFeature(Object)
method to return the label feature.- Parameters:
icon
- the icon this adapter provides, may benull
for no icon.symbolicNameConverter
- the symbolic name converter, cannot benull
.
-
-
Method Detail
-
getChildren
public Object[] getChildren(Object o)
- Specified by:
getChildren
in interfaceorg.eclipse.ui.model.IWorkbenchAdapter
- Specified by:
getChildren
in classNavigatorAdapterBase
-
hasChildren
public boolean hasChildren(Object element)
Description copied from class:NavigatorAdapterBase
Return true in case of have children.- Specified by:
hasChildren
in classNavigatorAdapterBase
- Returns:
-
getImageDescriptor
public org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(Object object)
- Specified by:
getImageDescriptor
in interfaceorg.eclipse.ui.model.IWorkbenchAdapter
- Specified by:
getImageDescriptor
in classNavigatorAdapterBase
-
getLabel
public String getLabel(Object o)
- Specified by:
getLabel
in interfaceorg.eclipse.ui.model.IWorkbenchAdapter
- Specified by:
getLabel
in classNavigatorAdapterBase
-
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 benull
.- Returns:
- the label feature.
-
-