| /******************************************************************************* |
| * Copyright (c) 2009 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.ptp.services.test.handlers; |
| |
| import org.eclipse.core.commands.AbstractHandler; |
| import org.eclipse.core.commands.ExecutionEvent; |
| import org.eclipse.core.commands.ExecutionException; |
| import org.eclipse.jface.wizard.WizardDialog; |
| import org.eclipse.ptp.services.test.ServicesConfigurationWizard; |
| import org.eclipse.ui.IWorkbenchWindow; |
| import org.eclipse.ui.handlers.HandlerUtil; |
| |
| /** |
| */ |
| public class LaunchWizardHandler extends AbstractHandler { |
| /** |
| * The constructor. |
| */ |
| public LaunchWizardHandler() { |
| } |
| |
| /** |
| * the command has been executed, so extract extract the needed information |
| * from the application context. |
| */ |
| public Object execute(ExecutionEvent event) throws ExecutionException { |
| IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event); |
| ServicesConfigurationWizard wizard = new ServicesConfigurationWizard(); |
| WizardDialog dialog = new WizardDialog(window.getShell(), wizard); |
| dialog.open(); |
| return null; |
| } |
| } |