Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » how to extend EVERY class in a diagram with one or few extending classes?
how to extend EVERY class in a diagram with one or few extending classes? [message #792839] Tue, 07 February 2012 13:31 Go to next message
B Simpson is currently offline B SimpsonFriend
Messages: 25
Registered: January 2012
Junior Member
hi,
i have got 1 abstract class called 'datatable' and 3 classes extending it ('ordinarytable','listtable','basictable').
now, every class that i create in any package will be extending one of those 3 classes.

do i have to draw generalisation line leading from an extended class to extending class every time? or is there a workaround for my problem?

cheers.
Re: how to extend EVERY class in a diagram with one or few extending classes? [message #792898 is a reply to message #792839] Tue, 07 February 2012 14:49 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hello,

There isn't any easy (and exact) solution to your problem.

You could try to use a QVT or ATL transformation on the UML model, to automatically generate these generalizations.

I think a few other mechanisms might help you in the future, such as the palette customization (Instead of creating a "Class", you could create an "Ordinary table", which would in fact create a Class *and* a generalization to the specified abstract Class). However, this would probably require to create a new plug-in, defining a new post-action for the palette. Not so easy to set up.

Another solution would be to use a profile and a palette customization. Instead of "extending" one of these three classes, you could "stereotype" your classes. The palette customization allows you to create directly a stereotyped object (i.e. a Class stereotyped with "Ordinary table").


Camille Letavernier
Re: how to extend EVERY class in a diagram with one or few extending classes? [message #792936 is a reply to message #792898] Tue, 07 February 2012 15:31 Go to previous messageGo to next message
B Simpson is currently offline B SimpsonFriend
Messages: 25
Registered: January 2012
Junior Member
hi,
thanks. i was pondering stereotypization of my model... but what if i'll have to do just a little change in my profile?
won't all stereotypes go away?

thank you for your patience!
Re: how to extend EVERY class in a diagram with one or few extending classes? [message #792942 is a reply to message #792936] Tue, 07 February 2012 15:35 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Profiles can be reapplied without losing all your applied stereotypes (Assuming the changes are compatible with the previous version of the profile, of course). However, you'll have to explicitly re-apply the profile on the diagram after each change (To avoid silently loosing data when the changes are not compatible)

Camille Letavernier
Re: how to extend EVERY class in a diagram with one or few extending classes? [message #792957 is a reply to message #792942] Tue, 07 February 2012 15:56 Go to previous message
B Simpson is currently offline B SimpsonFriend
Messages: 25
Registered: January 2012
Junior Member
oh, thanks! didn't know that
Previous Topic:how to create an Object diagram?
Next Topic:static profile stereotype fails to apply
Goto Forum:
  


Current Time: Fri Apr 26 10:10:37 GMT 2024

Powered by FUDForum. Page generated in 0.03225 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top