Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteicher2006-05-26 13:23:31 +0000
committerteicher2006-05-26 13:23:31 +0000
commitc17bb5c5014ae667d3e3c5e429e4b3993f64f369 (patch)
treed400f33058d02a132db6176f1be0b0271b77e749
parentb130cccfc952115482036ff247a1ce8ac0a18a55 (diff)
downloadeclipse.platform.text-c17bb5c5014ae667d3e3c5e429e4b3993f64f369.tar.gz
eclipse.platform.text-c17bb5c5014ae667d3e3c5e429e4b3993f64f369.tar.xz
eclipse.platform.text-c17bb5c5014ae667d3e3c5e429e4b3993f64f369.zip
135381 [content assist] On multiple monitors, content assist can open windows which are partially off-screen
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java4
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java
index 30f12cd96..c246989fc 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java
@@ -785,7 +785,7 @@ abstract public class AbstractInformationControlManager {
*/
protected Point computeInformationControlLocation(Rectangle subjectArea, Point controlSize) {
- Rectangle displayBounds= fSubjectControl.getDisplay().getClientArea();
+ Rectangle displayBounds= fSubjectControl.getMonitor().getClientArea();
Point upperLeft;
Anchor testAnchor= fAnchor;
@@ -901,7 +901,7 @@ abstract public class AbstractInformationControlManager {
informationControl.setLocation(location);
- Rectangle displayBounds= fSubjectControl.getDisplay().getClientArea();
+ Rectangle displayBounds= fSubjectControl.getMonitor().getClientArea();
// Make sure it fits on the screen
boolean resize= false;
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java
index 194bc44d0..cf0561835 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java
@@ -570,7 +570,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt
location= fContentAssistSubjectControlAdapter.getControl().toDisplay(location);
Rectangle shellBounds= shell.getBounds();
- Rectangle displayBounds= shell.getDisplay().getClientArea();
+ Rectangle displayBounds= shell.getMonitor().getClientArea();
location.y= location.y - shellBounds.height;
@@ -587,7 +587,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt
location= fContentAssistSubjectControlAdapter.getControl().toDisplay(location);
Rectangle shellBounds= shell.getBounds();
- Rectangle displayBounds= shell.getDisplay().getClientArea();
+ Rectangle displayBounds= shell.getMonitor().getClientArea();
location.y= location.y + fContentAssistSubjectControlAdapter.getLineHeight();
shiftHorizontalLocation(location, shellBounds, displayBounds);
@@ -605,7 +605,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt
p= parent.toDisplay(p);
Rectangle shellBounds= shell.getBounds();
- Rectangle displayBounds= shell.getDisplay().getClientArea();
+ Rectangle displayBounds= shell.getMonitor().getClientArea();
shiftHorizontalLocation(p, shellBounds, displayBounds);
shiftVerticalLocation(p, shellBounds, displayBounds);

Back to the top