Code generation for associations

I was disapointed to find that the code generation for associations always uses a simple instance variable like
OtherClass associate; for …1 multiplicities and
OtherClass[] associate; for ‘many’ multiplicities

I frequently use collection classes to represent the associations e.g. Vector and I looked in vain for a way to persuade VP-UML to generate this. In the end I have had to stop using role names and encode the association as an attribute.

This defeats one of the core purposes of the Tool - I should be able to direcly relate the role name on the association to its representation in the code.

Looking back to Rose I found that I had used two methods, in one version I had used a page that enable Langage specific modifications to be made, in the other I had simply typed the class type on the end on the role name like RoleName : Vector

I suggest that there should be an option to specify the type to be used for the member variable in the specification pane. This can provide native types and an array option but should also allow free text entry.

Pete

Dear Pete,

Thanks for your suggestions. Actually we are working on a new code engineering framework which will support user defined collection types for code generation.

Regards,
Rain

Hi Rain,

will this be part of the new version? I’ve just downloaded the early access and am evaluating the SDE for Eclipse, but unfortunately, I’m having the same problem: when I label a * association with a rolename, I have an array created with the rolename that conflicts with the collections I’m using for the implementation of *-associations.

Aside from this, I find your tool very nice (have tried Omondo EclipseUML and have been working with Together for Visual Studio.NET for quite a while). As far as I can see, VP-UML (respectively its SDE version for Eclipse) is a decent modelling tool and it’s priced in a sane range (while Together is definitely the coolest modelling tool I know of, it’s simply way too expansive - the version for VS.NET, 2.0 was priced moderately but that one was also extremely buggy).

When can we expect your new code engineering framework? Will it be part of the version currently available as early access? For me, this is definitely a buy or don’t buy issue, and I’d be surprised to be the only one (in fact, I don’t see much reason to code such associations with arrays)…

I’m interested in the professional edition…

hopeful regards,
david

Dear david,

We are sorry that the new code engineering framework is still under development. It will be available around VP-UML 5.1 to 5.2 (SDE 3.1 to 3.2) version.

Best regards,
Rain