protected void updateStereotypeText() { MModelElement me = (MModelElement) getOwner(); if (me == null) return; MStereotype stereo = me.getStereotype(); if (stereo == null || stereo.getName() == null || stereo.getName().length() == 0) _stereo.setText(""); else { _stereo.setText(Notation.generateStereotype(this, stereo)); } }
public synchronized void createModelUUIDS(MNamespace model) { cat.info("NOTE: The temporary method 'createModelUUIDs' has been called."); Collection ownedElements = model.getOwnedElements(); Iterator oeIterator = ownedElements.iterator(); String uuid = model.getUUID(); if (uuid == null) model.setUUID(getNewUUID()); while (oeIterator.hasNext()) { MModelElement me = (MModelElement) oeIterator.next(); if (me instanceof MModel || // me instanceof MNamespace || me instanceof MClassifier || me instanceof MFeature || me instanceof MStateVertex || me instanceof MStateMachine || me instanceof MTransition || me instanceof MCollaboration || me instanceof MMessage || me instanceof MAssociation || me instanceof MAssociationEnd || me instanceof MGeneralization || me instanceof MDependency || me instanceof MStereotype || me instanceof MUseCase) { uuid = me.getUUID(); if (uuid == null) { me.setUUID(getNewUUID()); } } // recursive handling of namespaces, needed for Collaborations if (me instanceof MNamespace) { cat.debug("Found another namespace: " + me); createModelUUIDS((MNamespace) me); } } }