pierre3 / PlantUmlClassDiagramGenerator

This is a generator to create a class-diagram of PlantUML from the C# source code.
MIT License
654 stars 129 forks source link

Generating an invalid puml due to the @ prefix #32

Closed shiena closed 3 years ago

shiena commented 3 years ago

steps to reproduce:

  1. Prepare the source file including the @ prefix

    @startuml
    class @ClassA{
            public @IList<@string> @Strings{get;} = new @List<@string>();
                public @Type1 @Prop1{get;set;}
                    public @Type2 @field1;
    }
    
    class @Type1 {
            public @int @value1{get;set;}
    }
    
    class @Type2{
            public @string @string1{get;set;}
                public @ExternalType @Prop2 {get;set;}
    }
    @enduml
  2. Generating .puml with puml-gen

    $ puml-gen .\input.cs -createAssociation
    @startuml
    class @ClassA {
    }
    class @Type1 {
    }
    class @Type2 {
    }
    class "@IList`1"<T> {
    }
    @ClassA o-> "@Strings<@string>" "@IList`1"
    @ClassA --> "@Prop1" @Type1
    @ClassA --> "@field1" @Type2
    @Type1 --> "@value1" @int
    @Type2 --> "@string1" @string
    @Type2 --> "@Prop2" @ExternalType
    @enduml
  3. Generating .png with plantuml

    plantuml input.puml
  4. The generated .puml contains an error

    Error line 10 in file: input.puml
    Some diagram description contains errors