Bug 28716 [misc] 'Goto Matching Bracket' fails when 'Show Source of Selected Element Only' is selected
When the 'Show Source of Selected Element Only' button is pressed and the editor is narrowed down to the selected method the Goto Matching Bracket action fails. It reports 'No Matching Bracket' found in the status bar. Invoking the same action on the same bracket when the editor shows the whole of the source file works as expected.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
else
							break;
					} while (order != CollationElementIterator.NULLORDER);
									
					position += offset;
					if (Character.getType(document.getChar(position - 1)) != Character.CONNECTOR_PUNCTUATION) {
						setCaretPosition(position);
						getTextWidget().showSelection();
						fireSelectionChanged();
						return;
					}
				}
			} catch (BadLocationException exception) {
				
			}
			super.run();
		}
		/**
		 * Sets the caret position to the sub-word boundary given with <code>position</code>.
		 * 
		 * @param position Position where the action should move the caret
		 */
		protected abstract void setCaretPosition(int position);
	}
	/**
	 * Text navigation action to navigate to the next sub-word.
	 * 
	 * @since 3.0
	 */
	protected class NavigateNextSubWordAction extends NextSubWordAction {