Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Inconsistancy in handling enum within Project Class Diagram #30

Closed
damienwojtowicz opened this issue Apr 13, 2017 · 1 comment
Closed

Comments

@damienwojtowicz
Copy link

I noticed that enum management within Project Class Diagram is wrong. Enum seems to be considered as a class and its litterals as unary associations.

Here is an example:

package misc;
public enum Jour {
	LUNDI, 
	MARDI, 
	MERCREDI, 
	JEUDI, 
	VENDREDI, 
	SAMEDI, 
	DIMANCHE
}

Here is a snippet of the project class diagram:

bug

Here is the generated PlantUML code:

enum Jour [[/MyProject/src/misc/Jour.java]] {
}
class Jour [[/MyProject/src/misc/Jour.java]] {
}
Jour --> "1" Jour : LUNDI
class Jour [[/MyProject/src/misc/Jour.java]] {
}
Jour --> "1" Jour : MARDI
class Jour [[/MyProject/src/misc/Jour.java]] {
}
Jour --> "1" Jour : MERCREDI
class Jour [[/MyProject/src/misc/Jour.java]] {
}
Jour --> "1" Jour : JEUDI
class Jour [[/MyProject/src/misc/Jour.java]] {
}
Jour --> "1" Jour : VENDREDI
class Jour [[/MyProject/src/misc/Jour.java]] {
}
Jour --> "1" Jour : SAMEDI
class Jour [[/MyProject/src/misc/Jour.java]] {
}
Jour --> "1" Jour : DIMANCHE

This is obviously a problem occuring in PlantUML Project Class Diagram View, since "simple" PlantUML view shows the following enum, which is correct:
jour

@hallvard
Copy link
Owner

The code that generates associations didn't check that the field is an enum, for which associations shouldn't be generated. The ordinary PlantUML view doesn't try to show associations to other classes, so it wasn't hit by the bug.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants