Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteicher2006-07-20 14:51:29 +0000
committerteicher2006-07-20 14:51:29 +0000
commitccea4a88f84e56ba19cac80ccd17ff7fa903e625 (patch)
treed301da990cc25e67b57624228d0b066f9a644416 /org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java
parent254eba9d52b6b8a5eb41c7b23342a520a8533361 (diff)
downloadeclipse.platform.text-ccea4a88f84e56ba19cac80ccd17ff7fa903e625.tar.gz
eclipse.platform.text-ccea4a88f84e56ba19cac80ccd17ff7fa903e625.tar.xz
eclipse.platform.text-ccea4a88f84e56ba19cac80ccd17ff7fa903e625.zip
151063 IAE in ContentAssistSubjectControlAdapter.getLocationAtOffset
Diffstat (limited to 'org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java')
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java
index 7da996e1c01..2dda440544e 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java
@@ -428,7 +428,7 @@ class ContextInformationPopup implements IContentAssistListener {
/**
* Resizes the context information popup.
*
- * @param offset the caret offset
+ * @param offset the caret offset in widget coordinates
* @since 2.0
*/
private void resize(int offset) {
@@ -813,8 +813,9 @@ class ContextInformationPopup implements IContentAssistListener {
if (top.fValidator == null || !top.fValidator.isContextInformationValid(offset)) {
hideContextInfoPopup(); // loop variant: reduces the number of contexts on the stack
} else if (top.fPresenter != null && top.fPresenter.updatePresentation(offset, fTextPresentation)) {
+ int widgetOffset= fContentAssistSubjectControlAdapter.getWidgetSelectionRange().x;
TextPresentation.applyTextPresentation(fTextPresentation, fContextInfoText);
- resize(offset);
+ resize(widgetOffset);
break;
} else
break;

Back to the top