Book a Demo

Author Topic: Combined Fragment type  (Read 3381 times)

bart

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Combined Fragment type
« on: February 06, 2007, 03:04:30 am »
Hi all,

I'm trying to write a plug-in to EA that would parse Sequence Diagrams and generate a code based on the interaction.

If there is a Combined Fragment (alt/opt/loop etc) on the diagram, calling element.Type on it returns 'InteractionFragment'. I can't find a way to check if it is alternative, option, or loop. It seems the only thing that is changing in the datatbase between InteractionFragment objects is NType field. Unfortunately there doesn't seem to be any method to get this via Automation Interface.

So the question is: do you know any way to distinguish types of Combined Fragments? Thanks for any help.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Combined Fragment type
« Reply #1 on: February 06, 2007, 06:11:53 am »
Try the SubType attribute.

I am (really) not sure, but this seems to return different interpretations of the NType column, based on the the element type. EA seems to 'interpret' this a bit, for example returning values like 100 and 101 for initial and final state nodes (where NType stores 4 and 3).

See if you get predictable results here. My (completely uneducated) guess is that you'll get a value that corresponds to the zero-based index of the fragment type from the dropdown of the properties dialog.

Please let us know if you get anything usable.
« Last Edit: February 06, 2007, 06:12:16 am by Midnight »
No, you can't have it!

bart

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Combined Fragment type
« Reply #2 on: February 06, 2007, 10:59:40 am »
it works :) I should have noticed SubType changing value before...

Thanks for help!
« Last Edit: February 06, 2007, 11:00:05 am by bart »