TPTP 4.2.0 Platform Project
Internal API Specification

org.eclipse.hyades.trace.ui.internal.util
Class PDCoreUtil

java.lang.Object
  extended byorg.eclipse.hyades.trace.ui.internal.util.PDCoreUtil

public class PDCoreUtil
extends java.lang.Object


Field Summary
static byte PI_MODE_APPLICATION
           
static byte PI_MODE_CONTROLLED
           
static byte PI_MODE_ENABLED
           
static byte PI_MODE_STANDALONE
           
 
Constructor Summary
PDCoreUtil()
           
 
Method Summary
static void activate(org.eclipse.hyades.models.hierarchy.TRCAgentProxy agentProxy)
           
static void addProcessParameters(Process lprocess, org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters parameters, boolean switchPerspective)
           
static java.util.Vector attach(AttachConfigurationDetail configurationDetail)
           
static java.util.Vector attach(java.lang.String hostName, java.util.Vector agents, java.util.Vector options, java.util.ArrayList filters, java.lang.String selectedProject, java.lang.String selectedMonitor)
          Deprecated. user should call attach(Sting,Vector,String,String) with portNumber specific instead.
static java.util.Vector attach(java.lang.String hostName, java.util.Vector agents, java.util.Vector options, java.util.ArrayList filters, java.lang.String selectedProject, java.lang.String selectedMonitor, java.lang.String portNumber, java.lang.String profileFile, org.eclipse.debug.core.ILaunch launch)
           
static java.util.Vector attach(java.lang.String hostName, java.util.Vector agents, java.util.Vector options, java.util.ArrayList filters, java.lang.String selectedProject, java.lang.String selectedMonitor, java.lang.String portNumber, java.lang.String profileFile, org.eclipse.debug.core.ILaunch launch, boolean switchPerspective)
           
static org.eclipse.hyades.models.hierarchy.TRCAgentProxy attachToAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process, Agent agent)
          Equivalent to attachToAgent (process, agent, null, false)
static org.eclipse.hyades.models.hierarchy.TRCAgentProxy attachToAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process, Agent agent, java.util.Vector options, boolean mayNeedPolling)
          Attach to the agent passed in.
static void copyAgentProperties(org.eclipse.hyades.models.hierarchy.TRCAgentProxy fAgentOld, org.eclipse.hyades.models.hierarchy.TRCAgentProxy fAgent)
           
static Agent createAgent(Process lprocess, java.util.ArrayList filters, java.util.Vector options, org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy)
           
static Agent createAgent(Process lprocess, java.util.ArrayList filters, java.util.Vector options, org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy, java.lang.String agentName, java.lang.String agentType)
           
static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process, Agent a)
           
static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy processProxy, Agent agent, java.lang.String sessionId)
           
protected static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgentNoCheck(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process, Agent agent, java.lang.String sessionId)
           
static org.eclipse.core.resources.IContainer createContainer(org.eclipse.core.runtime.IPath path)
          Insert the method's description here.
static boolean createDirectoryMessage(java.lang.String fDir, org.eclipse.swt.widgets.Shell shell)
           
static org.eclipse.hyades.models.hierarchy.TRCMonitor createMonitor(org.eclipse.core.resources.IContainer res, java.lang.String name)
           
static org.eclipse.hyades.models.hierarchy.TRCNode createNode(org.eclipse.hyades.models.hierarchy.TRCMonitor monitor, java.lang.String name, java.lang.String portNumber)
           
static org.eclipse.hyades.models.hierarchy.TRCProcessProxy createProcess(org.eclipse.hyades.models.hierarchy.TRCNode node, Process pInfo)
           
static org.eclipse.hyades.models.hierarchy.TRCProcessProxy createProcess(org.eclipse.hyades.models.hierarchy.TRCNode node, Process pInfo, boolean isProcessLaunched)
           
static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createUniqueAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy processProxy, Agent agent)
           
static void detachAgent(org.eclipse.hyades.models.hierarchy.TRCAgentProxy agent)
           
static void detachAgents()
           
static void doAttach(Agent agent, org.eclipse.hyades.models.hierarchy.TRCAgentProxy agentProxy)
          Equivalent to doAttach (null, agentProxy, agent, null)
static Agent getAgentInstance(java.lang.String hostName, int portNumber, org.eclipse.hyades.models.hierarchy.TRCAgentProxy trcAgent)
           
static org.eclipse.hyades.models.hierarchy.TRCAgentProxy getCorrespondingAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy processProxy, Agent ag, boolean activeProxy)
           
static java.lang.String getDirectoryName(java.lang.String fName)
           
static java.util.Enumeration getNodeConfiguration(java.lang.String nodeName, int portNumber)
           
static java.util.Enumeration getNodeConfiguration(java.lang.String nodeName, int portNumber, boolean showErrorMsgs)
           
static java.lang.String getPIVMArgument(byte mode)
          Returns the appropriate VM argument that will cause the application to run with the PI agent in the mode that is specified.
static boolean isLocalHost(java.lang.String hostname)
           
static boolean isPathExists(java.lang.String fdir)
           
static boolean isProfilingPerspective()
          Returns true if the currently chosed perspective is the profiling & logging perspective.
static boolean isZipFile(java.io.InputStream readStream)
           
static boolean isZipFile(java.lang.String fileName)
           
static boolean launchTrace(TraceArguments trace, java.util.ArrayList filters, java.util.Vector options, java.lang.String selectedProject, java.lang.String selectedMonitor, org.eclipse.debug.core.ILaunch launch)
          Deprecated. Contributors should avoid using this method. PrimaryLaunchDelegate provides a launch method that uses TPTP's standard for starting one or more profiling/monitoring session.
static boolean launchTrace(TraceArguments trace, java.util.ArrayList filters, java.util.Vector options, java.lang.String selectedProject, java.lang.String selectedMonitor, org.eclipse.debug.core.ILaunch launch, boolean switchPerspective)
          Deprecated. Contributors should avoid using this method. PrimaryLaunchDelegate provides a launch method that uses TPTP's standard for starting one or more profiling/monitoring session.
static void markModifiedResources(org.eclipse.emf.ecore.EObject eObject, boolean modifiedState)
          Sets the modified flag on the Hierarchy resources up to the monitor.
static Node profileConnect(java.lang.String host, java.lang.String port)
           
static Node profileConnect(java.lang.String host, java.lang.String port, boolean showErrorMsgs)
           
static void setAgentConfiguration(org.eclipse.hyades.models.hierarchy.TRCAgentProxy agent, Agent a)
           
static void setEnvironmentVariable(Process process, java.lang.String[] envVariables, PIProcessListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PI_MODE_CONTROLLED

public static final byte PI_MODE_CONTROLLED
See Also:
Constant Field Values

PI_MODE_APPLICATION

public static final byte PI_MODE_APPLICATION
See Also:
Constant Field Values

PI_MODE_STANDALONE

public static final byte PI_MODE_STANDALONE
See Also:
Constant Field Values

PI_MODE_ENABLED

public static final byte PI_MODE_ENABLED
See Also:
Constant Field Values
Constructor Detail

PDCoreUtil

public PDCoreUtil()
Method Detail

attach

public static final java.util.Vector attach(java.lang.String hostName,
                                            java.util.Vector agents,
                                            java.util.Vector options,
                                            java.util.ArrayList filters,
                                            java.lang.String selectedProject,
                                            java.lang.String selectedMonitor)
Deprecated. user should call attach(Sting,Vector,String,String) with portNumber specific instead.

attach to an agent


attach

public static final java.util.Vector attach(java.lang.String hostName,
                                            java.util.Vector agents,
                                            java.util.Vector options,
                                            java.util.ArrayList filters,
                                            java.lang.String selectedProject,
                                            java.lang.String selectedMonitor,
                                            java.lang.String portNumber,
                                            java.lang.String profileFile,
                                            org.eclipse.debug.core.ILaunch launch)

attach

public static final java.util.Vector attach(java.lang.String hostName,
                                            java.util.Vector agents,
                                            java.util.Vector options,
                                            java.util.ArrayList filters,
                                            java.lang.String selectedProject,
                                            java.lang.String selectedMonitor,
                                            java.lang.String portNumber,
                                            java.lang.String profileFile,
                                            org.eclipse.debug.core.ILaunch launch,
                                            boolean switchPerspective)

attach

public static final java.util.Vector attach(AttachConfigurationDetail configurationDetail)

attachToAgent

public static org.eclipse.hyades.models.hierarchy.TRCAgentProxy attachToAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process,
                                                                              Agent agent)
                                                                       throws InactiveAgentException,
                                                                              InactiveProcessException
Equivalent to attachToAgent (process, agent, null, false)

Throws:
InactiveAgentException
InactiveProcessException

attachToAgent

public static org.eclipse.hyades.models.hierarchy.TRCAgentProxy attachToAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process,
                                                                              Agent agent,
                                                                              java.util.Vector options,
                                                                              boolean mayNeedPolling)
                                                                       throws InactiveAgentException,
                                                                              InactiveProcessException
Attach to the agent passed in.

Parameters:
process - The model entity representing the process
agent - The agent to attach to
options - The options set for this attach session (can be null if 'mayNeedPolling' is set to false)
mayNeedPolling - Indicates whether polling may be needed. Regular polling is required for the aggregated JVMPI agent.
Returns:
The model entity representing the agent
Throws:
InactiveAgentException
InactiveProcessException

activate

public static void activate(org.eclipse.hyades.models.hierarchy.TRCAgentProxy agentProxy)

detachAgent

public static final void detachAgent(org.eclipse.hyades.models.hierarchy.TRCAgentProxy agent)
                              throws InactiveAgentException,
                                     InactiveProcessException
Throws:
InactiveAgentException
InactiveProcessException

createAgent

public static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process,
                                                                            Agent a)

getCorrespondingAgent

public static org.eclipse.hyades.models.hierarchy.TRCAgentProxy getCorrespondingAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy processProxy,
                                                                                      Agent ag,
                                                                                      boolean activeProxy)

createAgent

public static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy processProxy,
                                                                            Agent agent,
                                                                            java.lang.String sessionId)

createContainer

public static final org.eclipse.core.resources.IContainer createContainer(org.eclipse.core.runtime.IPath path)
Insert the method's description here. Creation date: (10/05/2000 10:03:14 AM)

Parameters:
path - org.eclipse.core.resources.IPath

createMonitor

public static final org.eclipse.hyades.models.hierarchy.TRCMonitor createMonitor(org.eclipse.core.resources.IContainer res,
                                                                                 java.lang.String name)

createNode

public static final org.eclipse.hyades.models.hierarchy.TRCNode createNode(org.eclipse.hyades.models.hierarchy.TRCMonitor monitor,
                                                                           java.lang.String name,
                                                                           java.lang.String portNumber)

createProcess

public static org.eclipse.hyades.models.hierarchy.TRCProcessProxy createProcess(org.eclipse.hyades.models.hierarchy.TRCNode node,
                                                                                Process pInfo,
                                                                                boolean isProcessLaunched)

createProcess

public static org.eclipse.hyades.models.hierarchy.TRCProcessProxy createProcess(org.eclipse.hyades.models.hierarchy.TRCNode node,
                                                                                Process pInfo)

detachAgents

public static void detachAgents()

doAttach

public static void doAttach(Agent agent,
                            org.eclipse.hyades.models.hierarchy.TRCAgentProxy agentProxy)
                     throws InactiveAgentException,
                            InactiveProcessException
Equivalent to doAttach (null, agentProxy, agent, null)

Throws:
InactiveAgentException
InactiveProcessException

addProcessParameters

public static void addProcessParameters(Process lprocess,
                                        org.eclipse.tptp.trace.ui.provisional.launcher.ProcessParameters parameters,
                                        boolean switchPerspective)
                                 throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getPIVMArgument

public static java.lang.String getPIVMArgument(byte mode)
Returns the appropriate VM argument that will cause the application to run with the PI agent in the mode that is specified.

Parameters:
mode - The mode that the PI agent should run in. See PI_MODE_* constants.

createAgent

public static Agent createAgent(Process lprocess,
                                java.util.ArrayList filters,
                                java.util.Vector options,
                                org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy,
                                java.lang.String agentName,
                                java.lang.String agentType)

createAgent

public static Agent createAgent(Process lprocess,
                                java.util.ArrayList filters,
                                java.util.Vector options,
                                org.eclipse.hyades.models.hierarchy.TRCProcessProxy trcProcessProxy)

launchTrace

public static final boolean launchTrace(TraceArguments trace,
                                        java.util.ArrayList filters,
                                        java.util.Vector options,
                                        java.lang.String selectedProject,
                                        java.lang.String selectedMonitor,
                                        org.eclipse.debug.core.ILaunch launch)
Deprecated. Contributors should avoid using this method. PrimaryLaunchDelegate provides a launch method that uses TPTP's standard for starting one or more profiling/monitoring session.


launchTrace

public static final boolean launchTrace(TraceArguments trace,
                                        java.util.ArrayList filters,
                                        java.util.Vector options,
                                        java.lang.String selectedProject,
                                        java.lang.String selectedMonitor,
                                        org.eclipse.debug.core.ILaunch launch,
                                        boolean switchPerspective)
Deprecated. Contributors should avoid using this method. PrimaryLaunchDelegate provides a launch method that uses TPTP's standard for starting one or more profiling/monitoring session.


setAgentConfiguration

public static void setAgentConfiguration(org.eclipse.hyades.models.hierarchy.TRCAgentProxy agent,
                                         Agent a)

getDirectoryName

public static java.lang.String getDirectoryName(java.lang.String fName)

getNodeConfiguration

public static java.util.Enumeration getNodeConfiguration(java.lang.String nodeName,
                                                         int portNumber,
                                                         boolean showErrorMsgs)

getAgentInstance

public static Agent getAgentInstance(java.lang.String hostName,
                                     int portNumber,
                                     org.eclipse.hyades.models.hierarchy.TRCAgentProxy trcAgent)

getNodeConfiguration

public static java.util.Enumeration getNodeConfiguration(java.lang.String nodeName,
                                                         int portNumber)

isPathExists

public static boolean isPathExists(java.lang.String fdir)

isZipFile

public static boolean isZipFile(java.io.InputStream readStream)
                         throws java.io.IOException
Throws:
java.io.IOException

isZipFile

public static boolean isZipFile(java.lang.String fileName)
                         throws java.io.IOException
Throws:
java.io.IOException

createDirectoryMessage

public static boolean createDirectoryMessage(java.lang.String fDir,
                                             org.eclipse.swt.widgets.Shell shell)

createUniqueAgent

public static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createUniqueAgent(org.eclipse.hyades.models.hierarchy.TRCProcessProxy processProxy,
                                                                                  Agent agent)

profileConnect

public static Node profileConnect(java.lang.String host,
                                  java.lang.String port,
                                  boolean showErrorMsgs)

profileConnect

public static Node profileConnect(java.lang.String host,
                                  java.lang.String port)

createAgentNoCheck

protected static org.eclipse.hyades.models.hierarchy.TRCAgentProxy createAgentNoCheck(org.eclipse.hyades.models.hierarchy.TRCProcessProxy process,
                                                                                      Agent agent,
                                                                                      java.lang.String sessionId)

markModifiedResources

public static void markModifiedResources(org.eclipse.emf.ecore.EObject eObject,
                                         boolean modifiedState)
Sets the modified flag on the Hierarchy resources up to the monitor.


setEnvironmentVariable

public static void setEnvironmentVariable(Process process,
                                          java.lang.String[] envVariables,
                                          PIProcessListener listener)

copyAgentProperties

public static void copyAgentProperties(org.eclipse.hyades.models.hierarchy.TRCAgentProxy fAgentOld,
                                       org.eclipse.hyades.models.hierarchy.TRCAgentProxy fAgent)

isProfilingPerspective

public static boolean isProfilingPerspective()
Returns true if the currently chosed perspective is the profiling & logging perspective.


isLocalHost

public static boolean isLocalHost(java.lang.String hostname)

TPTP 4.2.0 Platform Project
Internal API Specification