UML codegen.py association attributes



Hello,

if I export my diagram to Java via codegen, the attributes from
associations are not included, I would really like to see this feature
in Dia :)

After browsing the code I found the class responsible for code export,
codegen.py. It seems like association attributes should be included
somehow, but aren't. So maybe it's even a bug?

https://git.gnome.org/browse/dia/tree/plug-ins/python/codegen.py#n90

For example I have this UML (also see attached screenshot):

        +--------+                 +-------+
        | Parent |                 | Child |
        +--------+  1           1  +-------+
        +--------+-----------------+-------+
        +--------+ -parent  -child +-------+

which generates two (and the diagramName.java) class files like

        // Parent.java
        public class Parent {
                public Parent(){ }
        }

        // Child.java
        public class Child {
                public Child() { }
        }

But I expected this (I hope I got the association directions in the UML
right :D):

        // Parent.java
        public class Parent {

                private Child child;

                public Parent() { }
        }

        // Child.java
        public class Child {

                private Parent parent;

                public Child() { }
        }

Thank you :)

Christoph
-- 
Visit me:
https://criztovyl.space
https://twitter.com/criztovyl
https://gitlab.com/criztovyl
https://github.com/criztovyl

Attachment: screenshot.png
Description: PNG image

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]