use of org.obeonetwork.dsl.environment.parts.AttributePropertiesEditionPart in project InformationSystem by ObeoNetwork.
the class AttributeAttributePropertiesEditionComponent method initPart.
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject,
* org.eclipse.emf.ecore.resource.ResourceSet)
*/
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
setInitializing(true);
if (editingPart != null && key == partKey) {
editingPart.setContext(elt, allResource);
final Attribute attribute = (Attribute) elt;
final AttributePropertiesEditionPart attributePart = (AttributePropertiesEditionPart) editingPart;
// init values
if (isAccessible(EnvironmentViewsRepository.Attribute.Properties.name))
attributePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, attribute.getName()));
if (isAccessible(EnvironmentViewsRepository.Attribute.Properties.type)) {
attributePart.initType(EEFUtils.choiceOfValues(attribute, EnvironmentPackage.eINSTANCE.getAttribute_Type()), attribute.getType());
}
if (isAccessible(EnvironmentViewsRepository.Attribute.Properties.multiplicity)) {
attributePart.initMultiplicity(EEFUtils.choiceOfValues(attribute, EnvironmentPackage.eINSTANCE.getProperty_Multiplicity()), attribute.getMultiplicity());
}
if (isAccessible(EnvironmentViewsRepository.Attribute.Properties.identifier)) {
attributePart.setIdentifier(attribute.isIsIdentifier());
}
if (isAccessible(EnvironmentViewsRepository.Attribute.Properties.description))
attributePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, attribute.getDescription()));
// init filters
// Start of user code for additional businessfilters for type
// End of user code
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
Aggregations