Package de.innovationgate.eclipse.editors.design.commands

Source Code of de.innovationgate.eclipse.editors.design.commands.ExportWGADesignAsFileCommandHandler

/*******************************************************************************
* 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 ExportWGADesignAsFileCommandHandler 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_DESIGN_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) {
  }

}
TOP

Related Classes of de.innovationgate.eclipse.editors.design.commands.ExportWGADesignAsFileCommandHandler

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.