Bug 28698 Ctrl+O (show outline) does not work if the file being shown in the editor is read only
M4 The summary tells all. Works if the file is not read only. Is this by design?
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
return false;
		try {
			return
				isBracket(document.getChar(offset - 1)) &&
				isBracket(document.getChar(offset));
			
		} catch (BadLocationException e) {
			return false;	
		}
	} 
	/**
	 * Jumps to the matching bracket.
	 */
	public void gotoMatchingBracket() {
		if (fBracketMatcher == null)
			fBracketMatcher= new JavaPairMatcher(BRACKETS);
		ISourceViewer sourceViewer= getSourceViewer();
		IDocument document= sourceViewer.getDocument();
		if (document == null)
			return;
		
		IRegion selection= getSignedSelection(sourceViewer);
		int selectionLength= Math.abs(selection.getLength());
		if (selectionLength > 1) {
			setStatusLineErrorMessage(JavaEditorMessages.getString("GotoMatchingBracket.error.invalidSelection"));			
			sourceViewer.getTextWidget().getDisplay().beep();
			return;
		}
		
		int sourceCaretOffset= selection.getOffset() + selection.getLength();