Bug 64129 Highlight method exit points fail
When the return type is primitive like int or void, this function works well. But if the return type is a class, like Vector, my Eclipse 3M9 just highlights all the occurrences of "Vector" in the file. This function should be smarter.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
if (i == 0)
				segments[j++]= 0;
				
			int offset= segment.getOffset() - lineOffset;
			if (offset > segments[j - 1])
				segments[j++]= offset;
				
			if (offset + segment.getLength() >= line.getLength())
				break;
				
			segments[j++]= offset + segment.getLength();
		}
		
		if (j < segments.length) {
			int[] result= new int[j];
			System.arraycopy(segments, 0, result, 0, j);
			segments= result;
		}
		
		return segments;
	}
		
	/**
	 * Returns a segmentation of the given line appropriate for bidi rendering. The default
	 * implementation returns only the string literals of a java code line as segments.
	 * 
	 * @param widgetLineOffset the offset of the line
	 * @param line the content of the line
	 * @return the line's bidi segmentation
	 */