Runtime

## org.eclipse.gmf.runtime.common.ui.services.marker
Class AbstractMarkerNavigationProvider

    java.lang.Object
      org.eclipse.gmf.runtime.common.core.service.AbstractProvider
          org.eclipse.gmf.runtime.common.ui.services.marker.AbstractMarkerNavigationProvider

All Implemented Interfaces:
  org.eclipse.gmf.runtime.common.ui.services.internal.marker.IMarkerNavigationProvider, IProvider

Direct Known Subclasses:
  AbstractModelMarkerNavigationProvider

public abstract class AbstractMarkerNavigationProvider
extends AbstractProvider
implements org.eclipse.gmf.runtime.common.ui.services.internal.marker.IMarkerNavigationProvider

This class saves the editor associated with the goto operation so that utility methods in derived classes can access the editor instance before the doGotoMarker() method is called.

Constructor Summary
`AbstractMarkerNavigationProvider()`

Method Summary
`protected abstract void` `doGotoMarker(IMarker marker)` Perform the marker navigation in a derived class.
`protected IEditorPart` `getEditor()` Retrieve the saved editor instance.
`void` `gotoMarker(IEditorPart edit, IMarker marker)` Perform the feedback for navigating to the given marker.
`boolean` `provides(IOperation operation)` Indicates whether this provider provides the specified operation.
`protected void` `setEditor(IEditorPart anEditor)` Save the editor instance associated with the marker.

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

### AbstractMarkerNavigationProvider

    public AbstractMarkerNavigationProvider()

Method Detail

### setEditor

    protected void setEditor(IEditorPart anEditor)

  Save the editor instance associated with the marker.

  Parameters:
    `anEditor` - the editor instance to be saved

### getEditor

    protected IEditorPart getEditor()

  Retrieve the saved editor instance.

  Returns:
    the saved editor instance

### doGotoMarker

    protected abstract void doGotoMarker(IMarker marker)

  Perform the marker navigation in a derived class.

  Parameters:
    `marker` - the IMarker to go to

### gotoMarker

    public void gotoMarker(IEditorPart edit,
                           IMarker marker)

  Perform the feedback for navigating to the given marker.

  Specified by:
    `gotoMarker` in interface `org.eclipse.gmf.runtime.common.ui.services.internal.marker.IMarkerNavigationProvider`
  Parameters:
    `edit` - the editor opened with the associated resource
    `marker` - the marker reference
  See Also:
    `IMarkerNavigationProvider.gotoMarker(org.eclipse.ui.IEditorPart, org.eclipse.core.resources.IMarker)`

### provides

    public boolean provides(IOperation operation)

  Description copied from interface: `IProvider`
  Indicates whether this provider provides the specified operation.

  Providers generally cast the operation to a service specific `IOperation`-derived class in order to determine whether they support the request.

  Specified by:
    `provides` in interface `IProvider`
  Parameters:
    `operation` - The operation in question.
  Returns:
    `true` if this provider provides the operation; `false` otherwise.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.