the infrastructure manages hint position pretty well, no need to do it manually (the cause of IDEA-90637)

This commit is contained in:
peter
2012-09-05 11:57:26 +02:00
parent 95b60b7080
commit 08a95a4d58
@@ -249,11 +249,6 @@ public class ShowParameterInfoContext implements CreateParameterInfoContext {
}
else {
Point p = HintManagerImpl.getHintPosition(hint, myEditor, pos, HintManager.ABOVE);
Dimension hintSize = hint.getComponent().getPreferredSize();
JComponent editorComponent = myEditor.getComponent();
JLayeredPane layeredPane = editorComponent.getRootPane().getLayeredPane();
p.x = Math.min(p.x, layeredPane.getWidth() - hintSize.width);
p.x = Math.max(p.x, 0);
position = new Pair<Point, Short>(p, HintManager.ABOVE);
}
previousBestPoint = position.getFirst();