Bug 63145 Mark method exits by itself is not working
Build I200405190010 1. Check Java > Editor > Mark occurrences > Mark method exits (only) 2. Select the return type of a method containinga return statement Observe: the return type is not highlighted. Expectation: it should be. 3. Check Java > Editor > Mark occurrences > Mark exceptions (in addition to Mark method exits) 4. Select the return type again Observe: the return type is highlighted.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
return -1;
				Display display= text.getDisplay();				
				Point absolutePosition= display.getCursorLocation();
				Point relativePosition= text.toControl(absolutePosition);
				
				int widgetOffset= text.getOffsetAtLocation(relativePosition);
				if (viewer instanceof ITextViewerExtension5) {
					ITextViewerExtension5 extension= (ITextViewerExtension5) viewer;
					return extension.widgetOffset2ModelOffset(widgetOffset);
				} else {
					return widgetOffset + viewer.getVisibleRegion().getOffset();
				}
			} catch (IllegalArgumentException e) {
				return -1;
			}			
		}
		public void applyTextPresentation(TextPresentation textPresentation) {
			if (fActiveRegion == null)
				return;
			IRegion region= textPresentation.getExtent();
			if (fActiveRegion.getOffset() + fActiveRegion.getLength() >= region.getOffset() && region.getOffset() + region.getLength() > fActiveRegion.getOffset())
				textPresentation.mergeStyleRange(new StyleRange(fActiveRegion.getOffset(), fActiveRegion.getLength(), fColor, null));
		}
		
		private void highlightRegion(ISourceViewer viewer, IRegion region) {
			if (region.equals(fActiveRegion))
				return;
			repairRepresentation();
			
			StyledText text= viewer.getTextWidget();