|
|
|
|
org.eclipse.gmf.runtime.emf.ui.providers.marker
Class AbstractModelMarkerNavigationProvider
java.lang.Object
org.eclipse.gmf.runtime.common.core.service.AbstractProvider
org.eclipse.gmf.runtime.common.ui.services.marker.AbstractMarkerNavigationProvider
org.eclipse.gmf.runtime.emf.ui.providers.marker.AbstractModelMarkerNavigationProvider
-
All Implemented Interfaces:
-
IProvider, org.eclipse.gmf.runtime.common.ui.services.internal.marker.IMarkerNavigationProvider
-
Direct Known Subclasses:
-
AbstractDiagramMarkerNavigationProvider
-
public abstract class AbstractModelMarkerNavigationProvider
- extends
AbstractMarkerNavigationProvider
Abstract Model Marker Navigation Provider this abstract class provides
the necessary wrapping required to perform model operations related to
the navigation of markers. If the marker attributes contain model element
information that needs to be resolved, the corresponding marker provider
should be derived from this class.
Derived classes should implement the getContext() and the doGotoMarker()
methods. The latter method will be called within a model read operation.
Method Summary
|
protected java.util.List
|
getEObjects
(java.util.List ids,
org.eclipse.emf.ecore.resource.Resource resource)
Given a list of element IDs, looks up the elements, themselves, and
returns them in the same order. |
protected org.eclipse.emf.ecore.resource.Resource
|
getResource
(
IMarker marker)
Determines the EMF resource to which a marker is attached. |
void
|
gotoMarker
(
IEditorPart editor,
IMarker marker)
Perform the feedback for navigating to the given marker within a
model read action. |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
AbstractModelMarkerNavigationProvider
public AbstractModelMarkerNavigationProvider()
gotoMarker
public final void gotoMarker(
IEditorPart editor,
IMarker marker)
- Perform the feedback for navigating to the given marker within a
model read action.
-
-
Specified by:
-
gotoMarker in interface org.eclipse.gmf.runtime.common.ui.services.internal.marker.IMarkerNavigationProvider
-
Overrides:
-
gotoMarker
in class
AbstractMarkerNavigationProvider
-
-
Parameters:
-
editor - the editor opened with the associated resource -
marker - the marker reference -
See Also:
-
IMarkerNavigationProvider.gotoMarker(org.eclipse.ui.IEditorPart,
org.eclipse.core.resources.IMarker)
getResource
protected org.eclipse.emf.ecore.resource.Resource getResource(
IMarker marker)
- Determines the EMF resource to which a marker is attached.
-
-
Parameters:
-
marker - a marker
-
Returns:
- the corresponding EMF resource, or
null if either
the marker doesn't
exist or its resource
cannot be loaded by EMF
getEObjects
protected java.util.List getEObjects(java.util.List ids,
org.eclipse.emf.ecore.resource.Resource resource)
- Given a list of element IDs, looks up the elements, themselves, and
returns them in the same order.
The ids passed to this method should follow a couple of
conventions for compactness of implementation in a marker:
- any ID in the list that is a URI fragment (i.e., does not include
a resource URI) is assumed to be relative to the URI of the
specified
resource
- any ID in the list that does not reference an object in the
specified
resource must be a fully-qualified URI
(i.e., it must include a resource URI part)
Thus, in the majority of cases (where all referenced objects are in the
resource that has the marker), the object IDs in the marker will be as
compact as possible.
-
-
Parameters:
-
ids - a list of element IDs, as described above -
resource - the resource that has a marker from which the list of
IDs was extracted. URI fragments in the ids list are
assumed to be relative to this resource's URI. Must not be
null
-
Returns:
- the corresponding list of
EObject s, in the same order as
the ids , though not including any elements that could
not be located (due to stale IDs)
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.
|
|
|