org.eclipse.etrice.ui.commands.handlers
Class AbstractEditHandler

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.core.commands.AbstractHandler
          extended by org.eclipse.etrice.ui.commands.handlers.AbstractEditHandler
All Implemented Interfaces:
org.eclipse.core.commands.IHandler, org.eclipse.core.commands.IHandler2
Direct Known Subclasses:
EditBehaviorHandler, EditStructureHandler

public abstract class AbstractEditHandler
extends org.eclipse.core.commands.AbstractHandler

description

Author:
Henrik Rentz-Reichert initial contribution and API

Field Summary
protected  IResourceValidator resourceValidator
          
Constructor Summary
AbstractEditHandler()
           
 
Method Summary
protected  boolean checkPrerequisites(XtextEditor xtextEditor, IXtextDocument document, java.lang.String fragment)
           
 java.lang.Object execute(org.eclipse.core.commands.ExecutionEvent event)
           
 boolean hasIssues(IXtextDocument xtextDocument, org.eclipse.core.runtime.IProgressMonitor monitor)
           
 boolean isEnabled()
           
protected abstract  boolean isEnabled(java.lang.String fragment)
           
protected abstract  void openEditor(EObject object)
           
protected  void openEditor(IXtextDocument document, java.lang.String fragment)
           
protected abstract  boolean prepare(XtextEditor xtextEditor, java.lang.String fragment)
           
 
Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resourceValidator

Constructor Detail

AbstractEditHandler

public AbstractEditHandler()
Method Detail

prepare

protected abstract boolean prepare(XtextEditor xtextEditor,
                                   java.lang.String fragment)

openEditor

protected abstract void openEditor(EObject object)

isEnabled

protected abstract boolean isEnabled(java.lang.String fragment)

execute

public java.lang.Object execute(org.eclipse.core.commands.ExecutionEvent event)
                         throws org.eclipse.core.commands.ExecutionException
Throws:
org.eclipse.core.commands.ExecutionException

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface org.eclipse.core.commands.IHandler
Overrides:
isEnabled in class org.eclipse.core.commands.AbstractHandler

openEditor

protected void openEditor(IXtextDocument document,
                          java.lang.String fragment)

checkPrerequisites

protected boolean checkPrerequisites(XtextEditor xtextEditor,
                                     IXtextDocument document,
                                     java.lang.String fragment)

hasIssues

public boolean hasIssues(IXtextDocument xtextDocument,
                         org.eclipse.core.runtime.IProgressMonitor monitor)