diff options
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousRequestMonitor.java')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousRequestMonitor.java | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousRequestMonitor.java index 92071d2ac..9aa6a64fa 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousRequestMonitor.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousRequestMonitor.java @@ -26,22 +26,22 @@ import org.eclipse.ui.progress.WorkbenchJob; * @since 3.2 */ public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor { - + /** * Model node the update is rooted at */ private ModelNode fNode; - + /** * Model the update is being performed for */ private AsynchronousModel fModel; - + /** * Whether this request's 'done' method has been called. */ private boolean fDone = false; - + protected WorkbenchJob fViewerUpdateJob = new WorkbenchJob("Asynchronous viewer update") { //$NON-NLS-1$ @Override public IStatus runInUIThread(IProgressMonitor monitor) { @@ -64,10 +64,10 @@ public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor return Status.OK_STATUS; } }; - + /** * Constructs an update rooted at the given item. - * + * * @param node model node * @param model model the node is in */ @@ -78,39 +78,39 @@ public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor fViewerUpdateJob.setRule(getUpdateSchedulingRule()); fViewerUpdateJob.setSystem(true); } - + /** * Returns the scheduling rule for viewer update job. - * + * * @return rule or <code>null</code> */ protected ISchedulingRule getUpdateSchedulingRule() { return AsynchronousSchedulingRuleFactory.getDefault().newSerialPerObjectRule(getModel().getViewer()); } - + /** * Returns the model this update is being performed for - * + * * @return the model this update is being performed for */ protected AsynchronousModel getModel() { return fModel; } - + /** * Returns the model node this update is rooted at - * + * * @return the model node this update is rooted at */ protected ModelNode getNode() { return fNode; } - + /** * Returns whether this update contains the given node. * That is, whether this update is for the same node or a child of * the given node. - * + * * @param node node to test containment on * @return whether this update contains the given node */ @@ -127,7 +127,7 @@ public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor } return false; } - + /* (non-Javadoc) * @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean) @@ -139,7 +139,7 @@ public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor getModel().requestCanceled(this); } } - + /* (non-Javadoc) * @see org.eclipse.core.runtime.IProgressMonitor#done() */ @@ -150,10 +150,10 @@ public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor } scheduleViewerUpdate(0L); } - + /** * Returns whether this request is done yet. - * + * * @return if the request is done */ protected synchronized boolean isDone() { @@ -161,23 +161,23 @@ public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor } protected void scheduleViewerUpdate(long ms) { - if(!isCanceled()) + if(!isCanceled()) fViewerUpdateJob.schedule(ms); } - + /** * Notification this update has been completed and should now be applied to * this update's viewer. This method is called in the UI thread. */ protected abstract void performUpdate(); - + /** * Returns whether this update effectively contains the given update. * That is, whether this update will also perform the given update. - * + * * @param update update to compare to * @return whether this update will also perform the given update */ protected abstract boolean contains(AsynchronousRequestMonitor update); - + } |