|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.common.core.service.AbstractProvider
org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider
public class AbstractViewProvider
Implements of the IViewProvider
interface. This
implementations invokes the approrpiate factory method by inspecting the
supplied operation and provides the actual view creation functionality.
Nested Class Summary | |
---|---|
protected static class |
AbstractViewProvider.ClassToCreationMethodMap
|
Field Summary | |
---|---|
static AbstractViewProvider.ClassToCreationMethodMap |
classToCreateMethod
|
Constructor Summary | |
---|---|
AbstractViewProvider()
|
Method Summary | |
---|---|
Diagram |
createDiagram(IAdaptable contextElement,
java.lang.String diagramKind,
PreferencesHint preferencesHint)
create an Diagram element. |
Edge |
createEdge(IAdaptable semanticAdapter,
View containerView,
java.lang.String semanticHint,
int index,
boolean persisted,
PreferencesHint preferencesHint)
create an Edge element. |
Node |
createNode(IAdaptable semanticAdapter,
View containerView,
java.lang.String semanticHint,
int index,
boolean persisted,
PreferencesHint preferencesHint)
create a Node . |
protected java.lang.Class |
getDiagramViewClass(IAdaptable semanticAdapter,
java.lang.String diagramKind)
Returns the diagram view class to instantiate based on the passed params |
protected java.lang.Class |
getEdgeViewClass(IAdaptable semanticAdapter,
View containerView,
java.lang.String semanticHint)
Returns the edge view class to instantiate based on the passed params |
protected java.lang.Class |
getNodeViewClass(IAdaptable semanticAdapter,
View containerView,
java.lang.String semanticHint)
Returns the node view class to instantiate based on the passed params |
protected org.eclipse.emf.ecore.EClass |
getSemanticEClass(IAdaptable semanticAdapter)
Returns the EClass associated with the semantic adapter |
protected org.eclipse.emf.ecore.EObject |
getSemanticElement(IAdaptable semanticAdapter)
Returns the semantic element associated with the semantic adapter |
protected org.eclipse.emf.ecore.EObject |
getSemanticElement(IAdaptable semanticAdapter,
org.eclipse.emf.transaction.TransactionalEditingDomain domain)
Returns the semantic element associated with the semantic adapter |
protected boolean |
provides(CreateDiagramViewOperation operation)
Determines whether this provider can provide for the specified diagram view operation |
protected boolean |
provides(CreateEdgeViewOperation operation)
Determines whether this provider can provide for the specified edge view operation |
protected boolean |
provides(CreateNodeViewOperation operation)
Determines whether this provider can provide for the specified node view operation |
protected boolean |
provides(CreateViewForKindOperation op)
Determines whether this provider can provide for the specified view creation operation |
boolean |
provides(IOperation operation)
Determines whether this view provider can provide for the required operation It inspects the type of view operation and calls the corresponding provides method. |
Methods inherited from class org.eclipse.gmf.runtime.common.core.service.AbstractProvider |
---|
addProviderChangeListener, fireProviderChange, removeProviderChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.gmf.runtime.common.core.service.IProvider |
---|
addProviderChangeListener, removeProviderChangeListener |
Field Detail |
---|
public static AbstractViewProvider.ClassToCreationMethodMap classToCreateMethod
Constructor Detail |
---|
public AbstractViewProvider()
Method Detail |
---|
public final boolean provides(IOperation operation)
provides
method.
provides
in interface IProvider
operation
- The operation in question.
true
if this provider provides the operation;
false
otherwise.IProvider.provides(IOperation)
public final Diagram createDiagram(IAdaptable contextElement, java.lang.String diagramKind, PreferencesHint preferencesHint)
IViewProvider
Diagram
element.
createDiagram
in interface IViewProvider
diagramKind
- indicates the diagram typepreferencesHint
- The preference hint that is to be used to find the appropriate
preference store from which to retrieve diagram preference
values. The preference hint is mapped to a preference store in
the preference registry <@link DiagramPreferencesRegistry>.
Diagram
public final Edge createEdge(IAdaptable semanticAdapter, View containerView, java.lang.String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint)
IViewProvider
Edge
element.
createEdge
in interface IViewProvider
containerView
- the container view that will contain the created view.index
- position in the container view's list of children views.persisted
- indicates if the created edge will be persisted or notpreferencesHint
- The preference hint that is to be used to find the appropriate
preference store from which to retrieve diagram preference
values. The preference hint is mapped to a preference store in
the preference registry <@link DiagramPreferencesRegistry>.
Edge
public final Node createNode(IAdaptable semanticAdapter, View containerView, java.lang.String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint)
IViewProvider
Node
.
createNode
in interface IViewProvider
containerView
- the container view that will contain the created view.index
- position in the container view's list of children views.persisted
- indicates if the created view will be persisted or notpreferencesHint
- The preference hint that is to be used to find the appropriate
preference store from which to retrieve diagram preference
values. The preference hint is mapped to a preference store in
the preference registry <@link DiagramPreferencesRegistry>.
Node
protected boolean provides(CreateViewForKindOperation op)
operation
- Contains a semantic kind and a containerView
protected boolean provides(CreateDiagramViewOperation operation)
operation
-
protected boolean provides(CreateEdgeViewOperation operation)
operation
-
protected boolean provides(CreateNodeViewOperation operation)
operation
-
protected java.lang.Class getDiagramViewClass(IAdaptable semanticAdapter, java.lang.String diagramKind)
semanticAdapter
- TODOsemanticAdapter
-
protected java.lang.Class getEdgeViewClass(IAdaptable semanticAdapter, View containerView, java.lang.String semanticHint)
semanticAdapter
- containerView
- semanticHint
-
protected java.lang.Class getNodeViewClass(IAdaptable semanticAdapter, View containerView, java.lang.String semanticHint)
semanticAdapter
- containerView
- semanticHint
-
protected org.eclipse.emf.ecore.EClass getSemanticEClass(IAdaptable semanticAdapter)
semanticAdapter
-
protected org.eclipse.emf.ecore.EObject getSemanticElement(IAdaptable semanticAdapter)
semanticAdapter
-
protected org.eclipse.emf.ecore.EObject getSemanticElement(IAdaptable semanticAdapter, org.eclipse.emf.transaction.TransactionalEditingDomain domain)
semanticAdapter
-
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.