/** * {@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()) { NotesPropertiesEditionPart notesPart = (NotesPropertiesEditionPart) editingPart; if (SACMPackage.eINSTANCE.getModelElement_TaggedValue().equals(msg.getFeature()) && isAccessible(EvidenceViewsRepository.Notes.Properties.taggedValue)) notesPart.updateTaggedValue(); if (SACMPackage.eINSTANCE.getModelElement_Annotation().equals(msg.getFeature()) && isAccessible(EvidenceViewsRepository.Notes.Properties.annotation)) notesPart.updateAnnotation(); } }
/** * {@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 Refutes refutes = (Refutes) elt; final NotesPropertiesEditionPart notesPart = (NotesPropertiesEditionPart) editingPart; // init values if (isAccessible(EvidenceViewsRepository.Notes.Properties.taggedValue)) { taggedValueSettings = new ReferencesTableSettings( refutes, SACMPackage.eINSTANCE.getModelElement_TaggedValue()); notesPart.initTaggedValue(taggedValueSettings); } if (isAccessible(EvidenceViewsRepository.Notes.Properties.annotation)) { annotationSettings = new ReferencesTableSettings( refutes, SACMPackage.eINSTANCE.getModelElement_Annotation()); notesPart.initAnnotation(annotationSettings); } // init filters if (isAccessible(EvidenceViewsRepository.Notes.Properties.taggedValue)) { notesPart.addFilterToTaggedValue( 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 TaggedValue); // $NON-NLS-1$ } }); // Start of user code for additional businessfilters for taggedValue // End of user code } if (isAccessible(EvidenceViewsRepository.Notes.Properties.annotation)) { notesPart.addFilterToAnnotation( 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 Annotation); // $NON-NLS-1$ } }); // Start of user code for additional businessfilters for annotation // End of user code } // init values for referenced views // init filters for referenced views } setInitializing(false); }