private void refreshProposalSize() {
   if (contentProposalAdapter != null) {
     Rectangle maxSize =
         new Rectangle(0, 0, MAX_WIDTH_PROPOSAL_STYLED_TEXT, MAX_HEIGHT_PROPOSAL_STYLED_TEXT);
     Rectangle boundsStyledText = StyledTextHandler.this.getStyledText().getBounds();
     Rectangle intersect = boundsStyledText.intersection(maxSize);
     Point sizeProposal = new Point(intersect.width, intersect.height);
     contentProposalAdapter.setPopupSize(sizeProposal);
   }
 }