|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.mwe.internal.core.debug.processing.DebugMonitor
public class DebugMonitor
The heart of the debug process on the runtime side. It has callback methods that are called by the syntax element
implementations before and after a process step.
It works closely together with handlers and adapters that must be registered at startup.
Field Summary |
---|
Fields inherited from interface org.eclipse.emf.mwe.core.monitor.ProgressMonitor |
---|
UNKNOWN |
Constructor Summary | |
---|---|
DebugMonitor()
|
Method Summary | |
---|---|
void |
addAdapter(ElementAdapter adapter)
|
void |
addEventHandler(EventHandler handler)
|
void |
addProcessHandler(ProcessHandler handler)
|
void |
beginTask(java.lang.String name,
int totalWork)
Notifies that the main task is beginning. |
void |
clearBlocked()
|
void |
done()
Notifies that the work is done; that is, either the main task is completed or the user canceled it. |
void |
finished(java.lang.Object element,
java.lang.Object context)
fire the finish events to the registered event handlers |
ElementAdapter |
getAdapter(java.lang.Object element)
|
void |
init(int port)
|
void |
init(java.lang.String[] args)
open the connection to a debug server framework (e.g. |
void |
internalWorked(double work)
Internal method to handle scaling correctly. |
boolean |
isCanceled()
Returns whether cancelation of current operation has been requested. |
void |
postTask(java.lang.Object element,
java.lang.Object context)
inform the handlers about the finalization of a process step. In case the process may suspend at the end of a syntax element it does so if requested. |
void |
preTask(java.lang.Object element,
java.lang.Object context)
the main method to manipulate the runtime process for debugging. In case a suspension is requested it stops the process and waits for the next user command. |
void |
setBlocked(org.eclipse.emf.common.util.Diagnostic reason)
|
void |
setCanceled(boolean value)
Sets the cancel state to the given value. |
void |
setCommandListener(CommandListener commandListener)
|
void |
setTaskName(java.lang.String name)
Sets the task name to the given value. |
void |
started(java.lang.Object element,
java.lang.Object context)
fire the STARTED event to the registered event handlers |
void |
subTask(java.lang.String name)
Notifies that a subtask of the main task is beginning. |
void |
uninit()
Closes the connection. |
void |
worked(int work)
Notifies that a given number of work unit of the main task has been completed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DebugMonitor()
Method Detail |
---|
public void init(java.lang.String[] args) throws java.io.IOException
args
- arg[1] must be the port to be connected with
java.io.IOException
public void init(int port) throws java.io.IOException
java.io.IOException
public void uninit()
public void setCommandListener(CommandListener commandListener)
public void addProcessHandler(ProcessHandler handler)
public void addEventHandler(EventHandler handler)
public void addAdapter(ElementAdapter adapter)
public ElementAdapter getAdapter(java.lang.Object element)
public void started(java.lang.Object element, java.lang.Object context)
started
in interface ProgressMonitor
element
- The element that fired that notificationcontext
- the context of executionProgressMonitor.started(java.lang.Object, java.lang.Object)
public void preTask(java.lang.Object element, java.lang.Object context)
preTask
in interface ProgressMonitor
element
- The element that fired that notificationcontext
- the context of executionProgressMonitor.preTask(java.lang.Object, java.lang.Object)
public void postTask(java.lang.Object element, java.lang.Object context)
postTask
in interface ProgressMonitor
element
- The element that fired that notificationcontext
- the context of executionProgressMonitor.postTask(java.lang.Object, java.lang.Object)
public void finished(java.lang.Object element, java.lang.Object context)
finished
in interface ProgressMonitor
element
- The element that fired that notificationcontext
- the context of executionProgressMonitor.finished(java.lang.Object, java.lang.Object)
public void beginTask(java.lang.String name, int totalWork)
ProgressMonitor
beginTask
in interface ProgressMonitor
name
- the name (or description) of the main tasktotalWork
- the total number of work units into which the main task is
been subdivided. If the value is UNKNOWN
the
implemenation is free to indicate progress in a way which
doesn't require the total number of work units in advance.public void done()
ProgressMonitor
done
in interface ProgressMonitor
public void internalWorked(double work)
ProgressMonitor
internalWorked
in interface ProgressMonitor
work
- the amount of work donepublic boolean isCanceled()
ProgressMonitor
isCanceled
in interface ProgressMonitor
true
if cancellation has been requested, and
false
otherwiseProgressMonitor.setCanceled(boolean)
public void setCanceled(boolean value)
ProgressMonitor
setCanceled
in interface ProgressMonitor
value
- true
indicates that cancelation has been
requested (but not necessarily acknowledged);
false
clears this flagProgressMonitor.isCanceled()
public void setTaskName(java.lang.String name)
ProgressMonitor
setTaskName
in interface ProgressMonitor
name
- the name (or description) of the main taskProgressMonitor.beginTask(java.lang.String, int)
public void subTask(java.lang.String name)
ProgressMonitor
subTask
in interface ProgressMonitor
name
- the name (or description) of the subtaskpublic void worked(int work)
ProgressMonitor
worked
in interface ProgressMonitor
work
- the number of work units just completedpublic void clearBlocked()
public void setBlocked(org.eclipse.emf.common.util.Diagnostic reason)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |