Bug 55968 [misc] segmented view does not work with new methods
i2004-03-24+plugin export - add a new method into a class by typing: public void test() {[enter] - the closing bracket is made automatically and the cursor is placed in the method - press "show source of selected element only" - observed behavior: the selected segment is the whole class rather than the method in which the cursor was
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
int length= fActiveRegion.getLength();
			fActiveRegion= null;
				
			ISourceViewer viewer= getSourceViewer();
			if (viewer != null) {
				
				resetCursor(viewer);
				
				
				if (!redrawAll && viewer instanceof ITextViewerExtension2)
					((ITextViewerExtension2) viewer).invalidateTextPresentation(offset, length);
				else
					viewer.invalidateTextPresentation();
				
				
				if (viewer instanceof ITextViewerExtension5) {
					ITextViewerExtension5 extension= (ITextViewerExtension5) viewer;
					offset= extension.modelOffset2WidgetOffset(offset);
				} else {
					offset -= viewer.getVisibleRegion().getOffset();
				}
				try {
					StyledText text= viewer.getTextWidget();
					text.redrawRange(offset, length, false);
				} catch (IllegalArgumentException x) {
					JavaPlugin.log(x);
				}
			}
		}