void MetaPlugin::changeElement(const QString &diagramName, const QString &element, const QString &elementDisplayName, ElementImpl* impl, QDomElement elementForIcon) { QString normalizedName = NameNormalizer::normalize(getQualifiedName(diagramName, element)); mElementsNameMap[diagramName][normalizedName] = elementDisplayName; mGraphicalObjects[diagramName][normalizedName] = dynamic_cast<MetaElementImpl*>(impl); mIconMap[diagramName][normalizedName] = elementForIcon; }
// Returns qualified names of symbols with any of IDs in the index. std::vector<std::string> lookup(const SymbolIndex &I, ArrayRef<SymbolID> IDs) { LookupRequest Req; Req.IDs.insert(IDs.begin(), IDs.end()); std::vector<std::string> Results; I.lookup(Req, [&](const Symbol &Sym) { Results.push_back(getQualifiedName(Sym)); }); return Results; }
void MetaPlugin::addElement(const QString &diagramName, const QString &element, const QString &elementDisplayName, ElementImpl* impl, QDomElement elementForIcon) { QString normalizedName = NameNormalizer::normalize(getQualifiedName(diagramName, element)); if (mElementsNameMap[diagramName].contains(normalizedName)) mElementsNameMap[diagramName].insert(normalizedName + "Copy", elementDisplayName + "Copy"); else mElementsNameMap[diagramName].insert(normalizedName, elementDisplayName); mGraphicalObjects[diagramName].insert(normalizedName, dynamic_cast<MetaElementImpl*>(impl)); mIconMap[diagramName].insert(normalizedName, elementForIcon); }
void MetaPlugin::addProperty(const QString &diagramName, const QString &element, const QString &property, const QString &defaultValue) { QString normalizedName = NameNormalizer::normalize(getQualifiedName(diagramName, element)); if (mPropertiesDescriptionMap[diagramName].contains(normalizedName)) { mPropertiesDescriptionMap[diagramName][normalizedName].insert(property, defaultValue); mPropertyDefault[normalizedName].insert(property, defaultValue); } else { QMap<QString, QString> map; map.insert(property, defaultValue); mPropertiesDescriptionMap[diagramName].insert(normalizedName, map); mPropertyDefault.insert(normalizedName, map); } }
String Attribute::getStringValue() const { return getQualifiedName() + "=" + getQuotedValue(); }