Duplicated class with package

0 votes
asked Jul 9, 2022 in Bug by kasra (960 points)

Hi,

This diagram

@startuml

package android.widget {

   class ImageView

}

android.widget.ImageView -|> View

@enduml

gives us two ImageView class 

which is not the case with 

@startuml
package android.widget {

   class android.widget.ImageView

}
android.widget.ImageView -|> View
@enduml

http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuIf8JCvEJ4zLICnBAShFJD4hpqn9JorHgERYKb1GICv9B2v6azBpp0Mg3yjCBUVYgkN29QUWMsEd05Raa9gN0hG80000

Is it a bug or is it mandatory to write the complete name ?  

Thanks in andvance

1 Answer

0 votes
answered Jul 9, 2022 by The-Lu (63,000 points)
selected Jul 9, 2022 by kasra
 
Best answer

Hello K.,

For that you can use `namespace`, as:

@startuml
namespace android.widget {
   class ImageView
}
android.widget.ImageView -|> View
@enduml

See also doc. on Class page.

Regards.

...