blob: 389c735c22b32afad899d8e30a3ab614538dc4a6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/*******************************************************************************
* 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;
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 interface ITaskEditor {
/**
* Creates the widget
* @param parent
* @param toolkit
*/
public void createControl(Composite parent, FormToolkit toolkit);
/**
* @return the Control created by a previous call to CreateControl()
*/
public Control getControl();
/**
* Starts editing the provided task. The editor is responsible
* for setting the 'percentage complete' state of the task and
* saving its state. createControl() will always be called before setInput().
* 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.
* @param task The task associated with this editor
* @param memento The state of this task saved from a previous invocation, may be null.
*/
public void setInput(ICompositeCheatSheetTask task, IMemento memento);
/**
* Saves the object state within a memento.
*
* @param memento a memento to receive the object state
*/
public void saveState(IMemento memento);
}
|