MarcoEidinger / SwiftPlantUML

A command-line tool and Swift Package for generating class diagrams powered by PlantUML

Home Page:https://marcoeidinger.github.io/SwiftPlantUML/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No access level for extension members if no explicit

MarcoEidinger opened this issue · comments

Members of an extension do not show an access level indicator if there is no explicit access level modifier.

class aClass {
    var computedProperty: String {}
    func aFunction() {}
}

extension aClass {
    var extComputedProperty: String { "" }
    func extFunction()
}

The implicit access level for extComputedProperty and extFunction is internal. Therefore indicator ~ shall be represented in PlantUMLScript.

Current (unexpected) output

@startuml
' STYLE START
hide empty members
skinparam shadowing false
' STYLE END


class "aClass" as aClass << (C, DarkSeaGreen) >> { 
  ~computedProperty : String
  ~aFunction() 
}
class "aClass" as aClass0 << (X, Orchid) extension >> { 
  extComputedProperty : String
  extFunction()
}

aClass <.. aClass0 : ext
@enduml

Expected output

@startuml
' STYLE START
hide empty members
skinparam shadowing false
' STYLE END


class "aClass" as aClass << (C, DarkSeaGreen) >> { 
  ~computedProperty : String
  ~aFunction() 
}
class "aClass" as aClass0 << (X, Orchid) extension >> { 
  ~extComputedProperty : String
  ~extFunction()
}

aClass <.. aClass0 : ext
@enduml