1 11 package org.eclipse.debug.internal.ui.actions.expressions; 12 13 import org.eclipse.debug.core.DebugPlugin; 14 import org.eclipse.debug.core.IExpressionsListener; 15 import org.eclipse.debug.core.model.IExpression; 16 import org.eclipse.debug.internal.ui.actions.SelectAllAction; 17 import org.eclipse.debug.ui.IDebugView; 18 19 public class SelectAllExpressionsAction extends SelectAllAction implements IExpressionsListener { 20 21 24 protected boolean isEnabled() { 25 return DebugPlugin.getDefault().getExpressionManager().hasExpressions(); 26 } 27 28 31 protected String getActionId() { 32 return IDebugView.SELECT_ALL_ACTION + ".Variables"; } 34 35 38 protected void initialize() { 39 DebugPlugin.getDefault().getExpressionManager().addExpressionListener(this); 40 } 41 42 45 public void expressionsAdded(IExpression[] expressions) { 46 update(); 47 } 48 49 52 public void expressionsRemoved(IExpression[] expressions) { 53 update(); 54 } 55 56 59 public void expressionsChanged(IExpression[] expressions) { 60 } 61 62 65 public void dispose() { 66 super.dispose(); 67 DebugPlugin.getDefault().getExpressionManager().removeExpressionListener(this); 68 } 69 } 70 | Popular Tags |