Java 类org.eclipse.core.commands.IExecutionListener 实例源码

项目:Vitruv    文件:EclipseMockTests.java   
@Test
public void saveListenersAreFiredOnSave() {
    IExecutionListener saveListener = createStrictMock(IExecutionListener.class);
    reset(saveListener);
    saveListener.preExecute(org.eclipse.ui.IWorkbenchCommandConstants.FILE_SAVE, null);
    expectLastCall().times(1);
    saveListener.postExecuteSuccess(org.eclipse.ui.IWorkbenchCommandConstants.FILE_SAVE, null);
    expectLastCall().times(1);
    replay(saveListener);

    eclipse.addCommandServiceListener(saveListener);
    eclipseMockCtrl.issueSaveEvent(SaveEventKind.SAVE);

    verify(saveListener);
}
项目:Vitruv    文件:EclipseAdapterImpl.java   
@Override
public void addCommandServiceListener(IExecutionListener iel) {
    final ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
    service.addExecutionListener(iel);
}
项目:Vitruv    文件:EclipseAdapterImpl.java   
@Override
public void removeCommandServiceListener(IExecutionListener iel) {
    final ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
    service.removeExecutionListener(iel);
}
项目:Vitruv    文件:EclipseMock.java   
public void issueSaveEvent(SaveEventKind kind) {
    for (IExecutionListener listener : this.saveListeners) {
        listener.preExecute(kind.getEclipseActionID(), null);
        listener.postExecuteSuccess(kind.getEclipseActionID(), null);
    }
}
项目:e4macs    文件:MarkUtils.java   
static IExecutionListener getTagListener() {
    return tagMarker;
}
项目:e4macs    文件:KillRingListeners.java   
static IExecutionListener getExecListener(boolean isReverse){
    return (isReverse ?  StaticRevExecection.revexecutionListener : StaticExecection.executionListener);
}
项目:e4macs    文件:KillRingListeners.java   
static IExecutionListener getCopyExecListener(boolean isReverse) {
    return (isReverse ?  StaticRevCopyExecection.revcopyexecutionListener : StaticCopyExecection.copyexecutionListener);
}
项目:e4macs    文件:DynamicInitializer.java   
public MinderBinder(String commandId, String contextId, String keyString, IExecutionListener enhancer) {
    this.commandId = commandId;
    this.contextId = contextId;
    this.keyString = keyString;
    this.enhancer = enhancer;
}
项目:e4macs    文件:DynamicInitializer.java   
public IExecutionListener getEnhancer() {
    return enhancer;
}
项目:Vitruv    文件:IEclipseAdapter.java   
/**
 * Adds an {@link IExecutionListener} to the Eclipse workbench's command service.
 * 
 * @param iel
 *            The listener to be added.
 */
public void addCommandServiceListener(IExecutionListener iel);
项目:Vitruv    文件:IEclipseAdapter.java   
/**
 * Removes an {@link IExecutionListener} from the Eclipse workbench's command service.
 * 
 * @param iel
 *            The listener to be removed.
 */
void removeCommandServiceListener(IExecutionListener iel);
项目:gef-gwt    文件:ICommandService.java   
/**
 * Adds an execution listener to the command service. This listener will be
 * notified as commands are executed.
 * <p>
 * <b>Note:</b> listeners should be removed when no longer necessary. If
 * not, they will be removed when the IServiceLocator used to acquire this
 * service is disposed.
 * </p>
 * 
 * @param listener
 *            The listener to add; must not be <code>null</code>.
 * @see #removeExecutionListener(IExecutionListener)
 */
public void addExecutionListener(IExecutionListener listener);
项目:gef-gwt    文件:ICommandService.java   
/**
 * Removes an execution listener from the command service.
 * 
 * @param listener
 *            The listener to remove; must not be <code>null</code>.
 */
public void removeExecutionListener(IExecutionListener listener);