Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Uffe on July 30, 2007, 08:36:19 pm
-
Hello gurus,
If I in a UML profile define a prototype for a class, say, can I generalize it and have that work in f'rinstance code generation?
In other words, is prototype inheritance possible?
I've done some tests and they seem to indicate the answer is no, but then again I simply might not be getting it. It's happened before once.
Cheers,
/Uffe
-
I really don't know. But try this while you're waiting.
Try to read the MetaType property - this property applies to elements, connectors and diagrams. The documentation describes this as the "domain-specific meta type, as defined by an MDG Technology." This property is available through the API, and can also be captured (and displayed) by shape scripts (via #classifier.metatype# and similar). Perhaps this will give you the clue you need to solve the problem.
Please let us know if this gets you anywhere, or what the real solution is if you find it elsewhere.
David
-
Uffe, I really don't understand the question, but I suspect the answer might be Patterns, not Profiles. Search for "UML Patterns" in the EA user guide, and if that doesn't help, describe what a "prototype for a class" looks like and what you want to do with it and I can try to give a better answer.
-
Hi again,
I am most dreadfully sorry - what was I drinking thinking? I meant stereotype, of course.
What I want to do is define a profile where a class stereotype S contains a tagged value of stereotype A (in the same profile).
I then want to create a stereotype B as a generalization of A (still in the same profile), and (in a class diagram that uses the profile) be allowed to use both <<A>> and <<B>> classes as values for the tagged value in an <<S>> class. This doesn't seem physically possible.
Sorry about the confusion, which I have now probably only added to. But the question remains: is there a way around this?
Cheers,
/Uffe
-
I will describe a profile diagram that works on EA 7.0.814 (I'm sure it would be easier to include a diagram if only I knew how...)
So, "<<stereotype>> A" extends "<<metaclass>> Class", "<<stereotype>> S" extends "<<metaclass>> Class", "<<stereotype>> B" has a generalize connector to "<<stereotype>> A", and "<<stereotype>> S" has a <<tagged value>> association to "<<stereotype>> A" which has the Target Role name set to the name of the tagged value you want to create.
Now, if you save that profile and import it and drop one each of <<A>>, <<B>> and <<S>> onto a diagram, you will notice that <<S>> has a tagged value. Select the tagged value and click the "..." button on the right-hand side of its value field and the dialog that pops up will show both the <<A>> and <<B>> classes.
HTH :)
-
I will describe a profile diagram that works on EA 7.0.814 (I'm sure it would be easier to include a diagram if only I knew how...)
Well, you could start by providing a place on the Sparx site to store diagrams related to the forums... 8)
Paolo
-
Hello.... want to add images to your postings? Easy guys
1. Pop along to http://www.imageshack.us
2. Click sign up and register
That will get you a store to keep your images... free with no spam, ads or unpleasantnesses.
3. Use EA or whatever to construct your diagram.
4. Use Windows Snipping Tool to cut out your image.
5. Pop along to imageshack, and upload your new cutting
6. Grab the appropriate image URL
7. Use forum's "Insert Image" tool, and then paste the URL in ya posting
[size=10] Vola!!! [/size] Pictures.
I've been using them for over a year, and all me little snips are still visible... They provide a number of Styles of Url, some with image Shack logo, but one is just the image.
Have fun, I expect to see much more engaging posts
Kevin
-
(http://img215.imageshack.us/img215/2387/advisepointfx3.jpg)
It's the last one in the list, 'direct link to image'
Now do I get ago with ya MDG for VS 2k8 ?
-
Thanks Kevin. Let's see if this works then...
(http://img254.imageshack.us/img254/7857/profiledm8.gif)
Well, it appears to. On my previous efforts to sign up for free picture hosting sites, it's only after I've gone through the long and laborious sign up process that I find out they only allow indirect linking.
-
I am most dreadfully sorry - what was I drinking thinking? I meant stereotype, of course.
Hi Uffe,
Would you mind changing the title on the first post (To: Stereotype inheritance)? This allows the Topic to display correctly in the Category.
You can use the Modify link to do it.
Paolo
-
Hello.... want to add images to your postings? Easy guys
Hi Kevin,
My original request to Sparx to provide an area was so that the availability of the image location and the forum location would be more closely aligned. Often, we see images unrendered because there's no path to the image site at that time. If the text and images were collocated, this would be reduced...
Paolo
-
Hi Paolo... hope you're still good and happy
I've had that problem with other hosting sites,but ImageShack don't seem to do that (no limits on the number or duration of availability)... no real assurance that they wont at some stage, so it would be better if EA did something.
I suspect that most postings have a comparatively short useful life time
Kevin