private static final void waitForEditorToBeActive(IEditorPart internalFileEditor,IWorkbenchPage page){
  long start=System.currentTimeMillis();
  long end=start;
  do {
    end=System.currentTimeMillis();
  }
 while (page.getActiveEditor() != internalFileEditor && (end - start) < 5000);
  if (page.getActiveEditor() != internalFileEditor)   logger.warn("selected editor was not activated within timout");
}

private static final void waitForEditorToBeActive ( IEditorPart internalFileEditor , IWorkbenchPage page ) { long start = System . currentTimeMillis ( ) ; long end = start ; do { end = System . currentTimeMillis ( ) ; } while ( page . getActiveEditor ( ) != internalFileEditor && ( end - start ) < 5000 ) ; if ( page . getActiveEditor ( ) != internalFileEditor ) logger . warn ( "selected editor was not activated within timout" ) ; }
get editor for provided file , returns once editor is active or after timeout
