Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java
index 1e3f167035c..a8deb952d5c 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java
@@ -85,7 +85,7 @@ public class EnableVariablesActionDelegate implements IViewActionDelegate {
public void run() {
while( it.hasNext() ) {
IEnableDisableTarget target = getEnableDisableTarget( it.next() );
- if ( target != null ) {
+ if ( target != null && target.canEnableDisable() ) {
try {
if ( size > 1 ) {
target.setEnabled( isEnableAction() );
@@ -124,12 +124,12 @@ public class EnableVariablesActionDelegate implements IViewActionDelegate {
boolean allDisabled = true;
while( it.hasNext() ) {
IEnableDisableTarget target = getEnableDisableTarget( it.next() );
- if ( target != null && !target.canEnableDisable() )
- continue;
- if ( target.isEnabled() )
- allDisabled = false;
- else
- allEnabled = false;
+ if ( target != null && target.canEnableDisable() ) {
+ if ( target.isEnabled() )
+ allDisabled = false;
+ else
+ allEnabled = false;
+ }
}
if ( isEnableAction() )
action.setEnabled( !allEnabled );

Back to the top