Package de.uni_hildesheim.sse.ui
Class EclipseProgressObserver
- java.lang.Object
-
- net.ssehub.easy.basics.progress.ProgressObserver
-
- de.uni_hildesheim.sse.ui.EclipseProgressObserver
-
public class EclipseProgressObserver extends ProgressObserver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classEclipseProgressObserver.Task-
Nested classes/interfaces inherited from class net.ssehub.easy.basics.progress.ProgressObserver
ProgressObserver.ISubtask, ProgressObserver.ITask
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.core.runtime.IProgressMonitormonitorprivate EclipseProgressObserver.Taskparentprivate java.util.List<EclipseProgressObserver.Task>subtasks-
Fields inherited from class net.ssehub.easy.basics.progress.ProgressObserver
NO_OBSERVER, NO_SUBTASK
-
-
Constructor Summary
Constructors Constructor Description EclipseProgressObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidnotifyEnd(ProgressObserver.ITask task, ProgressObserver.ISubtask subtask)Notifies about ending a (sub)task.voidnotifyProgress(ProgressObserver.ITask task, ProgressObserver.ISubtask subtask, int step, int max)Notifies about processing a task or a subtask.voidnotifyStart(ProgressObserver.ITask task, ProgressObserver.ISubtask subtask, int max)Notifies about starting a (sub)task.voidregister(org.eclipse.core.runtime.IProgressMonitor monitor)ProgressObserver.ISubtaskregisterSubtask(java.lang.String subtask)Registers a subtask to notify about processing progress.ProgressObserver.ITaskregisterTask(java.lang.String task)Registers a task for notify about processing progress.voidunregister(org.eclipse.core.runtime.IProgressMonitor monitor)-
Methods inherited from class net.ssehub.easy.basics.progress.ProgressObserver
notifyEnd, notifyProgress, notifyProgress, notifyProgress, notifyStart
-
-
-
-
Field Detail
-
monitor
private org.eclipse.core.runtime.IProgressMonitor monitor
-
parent
private EclipseProgressObserver.Task parent
-
subtasks
private java.util.List<EclipseProgressObserver.Task> subtasks
-
-
Method Detail
-
register
public void register(org.eclipse.core.runtime.IProgressMonitor monitor)
-
unregister
public void unregister(org.eclipse.core.runtime.IProgressMonitor monitor)
-
registerTask
public ProgressObserver.ITask registerTask(java.lang.String task)
Description copied from class:ProgressObserverRegisters a task for notify about processing progress.- Specified by:
registerTaskin classProgressObserver- Parameters:
task- the name of the task- Returns:
- the task identification
-
registerSubtask
public ProgressObserver.ISubtask registerSubtask(java.lang.String subtask)
Description copied from class:ProgressObserverRegisters a subtask to notify about processing progress.- Specified by:
registerSubtaskin classProgressObserver- Parameters:
subtask- the name of the sub task- Returns:
- the task identification
-
notifyStart
public void notifyStart(ProgressObserver.ITask task, ProgressObserver.ISubtask subtask, int max)
Description copied from class:ProgressObserverNotifies about starting a (sub)task. Subtask notifications shall occur after task notifications, i.e. nested.- Specified by:
notifyStartin classProgressObserver- Parameters:
task- the identification of task to notify about (initially useProgressObserver.registerTask(String)for registering a task)subtask- the subtask (may beProgressObserver.NO_SUBTASK) (initially useProgressObserver.registerSubtask(String)for registering a sub task)max- the intended maximum steps of the subtask
-
notifyProgress
public void notifyProgress(ProgressObserver.ITask task, ProgressObserver.ISubtask subtask, int step, int max)
Description copied from class:ProgressObserverNotifies about processing a task or a subtask.- Specified by:
notifyProgressin classProgressObserver- Parameters:
task- the identification of the task to notify about (initially useProgressObserver.registerTask(String)for registering a task)subtask- the identification of the subtask (may beProgressObserver.NO_SUBTASK, initially useProgressObserver.registerSubtask(String)for registering a sub task)step- the current step in 0<=step<=maxmax- the maximum number of steps, ignored if negative and value from start notification is used instead
-
notifyEnd
public void notifyEnd(ProgressObserver.ITask task, ProgressObserver.ISubtask subtask)
Description copied from class:ProgressObserverNotifies about ending a (sub)task. Subtask notifications shall occur before task notifications, i.e. correctly nested. Use the identifications returned byProgressObserver.registerTask(String)andProgressObserver.registerSubtask(String). This method shall implicitly unregister the given task and/or subtask.- Specified by:
notifyEndin classProgressObserver- Parameters:
task- the identification of the task which ends (initially useProgressObserver.registerTask(String)for registering a task)subtask- the identification of the subtask withtask(may be <ProgressObserver.NO_SUBTASK, if given, only the subtask is supposed to end, initially useProgressObserver.registerSubtask(String)for registering a sub task)
-
-