Skip to content

Commit 893349b

Browse files
laeubijukzi
authored andcommitted
Add some javadoc about how to send events and its importance
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.
1 parent ce4a915 commit 893349b

File tree

1 file changed

+21
-8
lines changed
  • debug/org.eclipse.debug.core/core/org/eclipse/debug/core/model

1 file changed

+21
-8
lines changed

debug/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IProcess.java

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,29 @@
2020
import org.eclipse.debug.core.ILaunch;
2121

2222
/**
23-
* A process represents a program running in normal (non-debug) mode.
24-
* Processes support setting and getting of client defined attributes.
25-
* This way, clients can annotate a process with any extra information
26-
* important to them. For example, classpath annotations, or command
27-
* line arguments used to launch the process may be important to a client.
23+
* A process represents a program running in normal (non-debug) mode. Processes
24+
* support setting and getting of client defined attributes. This way, clients
25+
* can annotate a process with any extra information important to them. For
26+
* example, classpath annotations, or command line arguments used to launch the
27+
* process may be important to a client.
2828
* <p>
29-
* Clients may implement this interface, however, the debug plug-in
30-
* provides an implementation of this interface for a
31-
* <code>java.lang.Process</code>.
29+
* Clients may implement this interface, however, the debug plug-in provides an
30+
* implementation of this interface for a <code>java.lang.Process</code>.
3231
* </p>
32+
*
33+
* If implementing custom launches it is important to fire event whenever the
34+
* process state changes in the following way:
35+
*
36+
* <pre>
37+
* DebugPlugin manager = DebugPlugin.getDefault();
38+
* if (manager != null) {
39+
* manager.fireDebugEventSet(new DebugEvent[] {
40+
* new DebugEvent(this, DebugEvent.CREATE) });
41+
* }
42+
* </pre>
43+
*
44+
* otherwise the UI will probably show faulty state for your process and launch.
45+
*
3346
* @see org.eclipse.debug.core.DebugPlugin#newProcess(ILaunch, Process, String)
3447
*/
3548
public interface IProcess extends IAdaptable, ITerminate {

0 commit comments

Comments
 (0)