diff options
author | Curtis D'Entremont | 2006-03-15 20:30:24 +0000 |
---|---|---|
committer | Curtis D'Entremont | 2006-03-15 20:30:24 +0000 |
commit | 4787580cbc783a38dbec81e9273d8e2afbcaf6be (patch) | |
tree | 62f5298a9d567eef40ccefcb2f3bbaf608ebe0a3 /org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets | |
parent | 670bf2c9454fe9caf7ce8956962e897371b9905c (diff) | |
download | eclipse.platform.ua-4787580cbc783a38dbec81e9273d8e2afbcaf6be.tar.gz eclipse.platform.ua-4787580cbc783a38dbec81e9273d8e2afbcaf6be.tar.xz eclipse.platform.ua-4787580cbc783a38dbec81e9273d8e2afbcaf6be.zip |
131793 [CheatSheet] Make composite cheat sheet API provisional
Diffstat (limited to 'org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets')
6 files changed, 0 insertions, 403 deletions
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/ICompositeCheatSheet.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/ICompositeCheatSheet.java deleted file mode 100644 index 328854be4..000000000 --- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/ICompositeCheatSheet.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.ui.cheatsheets; - -/** - * Interface representing a composite cheatsheet. - * A composite cheat sheet has a single root task, each task may have - * zero or more children. - * <p> - * This interface is not intended to be implemented by clients. - * </p> - * @since 3.2 - */ - -public interface ICompositeCheatSheet { - - /** - * The ID of the task explorer that should be the - * default for this composite cheat sheet. Can be null. - * @return the task explorer identifier or <code>null</code> if - * the view's default should be used. - */ - String getTaskExplorerId(); - - /** - * The root task of this composite cheat sheet - * @return the root task object - */ - ICompositeCheatSheetTask getRootTask(); - - /** - * Get the manager which allows data to be shared between tasks. - * @return the CheatSheetManager for this composite cheat cheet. May not be null. - */ - ICheatSheetManager getCheatSheetManager(); -} diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/ICompositeCheatSheetTask.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/ICompositeCheatSheetTask.java deleted file mode 100644 index 3bb7412ec..000000000 --- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/ICompositeCheatSheetTask.java +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.ui.cheatsheets; - -import java.util.Dictionary; - -/** - * A task within a composite cheat sheet. - * <p> - * This interface is not intended to be implemented by clients. - * </p> - * @since 3.2 - */ - -public interface ICompositeCheatSheetTask { - /** - * The constant that indicates that the task has not been - * processed yet. - */ - public static final int NOT_STARTED = 0; - /** - * The constant that indicates that the task is in progress. - */ - public static final int IN_PROGRESS = 1; - /** - * The constant that indicates that the task has been skipped. - */ - public static final int SKIPPED = 2; - /** - * The constant that indicates that the task has been completed. - */ - public static final int COMPLETED = 3; - /** - * @return the unique identifier of this task. - */ - public String getId(); - /** - * @return the translatable name of the task. - */ - public String getName(); - /** - * Returns the kind of the task editor or task group. - * @return task editor kind or <code>null</code> if no editor - * is assoticated with this task. - */ - public String getKind(); - /** - * The task parameters are used to configure the - * task editor with data meaningful to an editor of this kind. - * @return the parameter names and values as specified in the - * composite cheatsheet content file. - */ - public Dictionary getParameters(); - /** - * Returns the description of the task. - * @return a plain String, or XML markup that can - * be understood by FormText widget. - * @see org.eclipse.ui.forms.widgets.FormText - */ - public String getDescription(); - - /** - * Gets the text to be displayed when this task is completed - * @return a plain String, or XML markup that can - * be understood by FormText widget. - * @see org.eclipse.ui.forms.widgets.FormText - */ - public String getCompletionMessage(); - - /** - * Get the subtasks of this task. Each subtask may be - * a task group or editable task. If the task is an editable task - * there will be no children and an empty array will be returned. - * @return an array of subtasks for this task - */ - public ICompositeCheatSheetTask [] getSubtasks(); - - /** - * get the tasks which are required to be completed - * before this task is started. - * @return an array of tasks that must be completed - * before this task can be started. The array will be - * empty if this tasks is independent of other tasks. - */ - public ICompositeCheatSheetTask [] getRequiredTasks(); - - /** - * Determine whether the required tasks for this task have - * all been completed. - * @return true if there are noi required tasks or all required - * tasks have been completed. - */ - public boolean requiredTasksCompleted(); - - /** - * Get the state of this task - * @return NOT_STARTED, IN_PROGRESS, SKIPPED or COMPLETED. - */ - public int getState(); - - /** - * Get the enclosing composite cheat sheet - * @return the composite cheat sheet which contains this task - */ - public ICompositeCheatSheet getCompositeCheatSheet(); -} diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/IEditableTask.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/IEditableTask.java deleted file mode 100644 index 01a59fc24..000000000 --- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/IEditableTask.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.ui.cheatsheets; - -import java.net.MalformedURLException; -import java.net.URL; - -/** - * An editable task within a composite cheatsheet. An editable task is associated - * with a task editor and the task editor is responsible for completing the task. - * <p> - * This interface is not intended to be implemented by clients. - * </p> - * @since 3.2 - */ - -public interface IEditableTask extends ICompositeCheatSheetTask { - - /** - * Set the state of this task to COMPLETED - */ - public void complete(); - - /** - * Gets a URL which can be used to open the content file for this - * task if the content file can be specified by a path relative to - * the content file for the composite cheat sheet which contains it. - * @param path a relative path - * @throws MalformedURLException - * @return a URL which represents a location relative to the - * location of the content file for the composite cheat sheet. - */ - public URL getInputUrl(String path) throws MalformedURLException; - -} diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/ITaskGroup.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/ITaskGroup.java deleted file mode 100644 index 2e062b608..000000000 --- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/ITaskGroup.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.ui.cheatsheets; - -/** - * A group of tasks within a composite cheatsheet. Each taskGroup will have - * children. It does not have an editor and its state is determined from the - * state of its children. - * * <p> - * This interface is not intended to be implemented by clients. - * </p> - * @since 3.2 - */ - -public interface ITaskGroup extends ICompositeCheatSheetTask { - - /** - * A task kind of <b>set</b> indicates that this task is complete when - * all subtasks have been completed. - */ - public static final String SET = "set"; //$NON-NLS-1$ - - /** - * A task kind of <b>set</b> indicates that this task is complete when - * all subtasks have been completed. The subtasks must be completed in - * order. - */ - public static final String SEQUENCE = "sequence"; //$NON-NLS-1$ - - /** - * A task kind of <b>choice</b> indicates that this task is complete when - * any of its children has been completed. - */ - public static final String CHOICE = "choice"; //$NON-NLS-1$ - -} diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/TaskEditor.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/TaskEditor.java deleted file mode 100644 index 139c4f9a6..000000000 --- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/TaskEditor.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.ui.cheatsheets; - -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.ui.IMemento; -import org.eclipse.ui.forms.widgets.FormToolkit; - -/** - * An editor which provides the UI for a task within a composite cheat sheet. - * A task editor is responsible for saving the state of the task whenever - * it changes. - * - * @since 3.2 - */ - -public abstract class TaskEditor { - - /** - * Creates the widget - * @param parent - * @param toolkit - */ - public abstract void createControl(Composite parent, FormToolkit toolkit); - - /** - * @return the Control created by a previous call to CreateControl() - */ - public abstract Control getControl(); - - /** - * Starts editing the provided task. The editor is responsible - * for saving its state. createControl() will always be called before setInput(). - * @param task The task associated with this editor - * @param memento The state of this task saved from a previous invocation. - * The memento will be <b>null</b> if the task has not been previously started - * or if it is being restarted. If the editor is being restored from a previous - * session the memento will contain the last saved state. - */ - public abstract void setInput(IEditableTask task, IMemento memento); - - /** - * Saves the object state within a memento. - * - * @param memento a memento to receive the object state - */ - public abstract void saveState(IMemento memento); - -} diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/TaskExplorer.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/TaskExplorer.java deleted file mode 100644 index 8ebeb426b..000000000 --- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/TaskExplorer.java +++ /dev/null @@ -1,95 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -package org.eclipse.ui.cheatsheets; - -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionProvider; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.ui.forms.widgets.FormToolkit; - -/** - * Classes that extend this class are responsible for rendering the - * hierarchy of tasks in the composite cheat sheet. They must support task - * selection via the selection provider, be able to accept focus, and create - * control when asked. - */ - -public abstract class TaskExplorer { - /** - * @return the id of this TaskExplorer which must match the id used in the - * extension point - */ - public abstract String getId(); - - /** - * Create a control which will display the structure of the composite cheat - * sheet and allow tasks within the composite cheat sheet to be selected. - * - * @param parent - * @param toolkit - */ - public abstract void createControl(Composite parent, FormToolkit toolkit); - - /** - * Get the control created by a previous call to createControl - * - * @return the task explorer control - */ - public abstract Control getControl(); - - /** - * Called when the explorer gains focus. - */ - public abstract void setFocus(); - - /** - * Get the selection provider for this explorer. The selections returned by - * the selection provider should represent IGuideTasks. - * - * @return the selection provider for the task explorer - */ - public abstract ISelectionProvider getSelectionProvider(); - - /** - * Sets the composite cheat sheet to be displayed. createControl will - * already have been called. - * - * @param compositeCheatSheet - */ - public abstract void setCompositeCheatSheet(ICompositeCheatSheet compositeCheatSheet); - - /** - * Called after this explorer is no longer in use. Any resources should be - * disposed of at this point. - */ - public abstract void dispose(); - - /** - * Called when the state of a task changes and the representation of the - * task may need to be redrawn. - * - * @param task - */ - public abstract void taskUpdated(ICompositeCheatSheetTask task); - - /** - * Called to set the provided selection and optionally reveal it - * if the scroll bars are active and the selected tasks - * are partially or fully hidden. - * - * @param selection the new selection - * @param reveal if <code>true</code>, expose the task if hidden; - * otherwise, just select. - */ - public abstract void setSelection(ISelection selection, boolean reveal); -} |