Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2016-03-18 22:38:59 +0000
committerEugene Tarassov2016-03-18 22:38:59 +0000
commita09b054d4acfd5ea7d09f1a2da9fdae525a5cdff (patch)
tree0ebb7e5a20780f2a5168dfc52631fc3bf119b72c /plugins
parent2c48ebdb7e454b7f776bc156252234a58053b3de (diff)
downloadorg.eclipse.tcf-a09b054d4acfd5ea7d09f1a2da9fdae525a5cdff.tar.gz
org.eclipse.tcf-a09b054d4acfd5ea7d09f1a2da9fdae525a5cdff.tar.xz
org.eclipse.tcf-a09b054d4acfd5ea7d09f1a2da9fdae525a5cdff.zip
TCF Debugger: the Expressions view: fixed: when menu is shown, expression is evaluated even if it is disabled
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/CastToArrayCommand.java8
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ViewMemoryCommand.java4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java6
3 files changed, 14 insertions, 4 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/CastToArrayCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/CastToArrayCommand.java
index f4ffafac8..0e345ab64 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/CastToArrayCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/CastToArrayCommand.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 Wind River Systems, Inc. and others.
+ * Copyright (c) 2009, 2016 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import org.eclipse.tcf.internal.debug.ui.Activator;
import org.eclipse.tcf.internal.debug.ui.ImageCache;
import org.eclipse.tcf.internal.debug.ui.model.ICastToType;
import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExpression;
import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.services.ISymbols;
import org.eclipse.tcf.util.TCFDataCache;
@@ -71,6 +72,10 @@ public class CastToArrayCommand extends AbstractActionDelegate {
public void run() {
cur_length = null;
+ if (node instanceof TCFNodeExpression && !((TCFNodeExpression)node).isEnabled()) {
+ done(null);
+ return;
+ }
String cast = node.getModel().getCastToType(node.getID());
if (cast != null) {
if (cast.endsWith("]")) {
@@ -82,6 +87,7 @@ public class CastToArrayCommand extends AbstractActionDelegate {
}
}
done(null);
+ return;
}
TCFDataCache<ISymbols.Symbol> type_cache = ((ICastToType)node).getType();
if (!type_cache.validate(this)) return;
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ViewMemoryCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ViewMemoryCommand.java
index 6b9ac6e94..79c280253 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ViewMemoryCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ViewMemoryCommand.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others.
+ * Copyright (c) 2011, 2016 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -74,7 +74,7 @@ public class ViewMemoryCommand extends AbstractActionDelegate {
TCFNode mem_node = node;
BigInteger addr = null;
long size = -1;
- if (node instanceof TCFNodeExpression) {
+ if (node instanceof TCFNodeExpression && ((TCFNodeExpression)node).isEnabled()) {
TCFDataCache<IExpressions.Value> val_cache = ((TCFNodeExpression)node).getValue();
if (!val_cache.validate(on_value_changed)) {
/* Don't wait until the value is evaluated -
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java
index a9b078176..6405a7d7b 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2015 Wind River Systems, Inc. and others.
+ * Copyright (c) 2008, 2016 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -819,6 +819,10 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
postAllChangedDelta();
}
+ public boolean isEnabled() {
+ return enabled;
+ }
+
/**
* Get expression properties cache that represents a variable.
* The cache is empty if the node does not represent a variable.

Back to the top