TPTP 4.6.0 Platform Project
Internal API Specification

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

java.lang.Object
  extended by org.eclipse.hyades.trace.ui.internal.util.ProcessAdapter
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.debug.core.model.IProcess, org.eclipse.debug.core.model.ITerminate
Direct Known Subclasses:
ACProcessToDebugProcessAdapter, ACProcessToDebugProcessAdapter

public class ProcessAdapter
extends java.lang.Object
implements org.eclipse.debug.core.model.IProcess

An adapter from Process(TPTP) to IProcess (Eclipse). Used to add a process to an ILaunch by the launch delegate, in order to provide I/O to the console view, get the process's status (running, terminated), and to terminate the process.


Field Summary
protected  int launchMode
           
 
Fields inherited from interface org.eclipse.debug.core.model.IProcess
ATTR_CMDLINE, ATTR_PROCESS_LABEL, ATTR_PROCESS_TYPE
 
Constructor Summary
ProcessAdapter(org.eclipse.debug.core.ILaunch launch, java.lang.Object process)
           
ProcessAdapter(java.lang.Object process, org.eclipse.debug.core.ILaunch launch, boolean isAlive, int pLaunchMode)
           
ProcessAdapter(Process process, org.eclipse.debug.core.ILaunch launch)
          Creates an adapter using the given Process and ILaunch.
ProcessAdapter(Process process, org.eclipse.debug.core.ILaunch launch, boolean isAlive)
          Creates an adapter using the given Process and ILaunch.
ProcessAdapter(Process process, org.eclipse.debug.core.ILaunch launch, boolean isAlive, int pLaunchMode)
          Creates an adapter using the given Process and ILaunch.
 
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()
           
 org.eclipse.debug.core.model.IStreamsProxy getStreamsProxy()
           
 boolean isTerminated()
           
 void setAttribute(java.lang.String key, java.lang.String value)
           
 void setLaunchMode(int launchMode)
           
 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
Constructor Detail

ProcessAdapter

public ProcessAdapter(Process process,
                      org.eclipse.debug.core.ILaunch launch,
                      boolean isAlive,
                      int pLaunchMode)
Creates an adapter using the given Process and ILaunch. Also sets the whether the process is currently running and its launch mode.


ProcessAdapter

public ProcessAdapter(Process process,
                      org.eclipse.debug.core.ILaunch launch)
Creates an adapter using the given Process and ILaunch.


ProcessAdapter

public ProcessAdapter(org.eclipse.debug.core.ILaunch launch,
                      java.lang.Object process)

ProcessAdapter

public ProcessAdapter(Process process,
                      org.eclipse.debug.core.ILaunch launch,
                      boolean isAlive)
Creates an adapter using the given Process and ILaunch. Also sets the whether the process is currently running.


ProcessAdapter

public ProcessAdapter(java.lang.Object process,
                      org.eclipse.debug.core.ILaunch launch,
                      boolean isAlive,
                      int pLaunchMode)
Method Detail

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
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
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
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
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
See Also:
IProcess.getLabel()

getLaunch

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

getStreamsProxy

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

canTerminate

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

isTerminated

public boolean isTerminated()
Specified by:
isTerminated in interface org.eclipse.debug.core.model.ITerminate
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
Throws:
org.eclipse.debug.core.DebugException
See Also:
ITerminate.terminate()

getLaunchMode

public int getLaunchMode()

setLaunchMode

public void setLaunchMode(int launchMode)

TPTP 4.6.0 Platform Project
Internal API Specification