Skip to content
Snippets Groups Projects
Commit 625b9006 authored by Tóth Miklós Tibor's avatar Tóth Miklós Tibor :shrug:
Browse files

skipdep

parent 77aee062
No related branches found
No related tags found
No related merge requests found
Pipeline #6380 passed
...@@ -54,6 +54,8 @@ func genPlantUMLStr(classes map[string]*Class) { ...@@ -54,6 +54,8 @@ func genPlantUMLStr(classes map[string]*Class) {
output.WriteString(fmt.Sprintln("skinparam classAttributeIconSize 0")) output.WriteString(fmt.Sprintln("skinparam classAttributeIconSize 0"))
output.WriteString(fmt.Sprintln("set namespaceSeparator none")) output.WriteString(fmt.Sprintln("set namespaceSeparator none"))
skipDep := make(map[string][]string)
for _, c := range classes { for _, c := range classes {
after := "" after := ""
if c.Superclass.realClass != nil { if c.Superclass.realClass != nil {
...@@ -117,10 +119,18 @@ func genPlantUMLStr(classes map[string]*Class) { ...@@ -117,10 +119,18 @@ func genPlantUMLStr(classes map[string]*Class) {
for _, a := range c.Annotations { for _, a := range c.Annotations {
if a.TypeName == "Docs" { if a.TypeName == "Docs" {
for _, e := range a.Elements { for _, e := range a.Elements {
e.Value = unescape(e.Value)
switch e.QualifiedName { switch e.QualifiedName {
case "projlab.Docs.uml": case "projlab.Docs.uml":
e.Value = unescape(e.Value)
output.WriteString(fmt.Sprintln(e.Value)) output.WriteString(fmt.Sprintln(e.Value))
case "projlab.Docs.skipdep":
prevDep := skipDep[c.Name]
parts := strings.Split(e.Value, ",")
for _, p := range parts {
p = strings.TrimSpace(p)
prevDep = append(prevDep, p)
}
skipDep[c.Name] = prevDep
} }
} }
} }
...@@ -144,6 +154,9 @@ func genPlantUMLStr(classes map[string]*Class) { ...@@ -144,6 +154,9 @@ func genPlantUMLStr(classes map[string]*Class) {
for _, c := range classes { for _, c := range classes {
deps := make([]string, 0) deps := make([]string, 0)
for _, d := range skipDep[c.Name] {
skip[d] = append(skip[d], c.Name)
}
hasdep := func(dep string) bool { hasdep := func(dep string) bool {
for _, d := range deps { for _, d := range deps {
if d == dep { if d == dep {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment