Skip to main content
summaryrefslogtreecommitdiffstats
blob: 4d8b6977b7bb2dce31404848eb55253b10d675a9 (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
/*******************************************************************************
 * Copyright (c) 2004, 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.wst.ws.internal.explorer;

import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.command.internal.env.ui.widgets.DynamicWizard;

public class LaunchWizardRunnable extends Thread implements Runnable {
	private String id;

	private String wsdlURL;

	private boolean finish;

	public LaunchWizardRunnable(String id, String wsdlURL) {
		this.id = id;
		this.wsdlURL = (wsdlURL != null) ? wsdlURL : "";
		finish = false;
	}

	public boolean isFinish() {
		return finish;
	}

	public void run() {
		try {
			DynamicWizard wizard = new DynamicWizard();
			wizard.setInitialData(id);
			IStructuredSelection sel = new StructuredSelection(wsdlURL);
			wizard.init(null, sel);
			WizardDialog wd = new WizardDialog(new Shell(Display.getDefault(),
					SWT.APPLICATION_MODAL), wizard);
			wd.open();
		} catch (Exception e) {
		} finally {
			finish = true;
		}
	}
}

Back to the top