Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jface.text/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jface.text/pom.xml2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java11
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java4
4 files changed, 14 insertions, 5 deletions
diff --git a/org.eclipse.jface.text/META-INF/MANIFEST.MF b/org.eclipse.jface.text/META-INF/MANIFEST.MF
index 50aad0342..e58985b03 100644
--- a/org.eclipse.jface.text/META-INF/MANIFEST.MF
+++ b/org.eclipse.jface.text/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jface.text
-Bundle-Version: 3.15.0.qualifier
+Bundle-Version: 3.15.100.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package:
diff --git a/org.eclipse.jface.text/pom.xml b/org.eclipse.jface.text/pom.xml
index 60b2b67fc..511c0810b 100644
--- a/org.eclipse.jface.text/pom.xml
+++ b/org.eclipse.jface.text/pom.xml
@@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.jface</groupId>
<artifactId>org.eclipse.jface.text</artifactId>
- <version>3.15.0-SNAPSHOT</version>
+ <version>3.15.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
index c60a3ec6f..94ce3d8b8 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
@@ -57,6 +57,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Monitor;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
@@ -81,6 +82,7 @@ import org.eclipse.jface.preference.JFacePreferences;
import org.eclipse.jface.resource.JFaceColors;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.Geometry;
+import org.eclipse.jface.util.Util;
import org.eclipse.jface.viewers.StyledString;
import org.eclipse.jface.text.AbstractInformationControlManager;
@@ -637,10 +639,17 @@ class CompletionProposalPopup implements IContentAssistListener {
fProposalTable.setLayoutData(data);
fProposalShell.setSize(size);
} else {
- int height= fProposalTable.getItemHeight() * 10;
+ int height= fProposalTable.getItemHeight() * 15;
// use golden ratio as default aspect ratio
final double aspectRatio= (1 + Math.sqrt(5)) / 2;
int width= (int) (height * aspectRatio);
+
+ // Make sure our bounds still fit to the screen
+ Monitor monitor= Util.getClosestMonitor(fProposalShell.getDisplay(), getLocation());
+ Rectangle bounds= monitor.getClientArea();
+ width= Math.min(width, bounds.width / 4);
+ height= Math.min(height, bounds.height / 4);
+
Rectangle trim= fProposalTable.computeTrim(0, 0, width, height);
data.heightHint= trim.height;
data.widthHint= trim.width;
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 2e3ed84a7..f4c66bf62 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
@@ -2399,8 +2399,8 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt
}
// Enforce an absolute minimal size
- size.x= Math.max(size.x, 30);
- size.y= Math.max(size.y, 30);
+ size.x= Math.max(size.x, 50);
+ size.y= Math.max(size.y, 50);
}
return size;

Back to the top