Package runjettyrun.handlers

Source Code of runjettyrun.handlers.RunJettyHandler

package runjettyrun.handlers;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.internal.WorkbenchWindow;

/**
* Our sample handler extends AbstractHandler, an IHandler base class.
*
* @see org.eclipse.core.commands.IHandler
* @see org.eclipse.core.commands.AbstractHandler
*/
@SuppressWarnings("restriction")
public class RunJettyHandler extends AbstractHandler {
  /**
   * The constructor.
   */
  public RunJettyHandler() {
  }

  /**
   * the command has been executed, so extract extract the needed information
   * from the application context.
   */
  @SuppressWarnings("restriction")
  public Object execute(ExecutionEvent event) throws ExecutionException {

    ILaunchManager lnmanger = DebugPlugin.getDefault().getLaunchManager();

    WorkbenchWindow window = (WorkbenchWindow) HandlerUtil
        .getActiveWorkbenchWindowChecked(event);

    RunJettyRunLaunch.launch(window);
    return null;
  }

}
TOP

Related Classes of runjettyrun.handlers.RunJettyHandler

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.