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
FieldsFields inherited from class com._1c.g5.v8.dt.navigator.adapters.NavigatorAdapterBase
NO_CHILDREN
-
Constructor Summary
ConstructorsConstructorDescriptionModelNavigatorAdapterBase
(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
Modifier and TypeMethodDescriptionObject[]
org.eclipse.jface.resource.ImageDescriptor
getImageDescriptor
(Object object) protected org.eclipse.emf.ecore.EAttribute
Gets the label feature to fetch the label from.protected M
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
Methods inherited from class org.eclipse.ui.model.WorkbenchAdapter
getBackground, getFont, getForeground, getStyledText
-
Field Details
-
symbolicNameService
-
-
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 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 Details
-
getChildren
- Specified by:
getChildren
in interfaceorg.eclipse.ui.model.IWorkbenchAdapter
- Specified by:
getChildren
in classNavigatorAdapterBase
-
hasChildren
Description copied from class:NavigatorAdapterBase
Return true in case of have children.- Specified by:
hasChildren
in classNavigatorAdapterBase
- Returns:
-
getImageDescriptor
- Specified by:
getImageDescriptor
in interfaceorg.eclipse.ui.model.IWorkbenchAdapter
- Specified by:
getImageDescriptor
in classNavigatorAdapterBase
-
getLabel
- Specified by:
getLabel
in interfaceorg.eclipse.ui.model.IWorkbenchAdapter
- Specified by:
getLabel
in classNavigatorAdapterBase
-
getModel
-
getLabelFeature
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.
-