Bug 127655 [api] Must have a way to query quick assist context from source viewer
I20060214-0010 [api] Must have a way to query quick assist context from text viewer. In addition, quick assistant install must specify that besides ITextViewer also ITextViewerExtension7 must be present in order to get the invocation context. ==> assertion failure if this is not met.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/PropertiesFileCorrectionAssistant.java
return Math.max(invocationOffset, newOffset);
	}
	/*
	 * @see org.eclipse.jface.text.contentassist.ContentAssistant#possibleCompletionsClosed()
	 */
	protected void possibleCompletionsClosed() {
		super.possibleCompletionsClosed();
		restorePosition();
	}
	private void storePosition() {
		int initalOffset= fViewer.getSelectedRange().x;
		int length= fViewer.getSelectedRange().y;
		fPosition= new Position(initalOffset, length);
	}
	private void restorePosition() {
		if (fPosition != null && !fPosition.isDeleted() && fViewer.getDocument() != null) {
			fViewer.setSelectedRange(fPosition.offset, fPosition.length);
			fViewer.revealRange(fPosition.offset, fPosition.length);
		}
		fPosition= null;
	}
	/**
	 * Returns true if the last invoked completion was called with an updated offset.
	 */
	public boolean isUpdatedOffset() {
		return fPosition != null;
	}
	
}