From 57943f1c5d7f52270232806d3bbceb5f5597cdb4 Mon Sep 17 00:00:00 2001 From: John Cortell Date: Wed, 23 Sep 2009 03:38:30 +0000 Subject: [PATCH] Improved description of checkUpdate() --- .../cdt/dsf/ui/viewmodel/AbstractVMNode.java | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMNode.java index 2355f37f86f..3b45de739c9 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMNode.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMNode.java @@ -61,10 +61,24 @@ abstract public class AbstractVMNode implements IVMNode { protected boolean isDisposed() { return fDisposed; } - - /** - * Convenience method that returns a token value in case when the services - * that the layout node depends on, are not available. + + /** + * Checks whether there are any fundamental roadblocks which will prevent + * this request from being serviced. The base implementation simply checks + * to see if the request has been canceled or if this node has been + * disposed. Subclasses should override this if it can do additional checks, + * for example check that needed services are still available. Overrides + * should probably call the base implementation first; if the base + * determines the request is a no-go, there's no point in the subclass doing + * any further checking. + * + *

+ * If a roadblock is found, the implementation should give the update + * request some appropriate default result (if applicable) and call its + * done method. + * + * @param update the update request + * @return false if a roadblock is found, otherwise true */ protected boolean checkUpdate(IViewerUpdate update) { if (update.isCanceled()) {