nus-cs2103-AY2223S2 / forum

12 stars 0 forks source link

PlantUML not rendering same image as original DG #266

Closed jerome-neo closed 1 year ago

jerome-neo commented 1 year ago

Following the steps to install Graphviz for Windows and MacOS in IntelliJ, the resulting diagram for StorageClassDiagram.puml did not look like the one in the developer's guide in both operating systems.

The image attached shows the rendered diagram. The file StorageClassDiagram.puml was never modified.

StorageClassDiagram

Any help/advice is appreciated, thank you!

damithc commented 1 year ago

@jerome-neo might be related to the PlantUML version i.e., recent versions of PlantUML might render diagrams differently from earlier versions. Let's wait to see if others are facing similar problems.

jerome-neo commented 1 year ago

My temporary get around for this issue is to run the files on Visual Studio Code with the extension, PlantUML. This renders StorageClassDiagram.puml properly.

kyueran commented 1 year ago

I faced the same problem with IntelliJ IDEA 2022.3.3 (Ultimate Edition) with v1.2023.2 PlantUML.

I fixed it by changing to IntelliJ IDEA 2021.3.1 (Community Edition) with v1.2022.12 PlantUML.

You need to download the PlantUML for the old version of intellij cos the old version of PlantUML is not compatible with the new version of IntelliJ. This v1.2022.12 PlantUML version is automatically downloaded for IntelliJ IDEA 2021.3.1 (Community Edition).

eugenetangkj commented 1 year ago

I faced the same problem too! Might be a version issue. I think the problem is the package Storage and the interface Storage are both referred to as Storage, that's why the arrows are not pointing correctly. I just renamed the interface to StorageInterface and the arrows point correctly. Referring to StorageClassDiagram.puml, I changed line 14 to Class "<<interface>>\nStorage" as StorageInterface.

damithc commented 1 year ago

Good catch @eugenetangkj Thanks for sharing this solution. Others, does that solution work for you too?

jerome-neo commented 1 year ago

Thank you all for the suggestions! Unfortunately, changing line 14 did not work for me. I'll try downgrading IntelliJ and PlantUML.

eugenetangkj commented 1 year ago

HI @jerome-neo, did you change lines 28, 30, 34 and 35 as well?

jerome-neo commented 1 year ago

Yes, that works! Thanks for saving me all that trouble @eugenetangkj, forgot about the rest of references to Storage.

Creationsv2 commented 1 year ago

Can confirm that changing the Package name works. Similar problem in other diagrams such as ModelClassDiagram.puml as well.