/** * {@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 DomainClass domainClass = (DomainClass) elt; final DomainClassPropertiesEditionPart domainClassPart = (DomainClassPropertiesEditionPart) editingPart; // init values if (isAccessible(GraalViewsRepository.DomainClass.Properties.name)) domainClassPart.setName( EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, domainClass.getName())); if (isAccessible(GraalViewsRepository.DomainClass.Properties.superType)) { // init part superTypeSettings = new EObjectFlatComboSettings( domainClass, EnvironmentPackage.eINSTANCE.getStructuredType_Supertype()); domainClassPart.initSuperType(superTypeSettings); // set the button mode domainClassPart.setSuperTypeButtonMode(ButtonsModeEnum.BROWSE); } if (isAccessible(GraalViewsRepository.DomainClass.Properties.description)) domainClassPart.setDescription( EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, domainClass.getDescription())); // init filters // init values for referenced views // init filters for referenced views } setInitializing(false); }
/** * {@inheritDoc} * * @see * org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification) */ public void updatePart(Notification msg) { super.updatePart(msg); if (editingPart.isVisible()) { DomainClassPropertiesEditionPart domainClassPart = (DomainClassPropertiesEditionPart) editingPart; if (EnvironmentPackage.eINSTANCE.getType_Name().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && domainClassPart != null && isAccessible(GraalViewsRepository.DomainClass.Properties.name)) { if (msg.getNewValue() != null) { domainClassPart.setName( EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue())); } else { domainClassPart.setName(""); } } if (EnvironmentPackage.eINSTANCE.getStructuredType_Supertype().equals(msg.getFeature()) && domainClassPart != null && isAccessible(GraalViewsRepository.DomainClass.Properties.superType)) domainClassPart.setSuperType((EObject) msg.getNewValue()); if (EnvironmentPackage.eINSTANCE.getObeoDSMObject_Description().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && domainClassPart != null && isAccessible(GraalViewsRepository.DomainClass.Properties.description)) { if (msg.getNewValue() != null) { domainClassPart.setDescription( EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue())); } else { domainClassPart.setDescription(""); } } } }