/** * {@inheritDoc} * * @see * org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#getPropertiesEditionObject() */ public EObject getPropertiesEditionObject(EObject source) { if (source instanceof Talk) { Talk talkToUpdate = (Talk) source; talkToUpdate.setPresenter((Person) basePart.getCombo()); talkToUpdate.setPresenter((Person) basePart.getComboRO()); return talkToUpdate; } else return null; }
/** * {@inheritDoc} * * @see * org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Class, * int, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.resource.ResourceSet) */ public void initPart(java.lang.Class key, int kind, EObject elt, ResourceSet allResource) { setInitializing(true); if (basePart != null && key == NonregViewsRepository.Combo.class) { ((IPropertiesEditionPart) basePart).setContext(elt, allResource); final Talk talk = (Talk) elt; // init values basePart.initCombo(allResource, talk.getPresenter()); basePart.initComboRO(allResource, talk.getPresenter()); // init filters basePart.addFilterToCombo( new ViewerFilter() { /* * (non-Javadoc) * * @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 Person); } }); // Start of user code for additional businessfilters for combo // End of user code basePart.addFilterToComboRO( new ViewerFilter() { /* * (non-Javadoc) * * @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 Person); } }); // Start of user code for additional businessfilters for comboRO // End of user code } // init values for referenced views // init filters for referenced views setInitializing(false); }
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#dispose() */ public void dispose() { if (semanticAdapter != null) talk.eAdapters().remove(semanticAdapter); }