@Override protected void handleNotificationEvent(Notification notification) { super.handleNotificationEvent(notification); if ((notification.getEventType() == Notification.SET) && (notification.getNotifier() instanceof org.ow2.aspirerfid.ide.bpwme.impl.EBProcImpl)) { EBProcImpl epi = (EBProcImpl) notification.getNotifier(); EAttributeImpl ei = (EAttributeImpl) notification.getFeature(); MainControl mc = MainControl.getMainControl(); org.ow2.aspirerfid.commons.apdl.model.EBProc ebproc = (org.ow2.aspirerfid.commons.apdl.model.EBProc) mc.getMapObject(epi.hashCode()); EPCISMasterDataDocumentType doc = MasterDataUtil.getEPCISMasterDataDocument(ebproc); VocabularyElementType vocabularyElement = MasterDataUtil.getEBProcVocabularyElement(doc); if (ei.getName().equals("id")) { ebproc.setId(notification.getNewStringValue()); MasterDataUtil.setVocabularyElementID(vocabularyElement, notification.getNewStringValue()); } else if (ei.getName().equals("name")) { ebproc.setName(notification.getNewStringValue()); MasterDataUtil.setVocabularyElementAttribute( vocabularyElement, "urn:epcglobal:epcis:mda:event_name", notification.getNewStringValue()); } else if (ei.getName().equals("description")) { ebproc.setDescription(notification.getNewStringValue()); } else { return; } mc.saveObject(); } }
/** @generated */ @Override protected void handleNotificationEvent(Notification notification) { super.handleNotificationEvent(notification); if (notification.getNotifier() instanceof de.uni_mannheim.informatik.swt.models.plm.PLM.Feature && ((EStructuralFeature) notification.getFeature()).getName().equals("expressed")) { IGraphicalEditPart parent = (IGraphicalEditPart) getParent(); de.uni_mannheim.informatik.swt.models.plm.PLM.Element self = (de.uni_mannheim.informatik.swt.models.plm.PLM.Element) resolveSemanticElement(); // Check is visible if (parent.resolveSemanticElement() instanceof de.uni_mannheim.informatik.swt.models.plm.PLM.Context) { de.uni_mannheim.informatik.swt.models.plm.PLM.Context container = (de.uni_mannheim.informatik.swt.models.plm.PLM.Context) parent.resolveSemanticElement(); if ((container.getOrigin().equalsIgnoreCase("computed") && self.isExpressed()) || (container.getOrigin().equalsIgnoreCase("expressed") && !self.isExpressed())) { getNotationView().setVisible(false); } } else { getNotationView().setVisible(true); } de.uni_mannheim.informatik.swt.models.plm.PLM.Feature f = (de.uni_mannheim.informatik.swt.models.plm.PLM.Feature) resolveSemanticElement(); if (f.isExpressed()) { ((org.eclipse.gmf.runtime.notation.Shape) this.getNotationView()).setItalic(false); ((org.eclipse.gmf.runtime.notation.Shape) this.getNotationView()).setFontColor(0); } else { ((org.eclipse.gmf.runtime.notation.Shape) this.getNotationView()).setItalic(true); ((org.eclipse.gmf.runtime.notation.Shape) this.getNotationView()) .setFontColor(FigureUtilities.colorToInteger(DiagramColorConstants.diagramGray)); } } }
/** @generated */ protected void handleNotificationEvent(Notification event) { if (event.getNotifier() == getModel() && EcorePackage.eINSTANCE.getEModelElement_EAnnotations().equals(event.getFeature())) { handleMajorSemanticChange(); } else { super.handleNotificationEvent(event); } }