use of org.obeonetwork.dsl.typeslibrary.parts.TypeInstancePropertiesEditionPart in project InformationSystem by ObeoNetwork.
the class CustomTypeInstancePropertiesEditionComponent 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) {
super.initPart(key, kind, elt, allResource);
setInitializing(true);
if (editingPart != null && key == partKey) {
editingPart.setContext(elt, allResource);
final TypeInstancePropertiesEditionPart basePart = (TypeInstancePropertiesEditionPart) editingPart;
updateTypeFieldsVisibility((TypeInstance) elt, basePart);
}
setInitializing(false);
}
use of org.obeonetwork.dsl.typeslibrary.parts.TypeInstancePropertiesEditionPart in project InformationSystem by ObeoNetwork.
the class TypeInstancePropertiesEditionComponent 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 TypeInstance typeInstance = (TypeInstance) elt;
final TypeInstancePropertiesEditionPart typeInstancePart = (TypeInstancePropertiesEditionPart) editingPart;
// init values
if (isAccessible(TypeslibraryViewsRepository.TypeInstance.Properties.type)) {
typeInstancePart.initType(EEFUtils.choiceOfValues(typeInstance, TypesLibraryPackage.eINSTANCE.getTypeInstance_NativeType()), typeInstance.getNativeType());
}
if (isAccessible(TypeslibraryViewsRepository.TypeInstance.Properties.TypeAttributes.length))
typeInstancePart.setLength(EEFConverterUtil.convertToString(EcorePackage.Literals.EINTEGER_OBJECT, typeInstance.getLength()));
if (isAccessible(TypeslibraryViewsRepository.TypeInstance.Properties.TypeAttributes.precision))
typeInstancePart.setPrecision(EEFConverterUtil.convertToString(EcorePackage.Literals.EINTEGER_OBJECT, typeInstance.getPrecision()));
if (isAccessible(TypeslibraryViewsRepository.TypeInstance.Properties.literals))
typeInstancePart.setLiterals(typeInstance.getLiterals());
// 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