/** * {@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 ProcessComponent processComponent = (ProcessComponent) elt; final ProcessComponentPropertiesEditionPart basePart = (ProcessComponentPropertiesEditionPart) editingPart; // init values if (processComponent.getName() != null && isAccessible(SpemViewsRepository.ProcessComponent.Properties.name)) basePart.setName( EEFConverterUtil.convertToString( EcorePackage.eINSTANCE.getEString(), processComponent.getName())); if (isAccessible(SpemViewsRepository.ProcessComponent.Properties.ownedProcessMember)) { ownedProcessMemberSettings = new ReferencesTableSettings( processComponent, SpemPackage.eINSTANCE.getProcessPackage_OwnedProcessMember()); basePart.initOwnedProcessMember(ownedProcessMemberSettings); } // init filters basePart.addFilterToOwnedProcessMember( new ViewerFilter() { /** * {@inheritDoc} * * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, * java.lang.Object, java.lang.Object) */ public boolean select(Viewer viewer, Object parentElement, Object element) { return (element instanceof String && element.equals("")) || (element instanceof ProcessPackageableElement); // $NON-NLS-1$ } }); // Start of user code for additional businessfilters for ownedProcessMember // End of user code // 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) { if (editingPart.isVisible()) { ProcessComponentPropertiesEditionPart basePart = (ProcessComponentPropertiesEditionPart) editingPart; if (SpemPackage.eINSTANCE.getProcessPackageableElement_Name().equals(msg.getFeature()) && basePart != null && isAccessible(SpemViewsRepository.ProcessComponent.Properties.name)) { if (msg.getNewValue() != null) { basePart.setName( EcoreUtil.convertToString(EcorePackage.eINSTANCE.getEString(), msg.getNewValue())); } else { basePart.setName(""); } } if (SpemPackage.eINSTANCE.getProcessPackage_OwnedProcessMember().equals(msg.getFeature()) && isAccessible(SpemViewsRepository.ProcessComponent.Properties.ownedProcessMember)) basePart.updateOwnedProcessMember(); } }