NewWindow.java
Go to the documentation of this file.00001 package edu.rice.cs.hpc.viewer.actions;
00002
00003 import org.eclipse.core.commands.AbstractHandler;
00004 import org.eclipse.core.commands.ExecutionEvent;
00005 import org.eclipse.core.commands.ExecutionException;
00006 import org.eclipse.core.commands.IHandler;
00007 import org.eclipse.ui.IWorkbenchWindow;
00008 import org.eclipse.ui.PlatformUI;
00009 import org.eclipse.ui.WorkbenchException;
00010
00011 public class NewWindow extends AbstractHandler implements IHandler {
00012
00013 public Object execute(ExecutionEvent event) throws ExecutionException {
00014 try {
00015 IWorkbenchWindow workbench = PlatformUI.getWorkbench().openWorkbenchWindow(null);
00016 if(workbench == null) {
00017 throw new java.lang.RuntimeException("Unable to create an RCP workbench window");
00018 }
00019 } catch (WorkbenchException e) {
00020 e.printStackTrace();
00021 }
00022 return null;
00023 }
00024
00025 }