Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2006-09-29 21:17:54 +0000
committerDarin Wright2006-09-29 21:17:54 +0000
commita56f5117ceb96487c693cc4013552924c6f492ea (patch)
treea2c032c95e24eee3758a896a862d1f0049f72a5b
parentdb57aeb893ad2cef11a2af9f8868a8f159945ebd (diff)
downloadeclipse.platform.debug-a56f5117ceb96487c693cc4013552924c6f492ea.tar.gz
eclipse.platform.debug-a56f5117ceb96487c693cc4013552924c6f492ea.tar.xz
eclipse.platform.debug-a56f5117ceb96487c693cc4013552924c6f492ea.zip
Bug 159359 expressions serialized each time they change state
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ExpressionManager.java9
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/WatchExpression.java12
2 files changed, 13 insertions, 8 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ExpressionManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ExpressionManager.java
index 920f18b84..bb57a7a89 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ExpressionManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ExpressionManager.java
@@ -408,13 +408,16 @@ public class ExpressionManager extends PlatformObject implements IExpressionMana
/**
* The given watch expression has changed. Update the persisted
- * expressions to store this change.
+ * expressions to store this change as indicated
*
* @param expression the changed expression
+ * @param persist whether to persist the expressions
*/
- protected void watchExpressionChanged(IWatchExpression expression) {
+ protected void watchExpressionChanged(IWatchExpression expression, boolean persist) {
if (fExpressions != null && fExpressions.contains(expression)) {
- storeWatchExpressions();
+ if (persist) {
+ storeWatchExpressions();
+ }
fireUpdate(new IExpression[]{expression}, CHANGED);
}
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/WatchExpression.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/WatchExpression.java
index dec0a24ec..c02fcdefd 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/WatchExpression.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/WatchExpression.java
@@ -134,9 +134,11 @@ public class WatchExpression implements IWatchExpression {
* Notifies the expression manager that this watch expression's
* values have changed so the manager can update the
* persisted expression.
+ *
+ * @param persist whether to persist the expression
*/
- private void watchExpressionChanged() {
- ((ExpressionManager)DebugPlugin.getDefault().getExpressionManager()).watchExpressionChanged(this);
+ private void watchExpressionChanged(boolean persist) {
+ ((ExpressionManager)DebugPlugin.getDefault().getExpressionManager()).watchExpressionChanged(this, persist);
}
/**
@@ -202,7 +204,7 @@ public class WatchExpression implements IWatchExpression {
*/
public void setEnabled(boolean enabled) {
fEnabled= enabled;
- watchExpressionChanged();
+ watchExpressionChanged(true);
evaluate();
}
@@ -211,7 +213,7 @@ public class WatchExpression implements IWatchExpression {
*/
public void setExpressionText(String expression) {
fExpressionText= expression;
- watchExpressionChanged();
+ watchExpressionChanged(true);
evaluate();
}
@@ -239,7 +241,7 @@ public class WatchExpression implements IWatchExpression {
*/
protected void setPending(boolean pending) {
fPending= pending;
- watchExpressionChanged();
+ watchExpressionChanged(false);
}
/* (non-Javadoc)

Back to the top