use of org.kie.workbench.common.services.datamodeller.core.AnnotationDefinition in project kie-wb-common by kiegroup.
the class AdvancedAnnotationListEditor method onClearValuePair.
protected void onClearValuePair(Annotation annotation, String valuePair) {
AnnotationDefinition annotationDefinition = annotation.getAnnotationDefinition();
AnnotationValuePairDefinition valuePairDefinition = annotationDefinition.getValuePair(valuePair);
if (valuePairDefinition.getDefaultValue() == null) {
// if the value pair has no default value, it should be applied wherever the annotation is applied, if not
// the resulting code won't compile.
String message = Constants.INSTANCE.advanced_domain_annotation_list_editor_message_value_pair_has_no_default_value(valuePair, annotation.getClassName());
view.showYesNoDialog(message, getNoActionCommand());
} else if (clearValuePairHandler != null) {
clearValuePairHandler.onClearValuePair(annotation, valuePair);
}
}
Aggregations