Added initial support for directory based packages in class diagrams

This commit is contained in:
Bartek Kryza
2023-05-21 11:55:41 +02:00
parent bca1162b16
commit 01c791e6a1
27 changed files with 399 additions and 87 deletions

View File

@@ -550,8 +550,7 @@ common::id_t generator::generate_participant(
nlohmann::json j = function_participant;
j["name"] = util::path_to_url(
std::filesystem::relative(function_participant.file(),
std::filesystem::canonical(m_config.relative_to()).string()));
m_config.make_path_relative(function_participant.file()).string());
participant_id = common::to_id(function_participant.file_relative());

View File

@@ -329,11 +329,8 @@ void generator::generate_participant(
if (is_participant_generated(file_id))
return;
const auto &relative_to =
std::filesystem::canonical(m_config.relative_to());
auto participant_name = util::path_to_url(std::filesystem::relative(
std::filesystem::path{file_path}, relative_to)
std::filesystem::path{file_path}, m_config.root_directory())
.string());
ostr << "participant \"" << render_name(participant_name) << "\" as "