[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.uml2] Re: seperating stereotypes in profiles

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@xxxxxxxxxxx> wrote in message news:3bebecb56e6496444d76652fc0d18c40$1@xxxxxxxxxxxxxxxxxx
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