Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 145123 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/mylar/internal/sandbox/web/WebRepositoryConnector.java (-2 / +1 lines)
Lines 136-143 Link Here
136
	}
136
	}
137
137
138
	public IWizard getNewTaskWizard(TaskRepository taskRepository) {
138
	public IWizard getNewTaskWizard(TaskRepository taskRepository) {
139
		// TODO
139
		return new WebTaskWizard(taskRepository);
140
		return null;
141
	}
140
	}
142
141
143
	
142
	
(-)src/org/eclipse/mylar/internal/sandbox/web/WebTaskNewPage.java (+40 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2004 - 2006 University Of British Columbia 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
 *     University Of British Columbia - initial API and implementation
10
 *******************************************************************************/
11
12
package org.eclipse.mylar.internal.sandbox.web;
13
14
import org.eclipse.jface.wizard.WizardPage;
15
import org.eclipse.swt.SWT;
16
import org.eclipse.swt.widgets.Composite;
17
import org.eclipse.swt.widgets.Text;
18
19
20
/**
21
 * Wizard page for new task wizard
22
 * 
23
 * @author Eugene Kuleshov 
24
 */
25
public class WebTaskNewPage extends WizardPage {
26
	
27
	public WebTaskNewPage() {
28
		super("New web task");
29
	}
30
31
	public void createControl(Composite parent) {
32
		Text text = new Text(parent, SWT.WRAP);
33
		text.setEditable(false);
34
		text.setText("This will open a web browser that can be used to create new task.\n" +
35
				"Once done you can link newly created task back to the Task List.");
36
		setControl(text);
37
	}
38
	
39
}
40
(-)src/org/eclipse/mylar/internal/sandbox/web/WebTaskWizard.java (+57 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2004 - 2006 University Of British Columbia 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
 *     University Of British Columbia - initial API and implementation
10
 *******************************************************************************/
11
12
package org.eclipse.mylar.internal.sandbox.web;
13
14
import org.eclipse.jface.viewers.IStructuredSelection;
15
import org.eclipse.jface.wizard.Wizard;
16
import org.eclipse.mylar.internal.tasklist.ui.TaskUiUtil;
17
import org.eclipse.mylar.provisional.tasklist.TaskRepository;
18
import org.eclipse.ui.INewWizard;
19
import org.eclipse.ui.IWorkbench;
20
21
/**
22
 * Wizard used to create new web task
23
 * 
24
 * @author Eugene Kuleshov
25
 */
26
public class WebTaskWizard extends Wizard implements INewWizard {
27
28
	private final TaskRepository taskRepository;
29
30
	private IWorkbench workbench;
31
	private IStructuredSelection selection;
32
	
33
	public WebTaskWizard(TaskRepository taskRepository) {
34
		this.taskRepository = taskRepository;
35
	}
36
	
37
	public void init(IWorkbench workbench, IStructuredSelection selection) {
38
		this.workbench = workbench;
39
		this.selection = selection;
40
	}
41
	
42
	public void addPages() {
43
		super.addPages();
44
		addPage(new WebTaskNewPage());
45
	}
46
47
	public boolean canFinish() {
48
		return true;
49
	}
50
	
51
	public boolean performFinish() {
52
		TaskUiUtil.openUrl(taskRepository.getProperty(WebRepositoryConnector.PROPERTY_NEW_TASK_URL));
53
		return true;
54
	}
55
56
}
57

Return to bug 145123