Skip to main content
summaryrefslogtreecommitdiffstats
blob: 5d1ccc2e2593976814545c5c04b88349bdc9d850 (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
/*******************************************************************************
 * Copyright (c) 2006, 2015 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.ua.tests.cheatsheet.util;

/**
 *  A task editor with no interesting behavior.
 *  Used by parser tests
 */

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.internal.provisional.cheatsheets.IEditableTask;
import org.eclipse.ui.internal.provisional.cheatsheets.TaskEditor;

public class TestTaskEditor extends TaskEditor {

	private Composite control;
	
	@Override
	public void createControl(Composite parent, FormToolkit toolkit) {
		control = new Composite(parent, SWT.NULL);
		control.setLayout(new GridLayout());
		Label label = new Label(control, SWT.NULL);
		label.setText("Task editor used by JUnit tests");
		label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	}

	@Override
	public Control getControl() {
		return control;
	}

	@Override
	public void setInput(IEditableTask task, IMemento memento) {
		// Do nothing
	}

	@Override
	public void saveState(IMemento memento) {
		// Do nothing
	}

}

Back to the top