Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy





Class AbstractModelMarkerNavigationProvider

  extended by 

      extended by
          extended by 
All Implemented Interfaces:
Direct Known Subclasses:

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.

Constructor Summary
AbstractModelMarkerNavigationProvider ()
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 AbstractMarkerNavigationProvider
doGotoMarker, getEditor, provides, setEditor
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

Constructor Detail


public AbstractModelMarkerNavigationProvider()
Method Detail


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
gotoMarker in class AbstractMarkerNavigationProvider
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)


protected org.eclipse.emf.ecore.resource.Resource getResource(
IMarker marker)
Determines the EMF resource to which a marker is attached.

marker - a marker
the corresponding EMF resource, or null if either the marker doesn't exist or its resource cannot be loaded by EMF


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.

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
the corresponding list of EObjects, 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.

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire