KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > provisional > cheatsheets > ICompositeCheatSheetTask


1 /*******************************************************************************
2  * Copyright (c) 2005, 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
12 package org.eclipse.ui.internal.provisional.cheatsheets;
13
14 import java.util.Dictionary JavaDoc;
15
16 /**
17  * A task within a composite cheat sheet.
18  * <p>
19  * This interface is not intended to be implemented by clients.
20  * </p>
21  */

22
23 public interface ICompositeCheatSheetTask {
24     /**
25      * The constant that indicates that the task has not been
26      * processed yet.
27      */

28     public static final int NOT_STARTED = 0;
29     /**
30      * The constant that indicates that the task is in progress.
31      */

32     public static final int IN_PROGRESS = 1;
33     /**
34      * The constant that indicates that the task has been skipped.
35      */

36     public static final int SKIPPED = 2;
37     /**
38      * The constant that indicates that the task has been completed.
39      */

40     public static final int COMPLETED = 3;
41     /**
42      * @return the unique identifier of this task.
43      */

44     public String JavaDoc getId();
45     /**
46      * @return the translatable name of the task.
47      */

48     public String JavaDoc getName();
49     /**
50      * Returns the kind of the task editor or task group.
51      * @return task editor kind or <code>null</code> if no editor
52      * is assoticated with this task.
53      */

54     public String JavaDoc getKind();
55     /**
56      * The task parameters are used to configure the
57      * task editor with data meaningful to an editor of this kind.
58      * @return the parameter names and values as specified in the
59      * composite cheatsheet content file.
60      */

61     public Dictionary JavaDoc getParameters();
62     /**
63      * Returns the description of the task.
64      * @return a plain String, or XML markup that can
65      * be understood by FormText widget.
66      * @see org.eclipse.ui.forms.widgets.FormText
67      */

68     public String JavaDoc getDescription();
69     
70     /**
71      * Gets the text to be displayed when this task is completed
72      * @return a plain String, or XML markup that can
73      * be understood by FormText widget.
74      * @see org.eclipse.ui.forms.widgets.FormText
75      */

76     public String JavaDoc getCompletionMessage();
77     
78     /**
79      * Get the subtasks of this task. Each subtask may be
80      * a task group or editable task. If the task is an editable task
81      * there will be no children and an empty array will be returned.
82      * @return an array of subtasks for this task
83      */

84     public ICompositeCheatSheetTask [] getSubtasks();
85     
86     /**
87      * get the tasks which are required to be completed
88      * before this task is started.
89      * @return an array of tasks that must be completed
90      * before this task can be started. The array will be
91      * empty if this tasks is independent of other tasks.
92      */

93     public ICompositeCheatSheetTask [] getRequiredTasks();
94
95     /**
96      * Determine whether the required tasks for this task have
97      * all been completed.
98      * @return true if there are noi required tasks or all required
99      * tasks have been completed.
100      */

101     public boolean requiredTasksCompleted();
102     
103     /**
104      * Get the state of this task
105      * @return NOT_STARTED, IN_PROGRESS, SKIPPED or COMPLETED.
106      */

107     public int getState();
108     
109     /**
110      * Get the enclosing composite cheat sheet
111      * @return the composite cheat sheet which contains this task
112      */

113     public ICompositeCheatSheet getCompositeCheatSheet();
114     
115     /**
116      * Get the parent task group
117      * @return The task group which contains this task or <code>null</code>
118      * if this is the root of the composite cheat sheet.
119      */

120     public ITaskGroup getParent();
121
122     /**
123      * Test whether this task can be skipped. Skippable tasks are optional
124      * tasks which are identified in the content file by having the attribute
125      * <code>skip = "true"</code>. Only skippable tasks can be skipped.
126      * @return true if this task has the skip attribute set to true in the
127      * content file.
128      */

129     public boolean isSkippable();
130
131 }
132
Popular Tags