DebugShowCCT.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.ui.IWorkbenchWindow;
00007 import org.eclipse.ui.commands.ICommandService;
00008 import org.eclipse.ui.handlers.HandlerUtil;
00009
00010
00011
00012
00013
00014
00015
00016
00017 public class DebugShowCCT extends AbstractHandler {
00018
00019 static final public String commandId = "edu.rice.cs.hpc.viewer.command.debug.showCCT";
00020
00021
00022
00023
00024
00025 public Object execute(ExecutionEvent event) throws ExecutionException
00026 {
00027 IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
00028
00029
00030 HandlerUtil.toggleCommandState( event.getCommand() );
00031
00032 final ICommandService commandService = (ICommandService) window.getService(ICommandService.class);
00033 commandService.refreshElements(commandId, null);
00034
00035 return null;
00036 }
00037 }