Book a Demo

Author Topic: java FE/RE associations  (Read 3066 times)

tanja

  • EA User
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
java FE/RE associations
« on: August 22, 2005, 12:07:52 pm »
Hello,

I have a huge model that I've imported from Rose into EA 5. I've managed to generate java code into directories as appropriate (e.g., org.iec.something) and to have EA name the packages appropriately. However, I found several problems:
a) there are no imports generated for the classes from another packages, so I had to do it manually (with eclipse 'Organise imports', but still file by file)
b) for associations (no diamond) and for aggregations (white diamond), only one role is generated, and there is no rule which one with respect to source or target, cardinalities, diamond position - and this is VERY annoying. Again, I had to do this by hand. In Rose, all the associations had unspecified direction and have been kept so in EA. Each and every association has both role names specified, and both side cardinalities. I've also set the option "Generate when direction unspecified".

I've discovered a strange thing with EA: when there is an association (any kind), EA creates an attribute in the class in the model that seems to be linked to the association and thus on a diagram, I have both the association and the attribute - some other tools I know of show either association or attribute, but never both.
(1) Is there a way to show only one? For code engineering, this would mean there are two fields with the same name/type in my class...

What I've been doing now all the time is to synchronise (i.e., reverse engineer) from the code into the model, as I'm keeping the code as master.

Now, two more things I don't know how to solve, and I beg for your help:
(2) How can I get javadoc comments for java class fields (which are those "linked" to associations) in the EA model notes for association roles? Comments get into the EA model only for attributes of the class (those (strangely) fabricated from association roles)...

(3) Among many associations (I estimate some 300), most are kept correctly in the model, after I've added missing attribute in one of the two classes, in java source code. After synchronising (from code into the model), the original cardinalities are still there, one association with unspecified direction is still linking the two classes, the diamond (if originally present) is still there. However, for some 20 associations, I get systematically two uni-directional links - I do not want this, because the direction is not specified and that is the semantics in the model - bad or good, but that's it. This "twinning" happens always when I have cardinality of max 1 (0..1, 1, any combination of these), and for a few other cases (0..n, 1..n). What to do to "merge" these into a single, direction-unspecified association/aggregation?

Any help will be highly apreciated!
Tanja

ps: This post sounds very negative, but I've really spent a lot of time doing things by hand, and the above 3 problems I can't do at all (at least, I don't know how). And I'm only at the begining of the port of Rose models... I've read on other posts that the models imported from Rose XMI when exported into XMI generate huge files (some bug on GUID repeting), so it might be that the strange behaviour in (3) above is due to something similar.