Book a Demo

Author Topic: Exported profile does not keep associactions  (Read 6954 times)

xhanness

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Exported profile does not keep associactions
« on: September 02, 2009, 05:45:12 am »
During working on a profile I created some associations between some stereotype classes. Unfortunately, these are not exported with stereotypes after I "Save Package as Profile". These "meta-associations" should serve me as rules for creating models, but they are not present in profile.XML file.

is there any way how to include them?
Of course, I can create hard-code bit, read them and export  them in mine own format... but this is the very last solution.

thanks for all hints !
« Last Edit: September 02, 2009, 05:45:44 am by xhanness »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Exported profile does not keep associactions
« Reply #1 on: September 02, 2009, 07:05:14 am »
Depending on what you are trying to achieve, you might be able to do this with the Quick Linker. I believe you can embed such settings in a profile. You can certainly include linking rules for elements defined (as stereotypes) in an MDG Technology.

It took me a couple of tries before I got one working. That was some time ago, but the process seems to be the same. Once I got past the learning curve I got the results I wanted.

You might also want to define some rules in your Technology. These could enforce allowable connector types for cases where users created the connectors by hand instead of via the Quick Linker or your toolbox pages.

In the EA help index look up Quick Linker | Definition Format. You should be able to take it from there.

David
No, you can't have it!

xhanness

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: Exported profile does not keep associactions
« Reply #2 on: September 02, 2009, 09:17:25 pm »
Hi David !

thanks fro your advice !  :)
I did not about that this feature. I have created my own QuickLink rules and it seems to be working fine.

However, I would still appreciate to have a reasonable way how to get information about those meta-associatons.

Jan

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Exported profile does not keep associactions
« Reply #3 on: September 03, 2009, 11:41:18 pm »
What do you mean by the "get information" note? Where in what process, and by which means do you want to obtain this information?
No, you can't have it!

xhanness

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: Exported profile does not keep associactions
« Reply #4 on: September 04, 2009, 01:56:13 am »
Well, I have created a profile consisting of stereotypes. I created also associations between stereotypes within the profile. For instance, I have a stereotype <<Parent>>, which inherits from the meta-association and I have two stereotypes <<Directory>> and <<File>>, which inherit from the meta-class. Finally (still in profile defition), I created an association between stereotypes <<Directory>> and <<File>>, which is supposed to check, that you can put the <<Parent>> association only and only on classes decorated by <<Directory>> and <<File>> during application of this profile.

Thus, in order to perform such checking with use of a EA plugin, I would like to have this information - about associations in the profile, since I need to avoid to wrong usage of my stereotypes.

Hmm, I hope I wrote it clearly. Sorry for my English  ;) and thanks for reading.

/Jan

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Exported profile does not keep associactions
« Reply #5 on: September 04, 2009, 02:16:19 am »
Hi Jan,

When you refer to your stereotypes (or query for them), whether from a validation rule or an add-in, do you include the profile prefix? [EDIT: This is the 'short name' you assigned when you created the profile.] I think you need to use something of the form: MyMDG::MyStereotype. As with your toolbox profiles remember the double colon, and that the names are case sensitive.

Did you create validation rules in your profile? If not, I think you can do so, within the limits of EA's OCL handling abilities. I have not played around with this option - my requirements required add-in code - so cannot give you much useful information in this regard.

David

PS: Your English is just fine.
« Last Edit: September 04, 2009, 10:54:20 pm by Midnight »
No, you can't have it!

xhanness

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: Exported profile does not keep associactions
« Reply #6 on: September 04, 2009, 02:37:25 am »
David, thanks for your reply. I did not use any validation rules until now, sinice my plugin is not "packed" into MDG package.

Anyway, could you be more detail please with the note about that kind of "namespaces" you mentioned? I refer to stereotypes with the use of "Stereotype" property (e.g. myElement.Stereotype in c#). I have not met any stereotypes of zzz::yyy:MyStereotype form. Is this format used on the level of MDG or can I meet with this during c# or java programming?


thanks

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Exported profile does not keep associactions
« Reply #7 on: September 04, 2009, 10:52:58 pm »
Sorry Jan,

I was careless in my terminology. I meant to prefix your stereotype with the profile name, not a namespace. You should only have two components in the fully qualified name, separated by a double colon quote. [Thanks Günther. I can't seem to get anything right today...   :-[]

Beyond that I cannot give you more detail, or even tell you if this will help in your case. As mentioned above I have gone about this differently in past. The method I used is fundamentally different and requires completely rethinking how to approach profiles. I won't go into it here.

David
« Last Edit: September 05, 2009, 01:06:56 am by Midnight »
No, you can't have it!

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: Exported profile does not keep associactions
« Reply #8 on: September 04, 2009, 11:35:39 pm »
Hi David,

Quote
... separated by a double quote ...
Did you mean colon here ?

WBR
Günther

xhanness

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: Exported profile does not keep associactions
« Reply #9 on: September 04, 2009, 11:41:50 pm »
this is meant as double colon  :D