1 11 12 package org.eclipse.ui.handlers; 13 14 import java.util.Collection ; 15 16 import org.eclipse.core.commands.Command; 17 import org.eclipse.core.commands.ExecutionEvent; 18 import org.eclipse.core.commands.ExecutionException; 19 import org.eclipse.core.commands.IHandler; 20 import org.eclipse.core.commands.NotEnabledException; 21 import org.eclipse.core.commands.NotHandledException; 22 import org.eclipse.core.commands.ParameterizedCommand; 23 import org.eclipse.core.commands.common.NotDefinedException; 24 import org.eclipse.core.expressions.Expression; 25 import org.eclipse.core.expressions.IEvaluationContext; 26 import org.eclipse.swt.widgets.Event; 27 import org.eclipse.ui.services.IServiceWithSources; 28 29 40 public interface IHandlerService extends IServiceWithSources { 41 42 61 public IHandlerActivation activateHandler(IHandlerActivation activation); 62 63 87 public IHandlerActivation activateHandler(String commandId, IHandler handler); 88 89 121 public IHandlerActivation activateHandler(String commandId, 122 IHandler handler, Expression expression); 123 124 161 public IHandlerActivation activateHandler(String commandId, 162 IHandler handler, Expression expression, boolean global); 163 164 198 public IHandlerActivation activateHandler(String commandId, 199 IHandler handler, Expression expression, int sourcePriorities); 200 201 216 public ExecutionEvent createExecutionEvent(Command command, Event event); 217 218 235 public ExecutionEvent createExecutionEvent(ParameterizedCommand command, 236 Event event); 237 238 249 public void deactivateHandler(IHandlerActivation activation); 250 251 264 public void deactivateHandlers(Collection activations); 265 266 287 public Object executeCommand(String commandId, Event event) 288 throws ExecutionException, NotDefinedException, 289 NotEnabledException, NotHandledException; 290 291 312 public Object executeCommand(ParameterizedCommand command, Event event) 313 throws ExecutionException, NotDefinedException, 314 NotEnabledException, NotHandledException; 315 316 326 public IEvaluationContext getCurrentState(); 327 328 336 public void readRegistry(); 337 338 350 public void setHelpContextId(IHandler handler, String helpContextId); 351 } 352 | Popular Tags |