Skip to content

Commit

Permalink
Add some javadoc about how to send events and its importance
Browse files Browse the repository at this point in the history
Currently the IProcess does not really give a clue on how to handle
changing state of a process.

This adds at least a tiny little note about importance of sending events
as otherwise the UI is completely messed up.
  • Loading branch information
laeubi authored and jukzi committed Mar 8, 2024
1 parent ce4a915 commit 893349b
Showing 1 changed file with 21 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,29 @@
import org.eclipse.debug.core.ILaunch;

/**
* A process represents a program running in normal (non-debug) mode.
* Processes support setting and getting of client defined attributes.
* This way, clients can annotate a process with any extra information
* important to them. For example, classpath annotations, or command
* line arguments used to launch the process may be important to a client.
* A process represents a program running in normal (non-debug) mode. Processes
* support setting and getting of client defined attributes. This way, clients
* can annotate a process with any extra information important to them. For
* example, classpath annotations, or command line arguments used to launch the
* process may be important to a client.
* <p>
* Clients may implement this interface, however, the debug plug-in
* provides an implementation of this interface for a
* <code>java.lang.Process</code>.
* Clients may implement this interface, however, the debug plug-in provides an
* implementation of this interface for a <code>java.lang.Process</code>.
* </p>
*
* If implementing custom launches it is important to fire event whenever the
* process state changes in the following way:
*
* <pre>
* DebugPlugin manager = DebugPlugin.getDefault();
* if (manager != null) {
* manager.fireDebugEventSet(new DebugEvent[] {
* new DebugEvent(this, DebugEvent.CREATE) });
* }
* </pre>
*
* otherwise the UI will probably show faulty state for your process and launch.
*
* @see org.eclipse.debug.core.DebugPlugin#newProcess(ILaunch, Process, String)
*/
public interface IProcess extends IAdaptable, ITerminate {
Expand Down

0 comments on commit 893349b

Please sign in to comment.