1 11 package org.eclipse.jdt.internal.ui.workingsets; 12 13 import org.eclipse.core.runtime.Assert; 14 15 import org.eclipse.jface.action.Action; 16 17 import org.eclipse.ui.PlatformUI; 18 19 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; 20 21 26 public class ClearWorkingSetAction extends Action { 27 28 private WorkingSetFilterActionGroup fActionGroup; 29 30 public ClearWorkingSetAction(WorkingSetFilterActionGroup actionGroup) { 31 super(WorkingSetMessages.ClearWorkingSetAction_text); 32 Assert.isNotNull(actionGroup); 33 setToolTipText(WorkingSetMessages.ClearWorkingSetAction_toolTip); 34 setEnabled(actionGroup.getWorkingSet() != null); 35 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CLEAR_WORKING_SET_ACTION); 36 fActionGroup= actionGroup; 37 } 38 39 42 public void run() { 43 fActionGroup.setWorkingSet(null, true); 44 } 45 } 46 | Popular Tags |