public override bool matches(Node node) { if (!base.matches(node)) { return(false); } ModelElementInstance modelElement = ModelUtil.getModelElement(new DomElementImpl((Element)node), model); return(type.IsAssignableFrom(modelElement.GetType())); }
/// <summary> /// Set unique identifier if the type has a String id attribute /// </summary> /// <param name="type"> the type of the model element </param> /// <param name="modelElementInstance"> the model element instance to set the id </param> /// <param name="withReferenceUpdate"> true to update id references in other elements, false otherwise </param> public static void setGeneratedUniqueIdentifier(ModelElementType type, ModelElementInstance modelElementInstance, bool withReferenceUpdate) { setNewIdentifier(type, modelElementInstance, ModelUtil.getUniqueIdentifier(type), withReferenceUpdate); }