Java 类org.eclipse.debug.core.ILaunchesListener2 实例源码

项目:eclipse-extras    文件:JUnitTestRunListenerTest.java   
private ILaunchManager mockLaunchManager() {
  ILaunchManager result = mock( ILaunchManager.class );
  doAnswer( new Answer<Object>() {
    @Override
    public Object answer( InvocationOnMock invocation ) {
      launchesListeners.add( ( ILaunchesListener2 )invocation.getArguments()[ 0 ] );
      return null;
    }
  } ).when( result ).addLaunchListener( any( ILaunchesListener2.class ) );
  return result;
}
项目:eclipse-extras    文件:JUnitTestRunListenerTest.java   
private void fireLaunchTerminated( ILaunch launch ) {
  for( ILaunchesListener2 launchesListener : launchesListeners ) {
    launchesListener.launchesTerminated( new ILaunch[] { launch } );
  }
}