TPTP 4.5.0 Platform Project
Internal API Specification

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

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

public abstract class AbstractInstrumentAddAction
extends AbstractObjectActionDelegate

This class represents common logic functions of add BtM source instrument(ARM/CBE)


Constructor Summary
AbstractInstrumentAddAction()
           
 
Method Summary
protected abstract  java.util.Map getDetermineInsertInfo(org.eclipse.jdt.core.IMethod method)
           
protected  java.lang.String getFullMethodName(org.eclipse.jdt.core.IMethod method)
           
protected abstract  java.lang.String getMethodEntryInsertedText(org.eclipse.jdt.core.IMethod method)
          retrive inserted source code in begin braces of specified method. return source code text will be insert after begin braces of method. subclass must override this method to return actual inserted source code
protected  int getMethodEntryPosition(org.eclipse.jdt.core.dom.MethodDeclaration method)
          return begin location of inserting customized source code(ARM,CBE)
protected abstract  java.lang.String getMethodExitInsertedText(org.eclipse.jdt.core.IMethod method)
           
protected  int getMethodExitPosition(org.eclipse.jdt.core.dom.MethodDeclaration method)
          return end location of inserting customized source code(ARM,JMX,CBE)
protected  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.
protected  void processOtherInsertTask(org.eclipse.text.edits.MultiTextEdit edit, org.eclipse.jdt.core.IMethod method, org.eclipse.jdt.core.dom.MethodDeclaration methodNode)
          process other task of inserting code that can't including both entry and exit
 
Methods inherited from class org.eclipse.tptp.platform.instrumentation.ui.internal.sourceeditor.actions.AbstractObjectActionDelegate
getWarningMessage, run, selectionChanged, setActivePart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractInstrumentAddAction

public AbstractInstrumentAddAction()
Method Detail

processBtmInstrumentAction

protected 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)
Description copied from class: AbstractObjectActionDelegate
Center entry to process BtM add/remove instrumentaion code to specified method. Subclass must provide its implementation to process add or remove logic code

Specified by:
processBtmInstrumentAction in class AbstractObjectActionDelegate
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

getMethodEntryPosition

protected int getMethodEntryPosition(org.eclipse.jdt.core.dom.MethodDeclaration method)
return begin location of inserting customized source code(ARM,CBE)

Parameters:
method - need to insert method AST node
Returns:
begin inserted location

getMethodExitPosition

protected int getMethodExitPosition(org.eclipse.jdt.core.dom.MethodDeclaration method)
return end location of inserting customized source code(ARM,JMX,CBE)

Parameters:
method - need to insert method AST node
Returns:
end inserted location

processOtherInsertTask

protected void processOtherInsertTask(org.eclipse.text.edits.MultiTextEdit edit,
                                      org.eclipse.jdt.core.IMethod method,
                                      org.eclipse.jdt.core.dom.MethodDeclaration methodNode)
process other task of inserting code that can't including both entry and exit

Parameters:
edit - multi text edit
method - method needed to insert code
methodNode - AST node of method needed to insert code

getMethodEntryInsertedText

protected abstract java.lang.String getMethodEntryInsertedText(org.eclipse.jdt.core.IMethod method)
retrive inserted source code in begin braces of specified method. return source code text will be insert after begin braces of method. subclass must override this method to return actual inserted source code

Parameters:
method -
Returns:
source code text will be inserted

getMethodExitInsertedText

protected abstract java.lang.String getMethodExitInsertedText(org.eclipse.jdt.core.IMethod method)
Parameters:
method -
Returns:

getDetermineInsertInfo

protected abstract java.util.Map getDetermineInsertInfo(org.eclipse.jdt.core.IMethod method)
Parameters:
method - TODO
Returns:

getFullMethodName

protected java.lang.String getFullMethodName(org.eclipse.jdt.core.IMethod method)
Parameters:
method -
Returns:

TPTP 4.5.0 Platform Project
Internal API Specification