TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.instrumentation.ui.internal.sourceeditor.actions
Class AbstractObjectActionDelegate

java.lang.Object
  extended by org.eclipse.tptp.platform.instrumentation.ui.internal.sourceeditor.actions.AbstractObjectActionDelegate
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IObjectActionDelegate
Direct Known Subclasses:
AbstractInstrumentAddAction, AbstractInstrumentRemoveAction

public abstract class AbstractObjectActionDelegate
extends java.lang.Object
implements org.eclipse.ui.IObjectActionDelegate

This class represents common logic functions of add and remove BtM source instrument. Also, it provides some hook methods that subclass must be overrided to provided specific action.


Constructor Summary
AbstractObjectActionDelegate()
           
 
Method Summary
protected abstract  java.lang.String getWarningMessage()
           
protected abstract  void processBtmInstrumentAction(org.eclipse.jdt.core.dom.MethodDeclaration methodDeclaration, org.eclipse.jdt.core.IMethod method, org.eclipse.text.edits.MultiTextEdit edit, java.lang.StringBuffer msgBuffer)
          Center entry to process BtM add/remove instrumentaion code to specified method.
 void run(org.eclipse.jface.action.IAction action)
           
 void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
           
 void setActivePart(org.eclipse.jface.action.IAction action, org.eclipse.ui.IWorkbenchPart targetPart)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractObjectActionDelegate

public AbstractObjectActionDelegate()
Method Detail

run

public void run(org.eclipse.jface.action.IAction action)
Specified by:
run in interface org.eclipse.ui.IActionDelegate

selectionChanged

public void selectionChanged(org.eclipse.jface.action.IAction action,
                             org.eclipse.jface.viewers.ISelection selection)
Specified by:
selectionChanged in interface org.eclipse.ui.IActionDelegate

setActivePart

public void setActivePart(org.eclipse.jface.action.IAction action,
                          org.eclipse.ui.IWorkbenchPart targetPart)
Specified by:
setActivePart in interface org.eclipse.ui.IObjectActionDelegate

processBtmInstrumentAction

protected abstract void processBtmInstrumentAction(org.eclipse.jdt.core.dom.MethodDeclaration methodDeclaration,
                                                   org.eclipse.jdt.core.IMethod method,
                                                   org.eclipse.text.edits.MultiTextEdit edit,
                                                   java.lang.StringBuffer msgBuffer)
Center entry to process BtM add/remove instrumentaion code to specified method. Subclass must provide its implementation to process add or remove logic code

Parameters:
methodDeclaration - method AST node associated with method needed to add/remove code
method - method needed to add/remove code
edit - multi-text edit can be used to aggregate several edits into one edit
msgBuffer -

getWarningMessage

protected abstract java.lang.String getWarningMessage()

TPTP 4.5.0 Platform Project
Internal API Specification