use of org.obeonetwork.dsl.typeslibrary.NativeTypeKind in project InformationSystem by ObeoNetwork.
the class CustomColumnPropertiesEditionComponent method updateTypeFieldsVisibility.
private void updateTypeFieldsVisibility(Column column, ColumnPropertiesEditionPart basePart) {
if (column.getType() instanceof TypeInstance) {
TypeInstance typeInstance = (TypeInstance) column.getType();
if (typeInstance.getNativeType() != null) {
NativeTypeKind nativeTypeKind = typeInstance.getNativeType().getSpec();
boolean lengthVisible = (nativeTypeKind == NativeTypeKind.LENGTH || nativeTypeKind == NativeTypeKind.LENGTH_AND_PRECISION);
boolean precisionVisible = (nativeTypeKind == NativeTypeKind.LENGTH_AND_PRECISION);
boolean literalsVisible = (nativeTypeKind == NativeTypeKind.ENUM);
basePart.updateTypeFields(lengthVisible, precisionVisible, literalsVisible);
}
}
}
use of org.obeonetwork.dsl.typeslibrary.NativeTypeKind in project InformationSystem by ObeoNetwork.
the class CustomTypeInstancePropertiesEditionComponent method updateTypeFieldsVisibility.
private void updateTypeFieldsVisibility(TypeInstance typeInstance, TypeInstancePropertiesEditionPart basePart) {
if (typeInstance.getNativeType() != null) {
NativeTypeKind nativeTypeKind = typeInstance.getNativeType().getSpec();
boolean lengthVisible = (nativeTypeKind == NativeTypeKind.LENGTH || nativeTypeKind == NativeTypeKind.LENGTH_AND_PRECISION);
boolean precisionVisible = (nativeTypeKind == NativeTypeKind.LENGTH_AND_PRECISION);
boolean literalsVisible = (nativeTypeKind == NativeTypeKind.ENUM);
basePart.updateTypeFields(lengthVisible, precisionVisible, literalsVisible);
}
}
Aggregations