1 11 12 package org.eclipse.ui.internal.cheatsheets.composite.explorer; 13 14 import org.eclipse.core.runtime.IPath; 15 import org.eclipse.jface.action.Action; 16 import org.eclipse.jface.resource.ImageDescriptor; 17 import org.eclipse.ui.internal.cheatsheets.CheatSheetPlugin; 18 import org.eclipse.ui.internal.cheatsheets.Messages; 19 import org.eclipse.ui.internal.cheatsheets.composite.model.AbstractTask; 20 import org.eclipse.ui.internal.provisional.cheatsheets.ICompositeCheatSheetTask; 21 22 public class SkipAction extends Action { 23 24 private static final String SKIP_CCS_TASK_GIF = "skip_ccs_task.gif"; private AbstractTask task; 26 27 public SkipAction(ICompositeCheatSheetTask task) { 28 this.task = (AbstractTask) task; 29 this.setText(Messages.COMPOSITE_MENU_SKIP); 30 IPath ePath = CheatSheetPlugin.ICONS_PATH.append(CheatSheetPlugin.T_ELCL).append(SKIP_CCS_TASK_GIF); 31 ImageDescriptor skipImage = CheatSheetPlugin.createImageDescriptor(CheatSheetPlugin.getPlugin().getBundle(), ePath); 32 this.setImageDescriptor(skipImage); 33 } 34 35 public void run() { 36 task.setState(ICompositeCheatSheetTask.SKIPPED); 37 } 38 39 } 40 | Popular Tags |