facebook

Problem with the Code generator

  1. MyEclipse Archived
  2.  > 
  3. UML Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #265799 Reply

    Paul Cahill
    Member

    Hello Support,

    There is a problem with the code generator as it assumes a that a derived class that has a collection relationship with its base class is somehow assumed to be multiple inheritance. ah no. I have a repeatable problem that requires me to correct the code that is generated.

    ala

    BASE CLASS
    ^ |
    | |
    | | 1..*
    DERIVED CLASS

    This is not multiple inheritance. I would suggest the developer did not ensure the relationships were all inheritance.

    Regards,

    Paul Cahill

    #265896 Reply

    Riyad Kalla
    Member

    Paul,
    How do I setup this relationship? I created a Base and Derived class, and created a realization of stereotype Derived and generated the code and it was single inheritence. I’m sure I’m doing this wrong though, please point out where.

    #265935 Reply

    Paul Cahill
    Member

    @support-rkalla wrote:

    Paul,
    How do I setup this relationship? I created a Base and Derived class, and created a realization of stereotype Derived and generated the code and it was single inheritence. I’m sure I’m doing this wrong though, please point out where.

    On further investigation, it seems that there was an invisible generalisation between the base class two levels down and a generalisation to a new intermediate base class therefore forming and invisible multiple inheritance canonical form. When I say invisible, I mean not visible on any diagram or visible in the navigator panel either. It seems that when the original link was made, it was subsequently deleted but not deleted from the model repository. The only way I discovered it was to assume it existed first then go to each class and select Show Edges. This raised the erroneous links and allowed me to delete them from the model completely.

    This is a real problem. Perhaps when users are asked to delete a link from a diagram and there are no other links on any other diagram then they should be prompted and asked if the link should be deleted from the repository. Either this or implicitly delete links when they are no longer visible on any diagram. After discovering this link problem I subsequently found several other instances of this kind of problem in the repository.

    Can you please implement my suggested fix as this is a sleeping bug that is hard to diagnose and easy to fall prey to.

    Regards,

    Paul Cahill

    #265945 Reply

    Riyad Kalla
    Member

    Paul I will certainly pass it along to the UML team ASAP.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Problem with the Code generator

You must be logged in to post in the forum log in