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 StartAction extends Action { 23 private AbstractTask task; 24 private static final String START_CCS_TASK_GIF = "start_ccs_task.gif"; 26 public StartAction(ICompositeCheatSheetTask task) { 27 this.task = (AbstractTask) task; 28 this.setText(Messages.COMPOSITE_MENU_START); 29 IPath path = CheatSheetPlugin.ICONS_PATH.append(CheatSheetPlugin.T_ELCL).append(START_CCS_TASK_GIF); 30 ImageDescriptor startImage = CheatSheetPlugin.createImageDescriptor(CheatSheetPlugin.getPlugin().getBundle(), path); 31 this.setImageDescriptor(startImage); 32 } 33 34 public void run() { 35 task.setState(ICompositeCheatSheetTask.IN_PROGRESS); 36 } 37 38 } 39 | Popular Tags |