/* | |
* Copyright (c) Robert Bosch GmbH. All rights reserved. | |
*/ | |
package org.eclipse.blockchain.ui.handlers; | |
import org.eclipse.blockchain.ui.wizard.EthereumProjectWizard; | |
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.swt.widgets.Display; | |
import org.eclipse.ui.IWorkbench; | |
import org.eclipse.ui.PlatformUI; | |
/** | |
* @author DMU1COB | |
*/ | |
public class ImportProjectHandler extends AbstractHandler { | |
/** | |
* {@inheritDoc} | |
*/ | |
@Override | |
public Object execute(final ExecutionEvent event) throws ExecutionException { | |
Display.getDefault().asyncExec(() -> { | |
IWorkbench workbench = PlatformUI.getWorkbench(); | |
EthereumProjectWizard impotWizard = new EthereumProjectWizard(); | |
impotWizard.init(workbench, null); | |
WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), impotWizard); | |
dialog.open(); | |
}); | |
return ""; | |
} | |
} |