下面列出了怎么用org.eclipse.jface.text.IInformationControlExtension3的API类实例代码及写法,或者点击链接到github查看源代码。
protected Point computeSizeConstraints(Control subjectControl, IInformationControl informationControl)
{
// at least as big as the proposal table
Point sizeConstraint = super.computeSizeConstraints(subjectControl, informationControl);
Point size = subjectControl.getShell().getSize();
// AbstractInformationControlManager#internalShowInformationControl(Rectangle, Object) adds trims
// to the computed constraints. Need to remove them here, to make the outer bounds of the additional
// info shell fit the bounds of the proposal shell:
if (fInformationControl instanceof IInformationControlExtension3)
{
Rectangle shellTrim = ((IInformationControlExtension3) fInformationControl).computeTrim();
size.x -= shellTrim.width;
size.y -= shellTrim.height;
}
if (sizeConstraint.x < size.x)
{
sizeConstraint.x = size.x;
}
if (sizeConstraint.y < size.y)
{
sizeConstraint.y = size.y;
}
sizeConstraint.y = 450;
return sizeConstraint;
}