blob: a60860b7263f68dd0ad5f26c59f53a3300eb2df3 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2017 The Reuse Company
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Luís Alonso - initial API and implementation
* Borja López - initial API and implementation
*******************************************************************************/
package org.eclipse.opencert.evm.oslc.km.importevid.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.opencert.evm.oslc.km.importevid.wizard.MyWizard;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
/**
* Our sample handler extends AbstractHandler, an IHandler base class.
* @see org.eclipse.core.commands.IHandler
* @see org.eclipse.core.commands.AbstractHandler
*/
public class OslcKmImporterHandler extends AbstractHandler {
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
WizardDialog wizardDialog = new WizardDialog(window.getShell(), new MyWizard());
if (wizardDialog.open() == Window.OK) {
// MessageDialog.openInformation(window.getShell(), "OSLC KM Importer","Evidences imported successfully");
}
return null;
}
}