From 61bd36408e483195d645f329db1e7b71e4ebe97d Mon Sep 17 00:00:00 2001 From: Halil Sen Date: Fri, 9 Sep 2022 12:08:31 +0200 Subject: [PATCH 1/2] Qual: order string arguments --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 3e8ca1c..95b99b6 100644 --- a/main.go +++ b/main.go @@ -1395,13 +1395,13 @@ func applyToAllFilesFromList(listfilename string, selection string) { const configDefaultName = "config.json" var ( + g_action = flag.String("action", "", "Custom action to run upon completion (overwrites config.locations.action)") g_configPath = flag.String("config", configDefaultName, "Location and name of the configuration file") + g_grpc = flag.String("grpc", "", "Port to listen, e.g. :50051") g_logPath = flag.String("log", "", "Location and name of the debug log file") - g_source = flag.String("src", "", "Location and name of the source file (required)") - g_selection = flag.String("select", "", "Name(s) of the selected elements") g_output = flag.String("output", "", "Name of the output file") - g_grpc = flag.String("grpc", "", "Port to listen, e.g. :50051") - g_action = flag.String("action", "", "custom action to run upon completion (overwrites config.locations.action)") + g_selection = flag.String("select", "", "Name(s) of the selected elements") + g_source = flag.String("src", "", "Location and name of the source file (required)") ) //====================================================================================================================== From 96276700a53e7e07f6ae75417350ab261f351969 Mon Sep 17 00:00:00 2001 From: Halil Sen Date: Fri, 9 Sep 2022 12:09:26 +0200 Subject: [PATCH 2/2] Add: a boolean flag to switch on/off clustering At the moment the user has to use the -select argument to prevent the background clustering (even if they want the complete UML) and they don't have a way to activate clustering if they are selecting the elements they want to show in the UML. This flag lets the user swtich on/off the clustering background in all cases. It is on by default (which is the current default behavior for complete UML generation). --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 95b99b6..7cdeac9 100644 --- a/main.go +++ b/main.go @@ -448,7 +448,7 @@ func (pbs *pbstate) showSelectedInclusion(selection string) { backupTypes, backupInclusions := pbs.types237, pbs.inclusions pbs.types237, pbs.inclusions = types, inclusions - pbs.showInclusion(false, true) + pbs.showInclusion(*g_cluster, true) pbs.types237, pbs.inclusions = backupTypes, backupInclusions } @@ -1331,7 +1331,7 @@ func process(pbs *pbstate, name string, selection string) bool { pbs.showSelectedInclusion(selection) } } else { - pbs.showInclusion(true, true) + pbs.showInclusion(*g_cluster, true) } } else { @@ -1395,6 +1395,8 @@ func applyToAllFilesFromList(listfilename string, selection string) { const configDefaultName = "config.json" var ( + g_cluster = flag.Bool("cluster", true, "Cluster elements from the same package together") + g_action = flag.String("action", "", "Custom action to run upon completion (overwrites config.locations.action)") g_configPath = flag.String("config", configDefaultName, "Location and name of the configuration file") g_grpc = flag.String("grpc", "", "Port to listen, e.g. :50051")