Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2006-10-12 16:26:00 +0000
committerDarin Wright2006-10-12 16:26:00 +0000
commitd415365d072606d6577583e840c81dfdd7c6a94b (patch)
treed3cd278fd879167466ae719464dca0ca47531994
parentd75319997cd91898773271c11314c26663bb48ab (diff)
downloadeclipse.platform.debug-d415365d072606d6577583e840c81dfdd7c6a94b.tar.gz
eclipse.platform.debug-d415365d072606d6577583e840c81dfdd7c6a94b.tar.xz
eclipse.platform.debug-d415365d072606d6577583e840c81dfdd7c6a94b.zip
cancel variable updates when thread resumes
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java13
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchContentProvider.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchManagerContentProvider.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameContentProvider.java11
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ThreadContentProvider.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableContentProvider.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java5
10 files changed, 37 insertions, 24 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java
index 1d47ed3b0..1ae6c63de 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java
@@ -11,6 +11,7 @@
package org.eclipse.debug.internal.ui.model.elements;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.ui.IDebugUIConstants;
@@ -23,7 +24,7 @@ public class DebugTargetContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected int getChildCount(Object element, IPresentationContext context) throws CoreException {
+ protected int getChildCount(Object element, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return ((IDebugTarget)element).getThreads().length;
}
@@ -37,7 +38,7 @@ public class DebugTargetContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context) throws CoreException {
+ protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return getElements(((IDebugTarget)parent).getThreads(), index, length);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java
index d83d1f2c6..4497a315a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java
@@ -73,8 +73,8 @@ public abstract class ElementContentProvider implements IElementContentProvider
IPresentationContext context = update.getPresentationContext();
if (supportsContext(context)) {
int offset = update.getOffset();
- Object[] children = getChildren(update.getParent(), offset, update.getLength(), context);
- if (children != null) {
+ Object[] children = getChildren(update.getParent(), offset, update.getLength(), context, update);
+ if (!update.isCanceled() && children != null) {
for (int i = 0; i < children.length; i++) {
update.setChild(children[i], offset + i);
}
@@ -104,7 +104,10 @@ public abstract class ElementContentProvider implements IElementContentProvider
if (supportsContext(context)) {
for (int i = 0; i < parents.length; i++) {
Object parent = parents[i];
- update.setChildCount(parent, getChildCount(parent, context));
+ int childCount = getChildCount(parent, context, update);
+ if (!update.isCanceled()) {
+ update.setChildCount(parent, childCount);
+ }
}
} else {
for (int i = 0; i < parents.length; i++) {
@@ -131,7 +134,7 @@ public abstract class ElementContentProvider implements IElementContentProvider
* @return child or <code>null</code>
* @throws CoreException if an exception occurs retrieving child
*/
- protected abstract Object[] getChildren(Object parent, int index, int length, IPresentationContext context) throws CoreException;
+ protected abstract Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IProgressMonitor monitor) throws CoreException;
/**
* Returns the number of children for the given element.
@@ -141,7 +144,7 @@ public abstract class ElementContentProvider implements IElementContentProvider
* @return number of children
* @throws CoreException if an exception occurs determining child count
*/
- protected abstract int getChildCount(Object element, IPresentationContext context) throws CoreException;
+ protected abstract int getChildCount(Object element, IPresentationContext context, IProgressMonitor monitor) throws CoreException;
/**
* Returns whether this adapter supports the given context.
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java
index b5b83ad4d..a4b4cd962 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java
@@ -11,6 +11,7 @@
package org.eclipse.debug.internal.ui.model.elements;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.IExpressionManager;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.ui.IDebugUIConstants;
@@ -23,14 +24,14 @@ public class ExpressionManagerContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected int getChildCount(Object element, IPresentationContext context) throws CoreException {
+ protected int getChildCount(Object element, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return ((IExpressionManager) element).getExpressions().length;
}
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context) throws CoreException {
+ protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return ((IExpressionManager) parent).getExpressions();
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchContentProvider.java
index c23834166..2e00a6679 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchContentProvider.java
@@ -11,6 +11,7 @@
package org.eclipse.debug.internal.ui.model.elements;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.ui.IDebugUIConstants;
@@ -23,7 +24,7 @@ public class LaunchContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected int getChildCount(Object element, IPresentationContext context) throws CoreException {
+ protected int getChildCount(Object element, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return ((ILaunch)element).getChildren().length;
}
@@ -37,7 +38,7 @@ public class LaunchContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context) throws CoreException {
+ protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return getElements(((ILaunch)parent).getChildren(), index, length);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchManagerContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchManagerContentProvider.java
index 611a4406a..6114958a6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchManagerContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchManagerContentProvider.java
@@ -11,6 +11,7 @@
package org.eclipse.debug.internal.ui.model.elements;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.ui.IDebugUIConstants;
@@ -23,7 +24,7 @@ public class LaunchManagerContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected int getChildCount(Object element, IPresentationContext context) throws CoreException {
+ protected int getChildCount(Object element, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return ((ILaunchManager)element).getLaunches().length;
}
@@ -37,7 +38,7 @@ public class LaunchManagerContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context) throws CoreException {
+ protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return getElements(((ILaunchManager)parent).getLaunches(),index, length);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameContentProvider.java
index c88a2c75d..5b33632ad 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameContentProvider.java
@@ -11,6 +11,7 @@
package org.eclipse.debug.internal.ui.model.elements;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.model.IStackFrame;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.ui.IDebugUIConstants;
@@ -23,18 +24,18 @@ public class StackFrameContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected int getChildCount(Object element, IPresentationContext context) throws CoreException {
- return getAllChildren(element, context).length;
+ protected int getChildCount(Object element, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
+ return getAllChildren(element, context, monitor).length;
}
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context) throws CoreException {
- return getElements(getAllChildren(parent, context), index, length);
+ protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
+ return getElements(getAllChildren(parent, context, monitor), index, length);
}
- protected Object[] getAllChildren(Object parent, IPresentationContext context) throws CoreException {
+ protected Object[] getAllChildren(Object parent, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
String id = context.getId();
IStackFrame frame = (IStackFrame) parent;
if (id.equals(IDebugUIConstants.ID_VARIABLE_VIEW)) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ThreadContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ThreadContentProvider.java
index 5f620ec3b..31456dc58 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ThreadContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ThreadContentProvider.java
@@ -11,6 +11,7 @@
package org.eclipse.debug.internal.ui.model.elements;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.model.IThread;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.ui.IDebugUIConstants;
@@ -23,7 +24,7 @@ public class ThreadContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected int getChildCount(Object element, IPresentationContext context) throws CoreException {
+ protected int getChildCount(Object element, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return ((IThread)element).getStackFrames().length;
}
@@ -37,7 +38,7 @@ public class ThreadContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context) throws CoreException {
+ protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return getElements(((IThread)parent).getStackFrames(), index, length);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableContentProvider.java
index 167dd3f6d..6fadbe3d1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableContentProvider.java
@@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILogicalStructureType;
@@ -34,14 +35,14 @@ public class VariableContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected int getChildCount(Object element, IPresentationContext context) throws CoreException {
+ protected int getChildCount(Object element, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return getAllChildren(element, context).length;
}
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context) throws CoreException {
+ protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return getElements(getAllChildren(parent, context), index, length);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java
index a31ff69e6..26b4d9783 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java
@@ -1667,6 +1667,8 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
IStatus status = update.getStatus();
if (status != null && !(status.getCode() == IStatus.OK || status.getCode() == IStatus.CANCEL)) {
showMessage(status.getMessage());
+ } else {
+ showViewer();
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java
index 1d7e1e955..87b7f99f2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java
@@ -14,6 +14,7 @@ package org.eclipse.debug.ui;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.model.IExpression;
@@ -179,13 +180,13 @@ public class InspectPopupDialog extends DebugPopup {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected int getChildCount(Object element, IPresentationContext context) throws CoreException {
+ protected int getChildCount(Object element, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return 1;
}
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
- protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context) throws CoreException {
+ protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IProgressMonitor monitor) throws CoreException {
return new Object[] { fExpression };
}

Back to the top