use of org.kie.workbench.common.screens.datamodeller.client.command.DataModelCommand in project kie-wb-common by kiegroup.
the class MainDataObjectFieldEditor method onDescriptionChange.
@Override
public void onDescriptionChange() {
if (getObjectField() != null) {
String value = DataModelerUtils.nullTrim(view.getDescription());
DataModelCommand command = commandBuilder.buildFieldAnnotationValueChangeCommand(getContext(), getName(), getDataObject(), getObjectField(), MainDomainAnnotations.DESCRIPTION_ANNOTATION, MainDomainAnnotations.VALUE_PARAM, value, true);
command.execute();
}
}
use of org.kie.workbench.common.screens.datamodeller.client.command.DataModelCommand in project kie-wb-common by kiegroup.
the class MainDataObjectEditor method onLabelChange.
@Override
public void onLabelChange() {
if (getDataObject() != null) {
String value = DataModelerUtils.nullTrim(view.getLabel());
DataModelCommand command = commandBuilder.buildDataObjectAnnotationValueChangeCommand(getContext(), getName(), getDataObject(), MainDomainAnnotations.LABEL_ANNOTATION, "value", value, true);
command.execute();
}
}
use of org.kie.workbench.common.screens.datamodeller.client.command.DataModelCommand in project kie-wb-common by kiegroup.
the class MainDataObjectFieldEditor method doTypeChange.
private void doTypeChange(String newType, boolean isMultiple) {
if (getObjectField() != null) {
boolean multiple = isMultiple;
if (getContext().getHelper().isPrimitiveType(newType)) {
view.setMultipleTypeEnabled(false);
view.setMultipleType(false);
multiple = false;
} else {
view.setMultipleTypeEnabled(true);
}
DataModelCommand command = commandBuilder.buildChangeTypeCommand(getContext(), getName(), getDataObject(), getObjectField(), newType, multiple);
command.execute();
executePostCommandProcessing(command);
}
}
Aggregations