Runtime

org.eclipse.gmf.runtime.common.ui.services.editor
Class AbstractEditorProvider

java.lang.Object
  extended by org.eclipse.gmf.runtime.common.core.service.AbstractProvider
      extended by org.eclipse.gmf.runtime.common.ui.services.editor.AbstractEditorProvider
All Implemented Interfaces:
IProvider, IEditorProvider

public abstract class AbstractEditorProvider
extends AbstractProvider
implements IEditorProvider

An abstract implementation of an editor provider


Constructor Summary
AbstractEditorProvider()
           
 
Method Summary
protected abstract  boolean canOpen(IEditorInput editorInput)
          Method Determines if the editor provider can open an editor for the given editor input
protected abstract  java.lang.String getEditorId(IEditorInput editorInput)
          Returns the Editor id suitable for the given editor input
 IEditorPart openEditor(IEditorInput editorInput)
          Opens an editor with the given editor input
 boolean provides(IOperation operation)
          Determines if the provider can handle the given editor operation
 
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

AbstractEditorProvider

public AbstractEditorProvider()
Method Detail

openEditor

public IEditorPart openEditor(IEditorInput editorInput)
Opens an editor with the given editor input

Specified by:
openEditor in interface IEditorProvider
Parameters:
editorInput - the editor input object
Returns:
the opened IEditorPart
See Also:
IEditorProvider.openEditor(IEditorInput)

provides

public boolean provides(IOperation operation)
Determines if the provider can handle the given editor operation

Specified by:
provides in interface IProvider
Parameters:
operation - the given operation
Returns:
true if this provider provides the operation; false otherwise.
See Also:
IProvider.provides(org.eclipse.gmf.runtime.common.core.service.IOperation)

getEditorId

protected abstract java.lang.String getEditorId(IEditorInput editorInput)
Returns the Editor id suitable for the given editor input

Parameters:
editorInput - the given editor input
Returns:
String the editor id for the given editor input

canOpen

protected abstract boolean canOpen(IEditorInput editorInput)
Method Determines if the editor provider can open an editor for the given editor input

Parameters:
editorInput - the given editor input
Returns:
boolean whether the provider can open an editor with the given input

Runtime

Guidelines for using Eclipse APIs.

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