use of org.obeonetwork.dsl.soa.parts.ParameterPropertiesEditionPart in project InformationSystem by ObeoNetwork.
the class ParameterParameterPropertiesEditionComponent 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 Parameter parameter = (Parameter) elt;
final ParameterPropertiesEditionPart parameterPart = (ParameterPropertiesEditionPart) editingPart;
// init values
if (isAccessible(SoaViewsRepository.Parameter.Properties.name))
parameterPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, parameter.getName()));
if (isAccessible(SoaViewsRepository.Parameter.Properties.multiplicity)) {
parameterPart.initMultiplicity(EEFUtils.choiceOfValues(parameter, SoaPackage.eINSTANCE.getParameter_Multiplicity()), parameter.getMultiplicity());
}
if (isAccessible(SoaViewsRepository.Parameter.Properties.isUnique)) {
parameterPart.setIsUnique(parameter.isIsUnique());
}
if (isAccessible(SoaViewsRepository.Parameter.Properties.isOrdered)) {
parameterPart.setIsOrdered(parameter.isIsOrdered());
}
if (isAccessible(SoaViewsRepository.Parameter.Properties.type)) {
// init part
typeSettings = new EObjectFlatComboSettings(parameter, SoaPackage.eINSTANCE.getParameter_Type());
parameterPart.initType(typeSettings);
// set the button mode
parameterPart.setTypeButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(SoaViewsRepository.Parameter.Properties.description))
parameterPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, parameter.getDescription()));
// init filters
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
Aggregations