private void runInternal ( IMarker marker ) throws CoreException { Assert . isNotNull ( marker ) ; PendingRewrite pending = resolveWithoutWriting ( marker ) ; if ( pending == null ) { return ; } try { IRegion region = completeRewrite ( pending ) ; if ( region == null ) { return ; } IEditorPart part = EditorUtility . isOpenInEditor ( pending . originalUnit ) ; if ( part instanceof ITextEditor ) { ( ( ITextEditor ) part ) . selectAndReveal ( region . getOffset ( ) , region . getLength ( ) ) ; } } finally { pending . originalUnit . discardWorkingCopy ( ) ; } }
This method is used by the test - framework to catch the thrown exceptions and report it to the user .