DebugShowFlatID.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 public class DebugShowFlatID extends AbstractHandler {
00016
00017 static final public String commandId = "edu.rice.cs.hpc.viewer.command.debug.showFlatID";
00018
00019
00020
00021
00022
00023 public Object execute(ExecutionEvent event) throws ExecutionException {
00024 IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
00025
00026
00027 HandlerUtil.toggleCommandState( event.getCommand() );
00028
00029 final ICommandService commandService = (ICommandService) window.getService(ICommandService.class);
00030 commandService.refreshElements(commandId, null);
00031
00032 return null;
00033 }
00034
00035 }