Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2008-05-14 21:15:36 +0000
committerCurtis Windatt2008-05-14 21:15:36 +0000
commit066d1857858c2f04a46d5534ccd1fba8e8a68f8b (patch)
tree040ed2ee8d92ce948d9d49f6dbf6ece3ccef88e2
parent4fcf79a61308b958836f797ca7dd2533024669db (diff)
downloadeclipse.platform.debug-066d1857858c2f04a46d5534ccd1fba8e8a68f8b.tar.gz
eclipse.platform.debug-066d1857858c2f04a46d5534ccd1fba8e8a68f8b.tar.xz
eclipse.platform.debug-066d1857858c2f04a46d5534ccd1fba8e8a68f8b.zip
Bug 228445 - 'Create Watch Expression' shows up in every context menu
https://bugs.eclipse.org/bugs/show_bug.cgi?id=228445
-rw-r--r--org.eclipse.debug.core/buildnotes_platform-debug.html1
-rw-r--r--org.eclipse.debug.ui/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.debug.ui/plugin.xml21
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java2
4 files changed, 16 insertions, 12 deletions
diff --git a/org.eclipse.debug.core/buildnotes_platform-debug.html b/org.eclipse.debug.core/buildnotes_platform-debug.html
index 0c3783e1b..ad1999dac 100644
--- a/org.eclipse.debug.core/buildnotes_platform-debug.html
+++ b/org.eclipse.debug.core/buildnotes_platform-debug.html
@@ -45,6 +45,7 @@
<h2>May 14, 2008</h2>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=225688">Bug 225688</a>: DBCS3.4: In expression view, DBCS characters are changed to &quot;?&quot; after restarting eclipse<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=228445">Bug 228445</a>: 'Create Watch Expression' shows up in every context menu<br>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=224019">Bug 224019</a>: Command handler conflict in registers view<br>
<h2>May 13, 2008</h2>
diff --git a/org.eclipse.debug.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.ui/META-INF/MANIFEST.MF
index 6b303bb03..136787bfe 100644
--- a/org.eclipse.debug.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.ui/META-INF/MANIFEST.MF
@@ -49,9 +49,9 @@ Export-Package: org.eclipse.debug.internal.ui;x-internal:=true,
org.eclipse.debug.ui.contexts,
org.eclipse.debug.ui.memory,
org.eclipse.debug.ui.sourcelookup
-Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.3.0,4.0.0)",
+Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.3.0,4.0.0)",
+ org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
org.eclipse.ui.console;bundle-version="[3.2.0,4.0.0)",
org.eclipse.help;bundle-version="[3.3.0,4.0.0)",
org.eclipse.debug.core;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,
diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml
index ed3227915..6e16561d4 100644
--- a/org.eclipse.debug.ui/plugin.xml
+++ b/org.eclipse.debug.ui/plugin.xml
@@ -972,14 +972,19 @@
label="%Watch.label"
helpContextId="variable_watch_action_context">
<visibleWhen>
- <with variable="selection">
- <count
- value="+">
- </count>
- <iterate>
- <test property="org.eclipse.debug.ui.canCreateWatchExpression" value="true"/>
- </iterate>
- </with>
+ <and>
+ <with variable="org.eclipse.core.runtime.Platform">
+ <test property="org.eclipse.core.runtime.bundleState"
+ args="org.eclipse.debug.ui"
+ value="ACTIVE"/>
+ </with>
+ <with variable="selection">
+ <count value="+"/>
+ <iterate>
+ <test property="org.eclipse.debug.ui.canCreateWatchExpression" value="true"/>
+ </iterate>
+ </with>
+ </and>
</visibleWhen>
</command>
</menuContribution>
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java
index 7cc491a90..8fbd74b21 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java
@@ -15,7 +15,6 @@ import java.util.Iterator;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.core.DebugPlugin;
@@ -89,7 +88,6 @@ public class WatchHandler extends AbstractHandler {
expressionString = factory2.createWatchExpression(element);
} else {
// Action should not have been enabled
- Assert.isTrue(false);
return;
}
}

Back to the top