Refactoring sequence diagrams test cases (#266)

This commit is contained in:
Bartek Kryza
2024-05-16 21:58:45 +02:00
parent 5d69f5063a
commit 7c1e0420c6
49 changed files with 2807 additions and 1576 deletions

View File

@@ -248,7 +248,7 @@ void generator::generate(const class_ &c, nlohmann::json &parent) const
{
nlohmann::json object = c;
// Perform config dependent postprocessing on generated class;
// Perform config dependent postprocessing on generated class
if (!config().generate_fully_qualified_name())
object["display_name"] =
common::generators::json::render_name(c.full_name_no_ns());

View File

@@ -286,6 +286,8 @@ void generator::process_call_message(
else
LOG_DBG("Skipping activity {} --> {} - missing sequence {}", m.from(),
m.to(), m.to());
visited.pop_back();
}
void generator::process_while_message(const message &m) const
@@ -816,6 +818,14 @@ void generator::generate_diagram(nlohmann::json &parent) const
}
}
// Perform config dependent postprocessing on generated participants
for (auto &p : json_["participants"]) {
if (p.contains("display_name")) {
p["display_name"] =
config().simplify_template_type(p["display_name"]);
}
}
parent["participants"] = json_["participants"];
}
} // namespace clanguml::sequence_diagram::generators::json