* Updates the text and tooltip of the placeholder label.
* @param polymorphicVarContext used for toString'ing the argument TypeExpr
*/
public void refreshDisplay(PolymorphicVarContext polymorphicVarContext) {
TypeExpr leastConstrainedType = valueEntryPanel.getContext().getLeastConstrainedTypeExpr();
TypeExpr actualType = valueEntryPanel.getValueNode().getTypeExpr();
// Show the more specialized of the two types..
if (actualType instanceof TypeVar) {
placeHolderLabel.setText(leastConstrainedType.toString(polymorphicVarContext, namingPolicy));
} else {
placeHolderLabel.setText(actualType.toString(polymorphicVarContext, namingPolicy));
}
if (getBorder() instanceof LineBorder) {
setBorder(BorderFactory.createLineBorder(valueEntryPanel.getBackground(), 1));
}