Package es.iiia.sgi.handlers

Source Code of es.iiia.sgi.handlers.ShowDebugTreeHandler

package es.iiia.sgi.handlers;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.handlers.HandlerUtil;

import es.iiia.sgi.views.DebugTree;

public class ShowDebugTreeHandler extends AbstractHandler implements IHandler {

  public Object execute(ExecutionEvent event) throws ExecutionException {
    IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
    try {
      page.showView(DebugTree.ID);
    } catch (PartInitException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    return null;
  }

}
TOP

Related Classes of es.iiia.sgi.handlers.ShowDebugTreeHandler

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.