bafolts / plantcode

Provides a javascript utility to generate code in various languages given a plantuml class diagram.
https://segmentationfaults.com/plantcode
MIT License
217 stars 42 forks source link

Package is an unknown type #33

Open GillisWerrebrouck opened 3 years ago

GillisWerrebrouck commented 3 years ago

When using the package keyword in a UML, plantcode throws an error.

Example: input:

@startuml
package test1 {
    class A {
        + c string
        - d string
    }
}

package test2 {
    class B {}
}

A --|> B
@enduml

output:

Error parsing input file: 
../../uml
Unknown type

This is a valid input according to plantuml but doesn't seem to be accepted by plantcode, although, when looking at the plantcode code, there seems to be support for the package keyword.

GillisWerrebrouck commented 3 years ago

Once this bug is resolve it could be a good enhancement to make use of this package keyword a little more than what I think it does now. As far as I understand 1 file is created even when the keyword package is being used. It would be beneficial if this CLI tool would create multiple files in a folder structure that is according to the packages in the UML. This could also be implemented with the folder keyword as supported by plantuml instead of package.

bafolts commented 3 years ago

Changing this to enhancement as support for package is missing.