seperating stereotypes in profiles [message #478652] |
Tue, 28 July 2009 10:46  |
Eclipse User |
|
|
|
Hello.
I am working on a project where i have to create variations of a certain
model.
I will apply a profile to a model. The profile I create has all the
stereotypes. The problem is that the models do not use all the stereotypes
in the applied profile.
Say model A applies stereotype 1 and 2 and model B applies stereotypes 2
and 3.
Is there a way to make sure that model A can never apply stereotype 3.
The 2 choices I got for this project is to either make a seperate profile
for each variation of the needed model. Or to have one profile where the
stereotypes are grouped into the variations for the model.
Id prefer using a single profile. But if the profile contains many
stereotypes and the model only needs number 1 and 2, it becomes confusing.
tnx in advance for any help.
Robert
|
|
|
|
|
|
|
|
Re: seperating stereotypes in profiles [message #627831 is a reply to message #478652] |
Wed, 29 July 2009 03:27  |
Eclipse User |
|
|
|
Hi Robert,
I tend to find that the solution to such problems surface from examining the
underlying domain and the concepts represented. Somewhere within them will
be a natural boundary you can use. The question I would ask is why is is not
appropriate for model A to apply stereotype B. Is this just a case for this
partciular instance of model A or for all type A models?
It sounds like you have common elements to both types of model. To avoid
duplication you could define 3 profiles, 1 containing the common stereotypes
which can be used by either type of model, and then 2 model specific
profiles which extend the common profile. This will avoid duplication.
Also, there might be a way to add validation to your profiles to ensure they
follow your rules. I know there is OCL constraint support in models, does
anyone know if OCL is supported in Profiles?
Tas
"robert vrooland" <vrooland@hotmail.com> wrote in message
news:3bebecb56e6496444d76652fc0d18c40$1@www.eclipse.org...
> Hello.
> I am working on a project where i have to create variations of a certain
> model.
> I will apply a profile to a model. The profile I create has all the
> stereotypes. The problem is that the models do not use all the stereotypes
> in the applied profile.
>
> Say model A applies stereotype 1 and 2 and model B applies stereotypes 2
> and 3.
>
> Is there a way to make sure that model A can never apply stereotype 3.
>
> The 2 choices I got for this project is to either make a seperate profile
> for each variation of the needed model. Or to have one profile where the
> stereotypes are grouped into the variations for the model.
>
> Id prefer using a single profile. But if the profile contains many
> stereotypes and the model only needs number 1 and 2, it becomes confusing.
>
> tnx in advance for any help.
>
> Robert
>
>
>
>
>
|
|
|
Re: seperating stereotypes in profiles [message #627832 is a reply to message #478653] |
Wed, 29 July 2009 07:40  |
Eclipse User |
|
|
|
Hi Tas,
Yes that would probably work Tas. But the problem with limiting the
stereotypes a model may use was the main thing.
Say I have a model for MVC (model view control) and MVP (presenter
variant). the profile(s) applied to the models would need model, view,
control and presenter stereotypes.
If I want to make a MVC model, how can I add a limit to the profile so
that the presenter stereotype is not available.
Ill have a look in the prosibilities of ocl queries. Seee what can be done.
Robert.
|
|
|
Re: seperating stereotypes in profiles [message #627833 is a reply to message #478654] |
Wed, 29 July 2009 09:11  |
Eclipse User |
|
|
|
How about this.
You could have two profiles. One is MVC Profile another is MVP Profile, The
MVC profile contains Model, View and Controller Stereotypes. The MVP Profile
imports the MVC Profile and adds the extra Presenter Stereotpe.
When creating an MVC model you only apply the MVC Profile. When creating an
MVP Model you apply the MVP profile.
"robert vrooland" <vrooland@hotmail.com> wrote in message
news:d4583fd181ac578fbc8c52bbe25f81e2$1@www.eclipse.org...
> Hi Tas,
>
> Yes that would probably work Tas. But the problem with limiting the
> stereotypes a model may use was the main thing.
>
> Say I have a model for MVC (model view control) and MVP (presenter
> variant). the profile(s) applied to the models would need model, view,
> control and presenter stereotypes.
>
> If I want to make a MVC model, how can I add a limit to the profile so
> that the presenter stereotype is not available.
>
> Ill have a look in the prosibilities of ocl queries. Seee what can be
> done.
>
> Robert.
>
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09002 seconds