Bug 41868 Declaration View does not refresh when you change Java-code color preferences
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/SourceView.java
if (codeAssist instanceof ICodeAssist) {
			IJavaElement[] elements= null;
			try {
				ISourceRange range= ((ISourceReference)fCurrentViewInput).getSourceRange();
				elements= ((ICodeAssist)codeAssist).codeSelect(range.getOffset() + getOffsetInUnclippedDocument(textSelection), textSelection.getLength());
			} catch (JavaModelException e) {
				return StructuredSelection.EMPTY;
			}
			if (elements != null && elements.length > 0) {
				return new StructuredSelection(elements[0]);
			} else
				return StructuredSelection.EMPTY;
		}
		return StructuredSelection.EMPTY;
	}
	/**
	 * Computes and returns the offset in the unclipped document
	 * based on the given text selection from the clipped
	 * document.
	 * 
	 * @param textSelection
	 * @return the offest in the unclipped document or <code>-1</code> if the offset cannot be computed
	 */
	private int getOffsetInUnclippedDocument(ITextSelection textSelection) {
		IDocument unclippedDocument= null;
		try {
			unclippedDocument= new Document(((ISourceReference)fCurrentViewInput).getSource());
		} catch (JavaModelException e) {
			return -1;
		}