#88 Missing Composition Line with Anonymous Inner Classes

In Progress
open
9
2011-02-23
2010-09-11
No

When a composite class has (at least) two composee fields, when its constructor uses anonymous inner classes during the instantiation of those fields, only the first field is shown with a composition line in the UML diagram.

I have included an Eclipse project that shows two cases:

Case 1) Both fields are typed as interfaces and the composite class's constructor uses anonymous inner classes to implement and instantiate those interfaces.

Case 2) Both fields are concrete classes, each of which has a constructor that takes an input parameter. The composite class constructor uses anonymous inner classes to supply the input parameters for those constructors when it instantiates the composees.

Without proof, I believe that this problem may be symptomatic of larger issues that Green UML has with anonymous inner classes.

My system is Eclipse Helios x64 with Green 3.5.0 running on Win7 x64.

This problem is very serious and urgent for me. Thanks!

Discussion

  • Stephen Wong

    Stephen Wong - 2010-09-11

    Eclipse project that shows the problem.

     
  • Stephen Wong

    Stephen Wong - 2010-09-11
    • priority: 5 --> 8
     
  • Carl Alphonce

    Carl Alphonce - 2010-09-23

    You are correct that this is a more general problem. The root of the problem lies in how the relationships themselves deal with anonymous inner classes.

     
  • Carl Alphonce

    Carl Alphonce - 2010-09-23
    • assigned_to: nobody --> alphonce
     
  • Carl Alphonce

    Carl Alphonce - 2011-02-23

    We believe we have identified the source of the problem. The classes which walk the JDT AST are not visiting the anonymous class definition node correctly, in part because anonymous class definitions are not the same type of node as a type declaration or enum declaration.

    At this point we are fairly confident we will have a fix in time for the next release. We are tentatively planning on a new release by the end of April.

     
  • Carl Alphonce

    Carl Alphonce - 2011-02-23
    • milestone: --> In Progress
    • priority: 8 --> 9
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks