[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.uml2] Re: extending UML2

saurabh,

>From what I gather from your email, you want to use the UML editor to
manipulate your model and then work programatically with your own
proprietary model.
Have you considered using UML editor to create a uml model then do a model
to model transform to your own model format.

Cheers,

-James.


"saurabh" <8bholas@xxxxxxxxxx> wrote in message
news:e9j2la$kht$1@xxxxxxxxxxxxxxxxxxxx
> Ken,
>
> Thanks for your prompt reply, I am asking all these questions because i am
a
> bit confused, below is the reason for my confusion and i am still looking
> for a solution.
>
> We have a uml model  (model1.uml) to which we apply a profile , say
profile
> A
>
> We have another EMF model which extends the UML2 metamodel , the idea is
> to have an affect similar to rpofile A above. We generate code using the
EMF
> model and the UI uses this generated code to manipulate the model.
>
> We want the same UI to manipulate (model1.uml) rather than our model based
> on
> EMF generated code, the example would be -
>
> in  model1.uml  - we would have something like
>     <Model> model1
>      <Package> <<stereotype FA>>
>      <Class> <<stereotype AR>>
>               <Property> < <<stereotype MA>>  : this being child of AR or
> property of a Class
>
> in EMF based model (emfModel.req) - we would have something like
>     <ARModel>
>      <FA>
>     <AR>
>         <MA> : AR above has a reference to <MA>
>
> as generated model objects , FA extends <Package> and AR extends <Class>
> ARModel extends <Model> and MA extends <Property>
> when i create this model, i use factory.createArModel()
,factory.createFA()
> and factory.createAR() , factory.createMA() and i get
> the instance of ARModel, AR and FA and MA which i add ot the resource
using
> :
>
> AR.getMA().add(MA);
> FA.getAr().add(AR);
> ARModel.getFA().add(fa);
>
> If i use the same (which is used to manipulate emfModel.req) EMF generated
> API  to manipulate  model1.uml , then say for example the user
> sees the above model1.uml  arepresented as tree  in the UI . When the user
> selects <Class> <<stereotype AR>>
> as input on the tree and say tries to add  MA, it will be something like
> class.getOwnedMembers().add(MA), it can
> be done as MA extends UML <Property>  the model1.uml now looks like the
> following.
>
>   <Model> model1
>      <Package> <<stereotype FA>>
>      <Class> <<stereotype AR>>
>               <Property> < <<stereotype MA>>  : this being child of AR or
> property of a Class
>                <MA>
>
> Now the problem is when i call  model.getFA() will i get returned a list
of
> Packages ..? or nothing as i don't have any <FA> objects
> and if i call model.getAR() will i get returned a list of Classes? or a
list
> of <AR> objects etc?
>
> That's my confusion...!! Please let me know if you can understand what i
am
> trying to say??
>
> Saurabh
>
>
> "Kenn Hussey" <khussey@xxxxxxxxxx> wrote in message
> news:e9im1o$8c7$1@xxxxxxxxxxxxxxxxxxxx
> > Saurabh,
> >
> > The UML2 importer and code generator will behave the same way regardless
> > of
> > whether you've applied stereotypes from your profile to the model. Only
> > the
> > built-in Ecore profile will have an effect on code generation, because
its
> > purpose is to customize a UML model with concepts that are specific to
> > Ecore
> > (EMF).
> >
> > Kenn
> >
> > "saurabh" <8bholas@xxxxxxxxxx> wrote in message
> > news:e9ijfu$nlr$1@xxxxxxxxxxxxxxxxxxxx
> >> Extending UML2 using Profiles -
> >>
> >> I have extended UML2 using a profile. I want to know if the code
> >> generator
> >> will generate code in the same way when i use a my own metaModel to
> >> extend
> >> UML2, if not then what is the way around it..?
> >>
> >> Saurabh
> >>
> >>
> >
> >
>
>