}
protected void updateDecoration(ControlDecoration decoration, IStatus status) {
if (status != null) {
Image newImage = null;
FieldDecorationRegistry registry = FieldDecorationRegistry.getDefault();
switch (status.getSeverity()) {
case IStatus.INFO:
newImage = registry.getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED).getImage();
break;
case IStatus.WARNING:
newImage = registry.getFieldDecoration(FieldDecorationRegistry.DEC_WARNING).getImage();
break;
case IStatus.ERROR:
newImage = registry.getFieldDecoration(FieldDecorationRegistry.DEC_ERROR).getImage();
}
decoration.setDescriptionText(status.getMessage());
decoration.setImage(newImage);
decoration.show();
} else {