TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.instrumentation.ui.internal.launcher.deleg.application
Class InstrumentDelegateHelper

java.lang.Object
  extended by org.eclipse.tptp.platform.instrumentation.ui.internal.launcher.deleg.application.InstrumentDelegateHelper

public class InstrumentDelegateHelper
extends java.lang.Object

Helper class that creates the agents, processes and configures the runtime arguments.


Field Summary
static int DEFAULT_FREQUENCY
           
 
Constructor Summary
InstrumentDelegateHelper()
           
 
Method Summary
static void addProfileFiles(InstrumentProcessListener listener, org.eclipse.debug.core.ILaunchConfiguration conf)
          Adds the probe files to the listener.
static java.util.ArrayList addVmArguments(org.eclipse.debug.core.ILaunchConfiguration conf)
          Add the vm arguments.
static InstrumentProcessListener configureProcess(Process process, org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy, org.eclipse.debug.core.ILaunchConfiguration conf, InstrumentAgentDiscoverer instrumentAgentDiscoverer)
          Configures the current process and adds a process listener.
static Agent createAgent(org.eclipse.debug.core.ILaunchConfiguration conf, Process process, org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy, java.lang.String agentName, java.lang.String agentType, java.lang.String profileFile, InstrumentProcessListener listener, InstrumentAgentDiscoverer discoverer)
          Create a new agent instance with the specified name and type.
static Agent createManagementAgent(org.eclipse.debug.core.ILaunchConfiguration configuration, Process runningProcess, org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy)
          Create a management agent.
static java.lang.String[] getAllSelectedAnalysisIds(org.eclipse.debug.core.ILaunchConfiguration launchConfiguration)
          Returns a string array of the selected analysis ids.
static java.util.List getAllSelectedAnalysisIdsAsList(org.eclipse.debug.core.ILaunchConfiguration launchConfiguration)
          Returns a list of the selected analysis ids.
static java.lang.String getAspectClasspath(java.lang.String existClassPath, org.eclipse.debug.core.ILaunchConfiguration conf)
          Adds the aspect jars to the classpath.
static java.lang.String getProbeClassPath(java.lang.String existClassPath, org.eclipse.debug.core.ILaunchConfiguration conf, java.lang.Object process)
          Adds the probe temp jar file to the classpath
static org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters getProcessParameter(org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters processParameters, org.eclipse.debug.core.ILaunchConfiguration conf)
          Returns the ProcessParameters.
static org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters getServerProcessParameter(org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters processParameters, org.eclipse.debug.core.ILaunchConfiguration conf)
          Returns the ProcessParameters for the profile on server.
static org.eclipse.debug.core.ILaunchConfiguration handleInstrumentGenerator(org.eclipse.debug.core.ILaunchConfiguration configuration)
          It is used to handle instrument generator stuff for user selected analysis types.
static boolean isArmAnalysisType(org.eclipse.debug.core.ILaunchConfiguration conf)
           
static boolean isAspectSelected(org.eclipse.debug.core.ILaunchConfiguration conf)
          Returns true if the aspect library are available and selected type is aspects.
static org.eclipse.debug.core.ILaunchConfiguration preLaunch(org.eclipse.debug.core.ILaunchConfiguration configuration)
          Creates the generators and calls the register instrument handlers for the selected analysis types.
static void removeInstrumentJar(java.lang.Object process)
          Removes the temp jar file from the instrument jar map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FREQUENCY

public static final int DEFAULT_FREQUENCY
See Also:
Constant Field Values
Constructor Detail

InstrumentDelegateHelper

public InstrumentDelegateHelper()
Method Detail

preLaunch

public static org.eclipse.debug.core.ILaunchConfiguration preLaunch(org.eclipse.debug.core.ILaunchConfiguration configuration)
                                                             throws org.eclipse.core.runtime.CoreException
Creates the generators and calls the register instrument handlers for the selected analysis types.

Parameters:
configuration - The launch configuration
Returns:
The save copy of ILaunchConfiguration
Throws:
org.eclipse.core.runtime.CoreException

handleInstrumentGenerator

public static org.eclipse.debug.core.ILaunchConfiguration handleInstrumentGenerator(org.eclipse.debug.core.ILaunchConfiguration configuration)
                                                                             throws org.eclipse.core.runtime.CoreException
It is used to handle instrument generator stuff for user selected analysis types. This method will be shared by JVMPI and JVMTI Instrument Collector

Parameters:
configuration - The launch configuration
Returns:
The save copy of ILaunchConfiguration
Throws:
org.eclipse.core.runtime.CoreException

getAllSelectedAnalysisIds

public static java.lang.String[] getAllSelectedAnalysisIds(org.eclipse.debug.core.ILaunchConfiguration launchConfiguration)
Returns a string array of the selected analysis ids.

Parameters:
launchConfiguration - The launch configuration
Returns:
an array of analysis ids

getAllSelectedAnalysisIdsAsList

public static java.util.List getAllSelectedAnalysisIdsAsList(org.eclipse.debug.core.ILaunchConfiguration launchConfiguration)
Returns a list of the selected analysis ids.

Parameters:
launchConfiguration - The launch configuration
Returns:
a list of analysis ids

configureProcess

public static InstrumentProcessListener configureProcess(Process process,
                                                         org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy,
                                                         org.eclipse.debug.core.ILaunchConfiguration conf,
                                                         InstrumentAgentDiscoverer instrumentAgentDiscoverer)
                                                  throws org.eclipse.core.runtime.CoreException
Configures the current process and adds a process listener.

Throws:
org.eclipse.core.runtime.CoreException

createAgent

public static Agent createAgent(org.eclipse.debug.core.ILaunchConfiguration conf,
                                Process process,
                                org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy,
                                java.lang.String agentName,
                                java.lang.String agentType,
                                java.lang.String profileFile,
                                InstrumentProcessListener listener,
                                InstrumentAgentDiscoverer discoverer)
                         throws org.eclipse.core.runtime.CoreException
Create a new agent instance with the specified name and type.

Throws:
org.eclipse.core.runtime.CoreException

getProcessParameter

public static org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters getProcessParameter(org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters processParameters,
                                                                                                   org.eclipse.debug.core.ILaunchConfiguration conf)
Returns the ProcessParameters.


getServerProcessParameter

public static org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters getServerProcessParameter(org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters processParameters,
                                                                                                         org.eclipse.debug.core.ILaunchConfiguration conf)
Returns the ProcessParameters for the profile on server.


removeInstrumentJar

public static void removeInstrumentJar(java.lang.Object process)
Removes the temp jar file from the instrument jar map.

Parameters:
process - the process

addVmArguments

public static java.util.ArrayList addVmArguments(org.eclipse.debug.core.ILaunchConfiguration conf)
Add the vm arguments.


addProfileFiles

public static void addProfileFiles(InstrumentProcessListener listener,
                                   org.eclipse.debug.core.ILaunchConfiguration conf)
                            throws org.eclipse.core.runtime.CoreException
Adds the probe files to the listener.

Throws:
org.eclipse.core.runtime.CoreException

getAspectClasspath

public static java.lang.String getAspectClasspath(java.lang.String existClassPath,
                                                  org.eclipse.debug.core.ILaunchConfiguration conf)
Adds the aspect jars to the classpath.

Returns:
the new aspect classpath

isAspectSelected

public static boolean isAspectSelected(org.eclipse.debug.core.ILaunchConfiguration conf)
Returns true if the aspect library are available and selected type is aspects.

Parameters:
conf -
Returns:

getProbeClassPath

public static java.lang.String getProbeClassPath(java.lang.String existClassPath,
                                                 org.eclipse.debug.core.ILaunchConfiguration conf,
                                                 java.lang.Object process)
Adds the probe temp jar file to the classpath

Parameters:
existClassPath - the current classpath
conf - The launch configuration
Returns:
the modified classpath

isArmAnalysisType

public static boolean isArmAnalysisType(org.eclipse.debug.core.ILaunchConfiguration conf)

createManagementAgent

public static Agent createManagementAgent(org.eclipse.debug.core.ILaunchConfiguration configuration,
                                          Process runningProcess,
                                          org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy)
Create a management agent.

Parameters:
configuration - the launch configuration
runningProcess - the current running process
trcProcessProxy - the proxy process
Returns:
an Agent

TPTP 4.5.0 Platform Project
Internal API Specification