Book a Demo

Author Topic: Realising Interfaces  (Read 13422 times)

Matt Thomas

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Realising Interfaces
« on: March 13, 2012, 10:55:24 pm »
How does one realise the messages depicted on a sequence diagram as interfaces on the depicted objects?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Realising Interfaces
« Reply #1 on: March 14, 2012, 05:59:42 am »
Add operations to the classifying class, their ports or classes/interfaces they realize. They all (inherited only with optional check mark below) will appear in the dropdown for the target object. Using the Operations button will allow to add operations on-the-fly (they will be added to the classifier).

q.
« Last Edit: March 14, 2012, 06:00:32 am by qwerty »

Matt Thomas

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Realising Interfaces
« Reply #2 on: March 20, 2012, 03:02:44 am »
This works, and the thread reply was helpful, thank you.
I was hoping things would work differently - that it would be possible to draft a sequence with lifelines, then when you're happy with it to generate a class for the object represented on the lifeline, then further to generate operations on the class from the messages displayed on the sequence. This possible too?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Realising Interfaces
« Reply #3 on: March 20, 2012, 03:58:46 am »
Not via the GUI. But I think it's not too difficult to write an add-in to perform that task:
- get selected diagram lifeline
- find the assigned classifier
- get all messages for the lifeline
- add/merge the appropriate messages as operations

q.

Matt Thomas

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Realising Interfaces
« Reply #4 on: March 30, 2012, 12:59:34 am »
OK QWERTY. Like the direction - what's the best way to get started building add-ins for EA (for someone who's built add-ins for IBM Rhapsody, but is too busy to think :-))?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Realising Interfaces
« Reply #5 on: March 30, 2012, 02:13:16 am »
EA has a build-in scripting editor (View/Scripting). You can easily copy existing script samples to your local ones. They support VB and JScript. Personally I use Perl with an own framework which gives me much more flexibility. Geert has published a whole scripting framework in C++ (or the like) on github if you're planing to use add-ins seriously. He also published some starter in 10 minutes for add-ins (in Cxx). Just see his last posts.

q.