/*******************************************************************************
* Copyright (c) 2009, 2010 Innovation Gate GmbH.
* 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:
* Innovation Gate GmbH - initial API and implementation
******************************************************************************/
package de.innovationgate.eclipse.editors.design.commands;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.commands.IHandlerListener;
import org.eclipse.core.runtime.CoreException;
import de.innovationgate.eclipse.editors.Plugin;
import de.innovationgate.eclipse.editors.ResourceIDs;
import de.innovationgate.eclipse.utils.WorkbenchUtils;
public class ExportWGAPluginAsFileCommandHandler implements IHandler {
public void addHandlerListener(IHandlerListener handlerListener) {
// TODO Auto-generated method stub
}
public void dispose() {
}
public Object execute(ExecutionEvent event) throws ExecutionException {
try {
WorkbenchUtils.openWizardOnCurrentEditorInput(Plugin.getDefault().getWorkbench(), ResourceIDs.WIZARD_EXPORT_WGA_PLUGIN_LOCAL);
return null;
} catch (CoreException e) {
throw new ExecutionException("Unable to open export wizard.", e);
}
}
public boolean isEnabled() {
return true;
}
public boolean isHandled() {
return true;
}
public void removeHandlerListener(IHandlerListener handlerListener) {
}
}