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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

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

  




 

 

Runtime

org.eclipse.gmf.runtime.emf.ui.providers.marker
Class AbstractModelMarkerNavigationProvider

java.lang.Object
  extended by 

org.eclipse.gmf.runtime.common.core.service.AbstractProvider
      extended by 

org.eclipse.gmf.runtime.common.ui.services.marker.AbstractMarkerNavigationProvider
          extended by 
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.


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 org.eclipse.gmf.runtime.common.ui.services.marker. 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

AbstractModelMarkerNavigationProvider

public AbstractModelMarkerNavigationProvider()
Method Detail

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 EObjects, in the same order as the ids, though not including any elements that could not be located (due to stale IDs)

Runtime

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