TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.instrumentation.ui.internal.launcher
Class ACProcessToDebugProcessAdapter

java.lang.Object
  extended by org.eclipse.hyades.trace.ui.internal.util.ProcessAdapter
      extended by org.eclipse.tptp.platform.instrumentation.ui.internal.launcher.ACProcessToDebugProcessAdapter
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.debug.core.model.IProcess, org.eclipse.debug.core.model.ITerminate

public class ACProcessToDebugProcessAdapter
extends ProcessAdapter

This class provides an adapter from AC IProcess (TPTP) to the debug IProcess (Debug). It's primary purpose is to capture the process' output stream and display it in the console view. This is an almost identical clone of org.eclipse.hyades.trace.ui.internal.util.ProcessAdapter. These two classes need to eventually be merged to provide one adapter for the Process (old execution framework) and the IProcess (new execution framework) objects.


Field Summary
protected  int launchMode
          The launch mode
 
Fields inherited from interface org.eclipse.debug.core.model.IProcess
ATTR_CMDLINE, ATTR_PROCESS_LABEL, ATTR_PROCESS_TYPE
 
Constructor Summary
ACProcessToDebugProcessAdapter(org.eclipse.debug.core.ILaunch launch, org.eclipse.tptp.platform.execution.client.core.IProcess process, int launchMode, boolean isAlive)
          Constructor
 
Method Summary
 boolean canTerminate()
           
 java.lang.Object getAdapter(java.lang.Class adapter)
           
 java.lang.String getAttribute(java.lang.String key)
           
 int getExitValue()
           
 java.lang.String getLabel()
           
 org.eclipse.debug.core.ILaunch getLaunch()
           
 int getLaunchMode()
          Return the launch mode of the launch
 org.eclipse.debug.core.model.IStreamsProxy getStreamsProxy()
           
 boolean isTerminated()
           
 void setAttribute(java.lang.String key, java.lang.String value)
           
 void setLaunchMode(int launchMode)
          Set the launch mode of the launch
 void terminate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

launchMode

protected int launchMode
The launch mode

Constructor Detail

ACProcessToDebugProcessAdapter

public ACProcessToDebugProcessAdapter(org.eclipse.debug.core.ILaunch launch,
                                      org.eclipse.tptp.platform.execution.client.core.IProcess process,
                                      int launchMode,
                                      boolean isAlive)
Constructor

Parameters:
launch - The launch
process - The AC process
launchMode - The launch mode.
Method Detail

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Overrides:
getAdapter in class ProcessAdapter
See Also:
IAdaptable#getAdapter()

getAttribute

public java.lang.String getAttribute(java.lang.String key)
Specified by:
getAttribute in interface org.eclipse.debug.core.model.IProcess
Overrides:
getAttribute in class ProcessAdapter
See Also:
IProcess#getAttribute()

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.String value)
Specified by:
setAttribute in interface org.eclipse.debug.core.model.IProcess
Overrides:
setAttribute in class ProcessAdapter
See Also:
IProcess#setAttribute()

getExitValue

public int getExitValue()
                 throws org.eclipse.debug.core.DebugException
Specified by:
getExitValue in interface org.eclipse.debug.core.model.IProcess
Overrides:
getExitValue in class ProcessAdapter
Throws:
org.eclipse.debug.core.DebugException
See Also:
IProcess#getExitValue()

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface org.eclipse.debug.core.model.IProcess
Overrides:
getLabel in class ProcessAdapter
See Also:
IProcess#getLabel()

getLaunch

public org.eclipse.debug.core.ILaunch getLaunch()
Specified by:
getLaunch in interface org.eclipse.debug.core.model.IProcess
Overrides:
getLaunch in class ProcessAdapter
See Also:
IProcess#getLaunch()

getStreamsProxy

public org.eclipse.debug.core.model.IStreamsProxy getStreamsProxy()
Specified by:
getStreamsProxy in interface org.eclipse.debug.core.model.IProcess
Overrides:
getStreamsProxy in class ProcessAdapter
See Also:
IProcess#getStreamsProxy()

canTerminate

public boolean canTerminate()
Specified by:
canTerminate in interface org.eclipse.debug.core.model.ITerminate
Overrides:
canTerminate in class ProcessAdapter
See Also:
ITerminate#canTerminate()

isTerminated

public boolean isTerminated()
Specified by:
isTerminated in interface org.eclipse.debug.core.model.ITerminate
Overrides:
isTerminated in class ProcessAdapter
See Also:
ITerminate#isTerminated()

terminate

public void terminate()
               throws org.eclipse.debug.core.DebugException
Specified by:
terminate in interface org.eclipse.debug.core.model.ITerminate
Overrides:
terminate in class ProcessAdapter
Throws:
org.eclipse.debug.core.DebugException
See Also:
ITerminate#terminate()

getLaunchMode

public int getLaunchMode()
Return the launch mode of the launch

Overrides:
getLaunchMode in class ProcessAdapter
Returns:
The launch mode

setLaunchMode

public void setLaunchMode(int launchMode)
Set the launch mode of the launch

Overrides:
setLaunchMode in class ProcessAdapter
Parameters:
launchMode - The launch mode

TPTP 4.5.0 Platform Project
Internal API Specification