1 /******************************************************************************* 2 * Copyright (c) 2004, 2006 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.ui.cheatsheets; 12 13 /** 14 * Cheat sheet-aware action. 15 * <p> 16 * This interface should be implemented by actions 17 * (subclasses of {@link org.eclipse.jface.action.Action}) that provide extra 18 * support for use in cheat sheets. These actions get passed additional 19 * parameters and the invoking cheat sheet manager. 20 * </p> 21 * <p> 22 * It is strongly recommended that actions intended to be invoked from cheat 23 * sheets should report success/fail outcome if running the action might fail 24 * (perhaps because the user cancels the action from its dialog). 25 * See {@link org.eclipse.jface.action.Action#notifyResult(boolean)} for 26 * details. 27 * </p> 28 * 29 * @since 3.0 30 */ 31 public interface ICheatSheetAction { 32 33 /** 34 * Runs this Cheat sheet-aware action. 35 * 36 * @param params an array of strings 37 * @param manager the cheat sheet manager 38 */ 39 public void run(String [] params, ICheatSheetManager manager); 40 41 } 42