Book a Demo

Author Topic: How can I make Interfaces behave like Classes ?  (Read 3101 times)

austin_hastings

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
How can I make Interfaces behave like Classes ?
« on: September 23, 2005, 12:39:32 pm »
Two questions, one theoretical and the other practical:

1. What is the difference between the Structure>Class entity that receives the «interface» stereotype, and the Structure>Interface entity?

2. How can I make a Structure>Interface entity act like a Structure>Class entity, at least with respect to being able to pop up the Operations dialog without having to right-click, ContextMenu->Features->Operations?

With Structure>Class entities, double-clicking on an operation will bring up the Class Operation dialog directly. I'd like to do that with interfaces. Or, I'd at least like to be able to turn on the "Details" tab in the Structure>Interface dialog box, as it exists in Structure>Class.

Help?

=Austin

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How can I make Interfaces behave like Classes
« Reply #1 on: September 25, 2005, 07:29:04 pm »
Hello Austin,

The difference between a class stereotyped interface and an Interface element, is that the Interface element is defined in the UML spec.  An interface stereotype on the other hand could be defined anywhere and as such the meaning may be different.

In EA code generation, it checks that the element is actually an interface, although you could change that in the templates.

You can't really make it act like a class.  But I can double-click on a method in an interface (in the tree or on the diagram) and EA opens the operation dialog as expected.  You can also open the operations dialog by pressing F10.

thomaskilian

  • Guest
Re: How can I make Interfaces behave like Classes
« Reply #2 on: September 26, 2005, 03:16:12 am »
Superstructures seem to be a bit inconsistent. On the one hand they tell that interfaces can't be instantiated (thus being abstract) on the other hand the show the rectangle notation (being synonymous to the circle notation) with plain writing instead of italics for abstract classes.

A non-abstract class with <<interface>> stereotype seems to be possible, albeit a bit non-sense.

austin_hastings

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: How can I make Interfaces behave like Classes
« Reply #3 on: September 26, 2005, 12:28:33 pm »
Quote
the Interface element is defined in the UML spec.  An interface stereotype on the other hand could be defined anywhere and as such the meaning may be different.


Believe it or not, I actually understand this! :)  

Quote
You can't really make it act like a class.  But I can double-click on a method in an interface (in the tree or on the diagram) and EA opens the operation dialog as expected.  You can also open the operations dialog by pressing F10.


Okay, I get this too by going slow. I don't know what I was was doing before, with the class objects, that made me click-through all the time. It's like a click-doubleclick to get the methods up. Maybe I was just ignoring when the class dialog appeared because I could always hit the "Details" tab.

Regardless, you're right - it works if I click-2click on a interface method. Thanks.

=Austin