Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Reusing package-element in UML Metamodel extension
Reusing package-element in UML Metamodel extension [message #478102] Sun, 04 January 2009 21:28 Go to next message
Eclipse UserFriend
Hello,

Is there any possibility to use uml:package in an extended UML-Metamodel ?

What I tried so far:
-Create new UML model (Model Object: Model)

-I add an UML Package element to the model and then I transform this
model to a metamodel (convert to->metamodel).
After that I generate EMF Model and let EMF create the code for the
model and editor.

When I run the editor there is no UML Package available in my instance
model.


Regards,

Deepak
Re: Reusing package-element in UML Metamodel extension [message #478109 is a reply to message #478102] Tue, 06 January 2009 14:48 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Deepak,

If you can see the corresponding EPackage in the EMF model then the EMF
codegenerator should create a package for you.
What does your EMF model look like?

Cheers,
- James.


"Deepak" <dee_n@gmx.de> wrote in message
news:gjr9lq$17g$1@build.eclipse.org...
> Hello,
>
> Is there any possibility to use uml:package in an extended UML-Metamodel ?
>
> What I tried so far:
> -Create new UML model (Model Object: Model)
>
> -I add an UML Package element to the model and then I transform this model
> to a metamodel (convert to->metamodel).
> After that I generate EMF Model and let EMF create the code for the model
> and editor.
>
> When I run the editor there is no UML Package available in my instance
> model.
>
>
> Regards,
>
> Deepak
>
>
>
Re: Reusing package-element in UML Metamodel extension [message #478110 is a reply to message #478109] Wed, 07 January 2009 13:17 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------060602050409040405070603
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi James,

Yes, I can see the corresponding EPackage but if I run the generated
editor I can't insert any UML:Package element in my model. I just start
with the Activity element.

I attached a sample of my UML extended model and the derived Ecore file.

I want to create a specific activity diagram (no value pins, no
callbehavior action and some other unnecessary elements) which contains
OCL constraints.

The layout of my activity diagram should be:

uml:package
Activity
CallOperationAction
InputPin
OutputPin
ControlFlow
InitialNode
FinalNode....


Regards,

Deepak










James Bruck schrieb:
> Hi Deepak,
>
> If you can see the corresponding EPackage in the EMF model then the EMF
> codegenerator should create a package for you.
> What does your EMF model look like?
>
> Cheers,
> - James.
>
>
> "Deepak" <dee_n@gmx.de> wrote in message
> news:gjr9lq$17g$1@build.eclipse.org...
>> Hello,
>>
>> Is there any possibility to use uml:package in an extended UML-Metamodel ?
>>
>> What I tried so far:
>> -Create new UML model (Model Object: Model)
>>
>> -I add an UML Package element to the model and then I transform this model
>> to a metamodel (convert to->metamodel).
>> After that I generate EMF Model and let EMF create the code for the model
>> and editor.
>>
>> When I run the editor there is no UML Package available in my instance
>> model.
>>
>>
>> Regards,
>>
>> Deepak
>>
>>
>>
>
>


--------------060602050409040405070603
Content-Type: text/xml;
name="My.uml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="My.uml"

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Standard="http://www.eclipse.org/uml2/schemas/Standard/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Standard/1 pathmap://UML_PROFILES/Standard.profile.uml#_yzU58YinEdqtvbn fB2L_5w">
<uml:Model xmi:id="_0" name="TestMeta">
<packagedElement xmi:type="uml:Package" xmi:id="ActvityWithOCL" name="ActvityWithOCL">
<packagedElement xmi:type="uml:Activity" xmi:id="ActvityWithOCL-ExtActivity" name="ExtActivity" precondition="ActvityWithOCL-ExtActivity-OCL">
<ownedRule xmi:id="ActvityWithOCL-ExtActivity-OCL" name="OCL">
<specification xmi:type="uml:OpaqueExpression" xmi:id="ActvityWithOCL-ExtActivity-OCL-containsInputPin" name="containsInputPin">
<language>OCL</language>
</specification>
</ownedRule>
<generalization xmi:id="ActvityWithOCL-ExtActivity-_generalization.0">
<general xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Activity"/>
</generalization>
<node xmi:type="uml:CallBehaviorAction" xmi:id="ActvityWithOCL-ExtActivity-testGet" name="testGet"/>
</packagedElement>
</packagedElement>
<profileApplication xmi:id="_profileApplication.0">
<eAnnotations xmi:id=" _profileApplication.0-_http2F2Fwww.eclipse.org2Fuml22F2.0.02 FUML " source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href=" pathmap://UML_PROFILES/Standard.profile.uml#_yzU58YinEdqtvbn fB2L_5w"/>
</eAnnotations>
<appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
</profileApplication>
</uml:Model>
<Standard:Metamodel xmi:id="_mORn4L--Ed2_NN0Jjs2C1w" base_Model="_0"/>
<Standard:Metaclass xmi:id="_mOax0L--Ed2_NN0Jjs2C1w" base_Class="ActvityWithOCL-ExtActivity"/>
</xmi:XMI>

--------------060602050409040405070603
Content-Type: text/xml;
name="testMeta.ecore"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="testMeta.ecore"

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="testMeta"
nsURI="http:///testMeta.ecore" nsPrefix="testMeta">
<eSubpackages name="actvityWithOcl" nsURI="http:///testMeta/actvityWithOcl.ecore"
nsPrefix="testMeta.actvityWithOcl">
<eClassifiers xsi:type="ecore:EClass" name="ExtActivity" eSuperTypes=" platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Acti vity ">
<eOperations name="ocl" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The chain of diagnostics to which problems are to be appended."/>
</eAnnotations>
</eParameters>
<eParameters name="context">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The cache of context-specific information."/>
</eAnnotations>
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
<eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
</eGenericType>
</eParameters>
</eOperations>
</eClassifiers>
</eSubpackages>
</ecore:EPackage>

--------------060602050409040405070603--
Re: Reusing package-element in UML Metamodel extension [message #478113 is a reply to message #478110] Wed, 07 January 2009 18:37 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Deepak,

I think you might want something like in the attachment.
Try adding the attached .ecore, reloading you .genmodel, then regenerate
all.
Let me know if that is what you were looking for.

-James.

"Deepak" <dee_n@gmx.de> wrote in message
news:gk2a1s$15v$1@build.eclipse.org...
> Hi James,
>
> Yes, I can see the corresponding EPackage but if I run the generated
> editor I can't insert any UML:Package element in my model. I just start
> with the Activity element.
>
> I attached a sample of my UML extended model and the derived Ecore file.
>
> I want to create a specific activity diagram (no value pins, no
> callbehavior action and some other unnecessary elements) which contains
> OCL constraints.
>
> The layout of my activity diagram should be:
>
> uml:package
> Activity
> CallOperationAction
> InputPin
> OutputPin
> ControlFlow
> InitialNode
> FinalNode....
>
>
> Regards,
>
> Deepak
>
>
>
>
>
>
>
>
>
>
> James Bruck schrieb:
>> Hi Deepak,
>>
>> If you can see the corresponding EPackage in the EMF model then the EMF
>> codegenerator should create a package for you.
>> What does your EMF model look like?
>>
>> Cheers,
>> - James.
>>
>>
>> "Deepak" <dee_n@gmx.de> wrote in message
>> news:gjr9lq$17g$1@build.eclipse.org...
>>> Hello,
>>>
>>> Is there any possibility to use uml:package in an extended UML-Metamodel
>>> ?
>>>
>>> What I tried so far:
>>> -Create new UML model (Model Object: Model)
>>>
>>> -I add an UML Package element to the model and then I transform this
>>> model
>>> to a metamodel (convert to->metamodel).
>>> After that I generate EMF Model and let EMF create the code for the
>>> model
>>> and editor.
>>>
>>> When I run the editor there is no UML Package available in my instance
>>> model.
>>>
>>>
>>> Regards,
>>>
>>> Deepak
>>>
>>>
>>>
>>
>>
>
>


------------------------------------------------------------ --------------------


> <?xml version="1.0" encoding="UTF-8"?>
> <xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:Standard="http://www.eclipse.org/uml2/schemas/Standard/1"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
> xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Standard/1
> pathmap://UML_PROFILES/Standard.profile.uml#_yzU58YinEdqtvbn fB2L_5w">
> <uml:Model xmi:id="_0" name="TestMeta">
> <packagedElement xmi:type="uml:Package" xmi:id="ActvityWithOCL"
> name="ActvityWithOCL">
> <packagedElement xmi:type="uml:Activity"
> xmi:id="ActvityWithOCL-ExtActivity" name="ExtActivity"
> precondition="ActvityWithOCL-ExtActivity-OCL">
> <ownedRule xmi:id="ActvityWithOCL-ExtActivity-OCL" name="OCL">
> <specification xmi:type="uml:OpaqueExpression"
> xmi:id="ActvityWithOCL-ExtActivity-OCL-containsInputPin"
> name="containsInputPin">
> <language>OCL</language>
> </specification>
> </ownedRule>
> <generalization
> xmi:id="ActvityWithOCL-ExtActivity-_generalization.0">
> <general xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Activity"/>
> </generalization>
> <node xmi:type="uml:CallBehaviorAction"
> xmi:id="ActvityWithOCL-ExtActivity-testGet" name="testGet"/>
> </packagedElement>
> </packagedElement>
> <profileApplication xmi:id="_profileApplication.0">
> <eAnnotations
> xmi:id=" _profileApplication.0-_http2F2Fwww.eclipse.org2Fuml22F2.0.02 FUML "
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href=" pathmap://UML_PROFILES/Standard.profile.uml#_yzU58YinEdqtvbn fB2L_5w"/>
> </eAnnotations>
> <appliedProfile
> href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
> </profileApplication>
> </uml:Model>
> <Standard:Metamodel xmi:id="_mORn4L--Ed2_NN0Jjs2C1w" base_Model="_0"/>
> <Standard:Metaclass xmi:id="_mOax0L--Ed2_NN0Jjs2C1w"
> base_Class="ActvityWithOCL-ExtActivity"/>
> </xmi:XMI>
>


------------------------------------------------------------ --------------------


> <?xml version="1.0" encoding="UTF-8"?>
> <ecore:EPackage xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="testMeta"
> nsURI="http:///testMeta.ecore" nsPrefix="testMeta">
> <eSubpackages name="actvityWithOcl"
> nsURI="http:///testMeta/actvityWithOcl.ecore"
> nsPrefix="testMeta.actvityWithOcl">
> <eClassifiers xsi:type="ecore:EClass" name="ExtActivity"
> eSuperTypes=" platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Acti vity ">
> <eOperations name="ocl" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
> <eParameters name="diagnostics" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="The chain of diagnostics to
> which problems are to be appended."/>
> </eAnnotations>
> </eParameters>
> <eParameters name="context">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="The cache of
> context-specific information."/>
> </eAnnotations>
> <eGenericType eClassifier="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EMap">
> <eTypeArguments eClassifier="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
> <eTypeArguments eClassifier="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
> </eGenericType>
> </eParameters>
> </eOperations>
> </eClassifiers>
> </eSubpackages>
> </ecore:EPackage>
>


Re: Reusing package-element in UML Metamodel extension [message #478114 is a reply to message #478113] Thu, 08 January 2009 08:54 Go to previous messageGo to next message
Eclipse UserFriend
Thanks James !!

That's exactly what I want.

I thought it could be done in with the UML editor itself.

Regards,

Deepak



James Bruck schrieb:
> Hi Deepak,
>
> I think you might want something like in the attachment.
> Try adding the attached .ecore, reloading you .genmodel, then regenerate
> all.
> Let me know if that is what you were looking for.
>
> -James.
>
> "Deepak" <dee_n@gmx.de> wrote in message
> news:gk2a1s$15v$1@build.eclipse.org...
>> Hi James,
>>
>> Yes, I can see the corresponding EPackage but if I run the generated
>> editor I can't insert any UML:Package element in my model. I just start
>> with the Activity element.
>>
>> I attached a sample of my UML extended model and the derived Ecore file.
>>
>> I want to create a specific activity diagram (no value pins, no
>> callbehavior action and some other unnecessary elements) which contains
>> OCL constraints.
>>
>> The layout of my activity diagram should be:
>>
>> uml:package
>> Activity
>> CallOperationAction
>> InputPin
>> OutputPin
>> ControlFlow
>> InitialNode
>> FinalNode....
>>
>>
>> Regards,
>>
>> Deepak
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> James Bruck schrieb:
>>> Hi Deepak,
>>>
>>> If you can see the corresponding EPackage in the EMF model then the EMF
>>> codegenerator should create a package for you.
>>> What does your EMF model look like?
>>>
>>> Cheers,
>>> - James.
>>>
>>>
>>> "Deepak" <dee_n@gmx.de> wrote in message
>>> news:gjr9lq$17g$1@build.eclipse.org...
>>>> Hello,
>>>>
>>>> Is there any possibility to use uml:package in an extended UML-Metamodel
>>>> ?
>>>>
>>>> What I tried so far:
>>>> -Create new UML model (Model Object: Model)
>>>>
>>>> -I add an UML Package element to the model and then I transform this
>>>> model
>>>> to a metamodel (convert to->metamodel).
>>>> After that I generate EMF Model and let EMF create the code for the
>>>> model
>>>> and editor.
>>>>
>>>> When I run the editor there is no UML Package available in my instance
>>>> model.
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Deepak
>>>>
>>>>
>>>>
Re: Reusing package-element in UML Metamodel extension [message #478115 is a reply to message #478114] Thu, 08 January 2009 16:00 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Deepak,

Yes you could do this with UML itself - you can do all your metamodeling
using UML only. Simply create a meta-type called MyPackage that
specializes the Package meta-type from UML. Behind the scenes, the .uml
model gets converted to a .ecore model. EMF codegeneration works with the
..ecore representation. The .ecore representation should look like the
previously attached file - I cut some corners by just jumping to the .ecore
representation.

What you are doing in your example is "meta-modeling" not "modeling". That
is, you are trying to create specializtions of UML meta-types etc. as
opposed to creating a model using *instances* of UML types. It looks like
you created a "Package" which is an instance of the uml:Package metatype
(modeling); what you want to do is create a new meta-type called "MyPackge"
which extends uml:Package (meta-modeling). The "MyPackage" would be
represented with an instance of a MOF meta-type.

Hopefully I didn't overly complicate this ;)

Cheers,
- James.


"Deepak" <dee_n@gmx.de> wrote in message
news:gk4eve$igu$1@build.eclipse.org...
> Thanks James !!
>
> That's exactly what I want.
>
> I thought it could be done in with the UML editor itself.
>
> Regards,
>
> Deepak
>
>
>
> James Bruck schrieb:
>> Hi Deepak,
>>
>> I think you might want something like in the attachment.
>> Try adding the attached .ecore, reloading you .genmodel, then regenerate
>> all.
>> Let me know if that is what you were looking for.
>>
>> -James.
>>
>> "Deepak" <dee_n@gmx.de> wrote in message
>> news:gk2a1s$15v$1@build.eclipse.org...
>>> Hi James,
>>>
>>> Yes, I can see the corresponding EPackage but if I run the generated
>>> editor I can't insert any UML:Package element in my model. I just start
>>> with the Activity element.
>>>
>>> I attached a sample of my UML extended model and the derived Ecore file.
>>>
>>> I want to create a specific activity diagram (no value pins, no
>>> callbehavior action and some other unnecessary elements) which contains
>>> OCL constraints.
>>>
>>> The layout of my activity diagram should be:
>>>
>>> uml:package
>>> Activity
>>> CallOperationAction
>>> InputPin
>>> OutputPin
>>> ControlFlow
>>> InitialNode
>>> FinalNode....
>>>
>>>
>>> Regards,
>>>
>>> Deepak
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> James Bruck schrieb:
>>>> Hi Deepak,
>>>>
>>>> If you can see the corresponding EPackage in the EMF model then the EMF
>>>> codegenerator should create a package for you.
>>>> What does your EMF model look like?
>>>>
>>>> Cheers,
>>>> - James.
>>>>
>>>>
>>>> "Deepak" <dee_n@gmx.de> wrote in message
>>>> news:gjr9lq$17g$1@build.eclipse.org...
>>>>> Hello,
>>>>>
>>>>> Is there any possibility to use uml:package in an extended
>>>>> UML-Metamodel ?
>>>>>
>>>>> What I tried so far:
>>>>> -Create new UML model (Model Object: Model)
>>>>>
>>>>> -I add an UML Package element to the model and then I transform this
>>>>> model
>>>>> to a metamodel (convert to->metamodel).
>>>>> After that I generate EMF Model and let EMF create the code for the
>>>>> model
>>>>> and editor.
>>>>>
>>>>> When I run the editor there is no UML Package available in my instance
>>>>> model.
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Deepak
>>>>>
>>>>>
>>>>>
Re: Reusing package-element in UML Metamodel extension [message #478119 is a reply to message #478115] Fri, 09 January 2009 09:18 Go to previous messageGo to next message
Eclipse UserFriend
Hi James,

Thank you very much for your explanation. I should always keep in mind
the difference between metamodeling and modeling.

This confused me:

The element uml:model will be converted to <<metamodel>> when choosing
"convert to"-->"Metamodel.

So I somehow thought uml:package will also be automatically converted to
<<metapackage>>


Regards,


Deepak







James Bruck schrieb:
> Hi Deepak,
>
> Yes you could do this with UML itself - you can do all your metamodeling
> using UML only. Simply create a meta-type called MyPackage that
> specializes the Package meta-type from UML. Behind the scenes, the .uml
> model gets converted to a .ecore model. EMF codegeneration works with the
> .ecore representation. The .ecore representation should look like the
> previously attached file - I cut some corners by just jumping to the .ecore
> representation.
>
> What you are doing in your example is "meta-modeling" not "modeling". That
> is, you are trying to create specializtions of UML meta-types etc. as
> opposed to creating a model using *instances* of UML types. It looks like
> you created a "Package" which is an instance of the uml:Package metatype
> (modeling); what you want to do is create a new meta-type called "MyPackge"
> which extends uml:Package (meta-modeling). The "MyPackage" would be
> represented with an instance of a MOF meta-type.
>
> Hopefully I didn't overly complicate this ;)
>
> Cheers,
> - James.
>
>
> "Deepak" <dee_n@gmx.de> wrote in message
> news:gk4eve$igu$1@build.eclipse.org...
>> Thanks James !!
>>
>> That's exactly what I want.
>>
>> I thought it could be done in with the UML editor itself.
>>
>> Regards,
>>
>> Deepak
>>
>>
>>
>> James Bruck schrieb:
>>> Hi Deepak,
>>>
>>> I think you might want something like in the attachment.
>>> Try adding the attached .ecore, reloading you .genmodel, then regenerate
>>> all.
>>> Let me know if that is what you were looking for.
>>>
>>> -James.
>>>
>>> "Deepak" <dee_n@gmx.de> wrote in message
>>> news:gk2a1s$15v$1@build.eclipse.org...
>>>> Hi James,
>>>>
>>>> Yes, I can see the corresponding EPackage but if I run the generated
>>>> editor I can't insert any UML:Package element in my model. I just start
>>>> with the Activity element.
>>>>
>>>> I attached a sample of my UML extended model and the derived Ecore file.
>>>>
>>>> I want to create a specific activity diagram (no value pins, no
>>>> callbehavior action and some other unnecessary elements) which contains
>>>> OCL constraints.
>>>>
>>>> The layout of my activity diagram should be:
>>>>
>>>> uml:package
>>>> Activity
>>>> CallOperationAction
>>>> InputPin
>>>> OutputPin
>>>> ControlFlow
>>>> InitialNode
>>>> FinalNode....
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Deepak
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> James Bruck schrieb:
>>>>> Hi Deepak,
>>>>>
>>>>> If you can see the corresponding EPackage in the EMF model then the EMF
>>>>> codegenerator should create a package for you.
>>>>> What does your EMF model look like?
>>>>>
>>>>> Cheers,
>>>>> - James.
>>>>>
>>>>>
>>>>> "Deepak" <dee_n@gmx.de> wrote in message
>>>>> news:gjr9lq$17g$1@build.eclipse.org...
>>>>>> Hello,
>>>>>>
>>>>>> Is there any possibility to use uml:package in an extended
>>>>>> UML-Metamodel ?
>>>>>>
>>>>>> What I tried so far:
>>>>>> -Create new UML model (Model Object: Model)
>>>>>>
>>>>>> -I add an UML Package element to the model and then I transform this
>>>>>> model
>>>>>> to a metamodel (convert to->metamodel).
>>>>>> After that I generate EMF Model and let EMF create the code for the
>>>>>> model
>>>>>> and editor.
>>>>>>
>>>>>> When I run the editor there is no UML Package available in my instance
>>>>>> model.
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Deepak
>>>>>>
>>>>>>
>>>>>>
>
>
UML2 Metamodel extension [message #478154 is a reply to message #478102] Wed, 04 February 2009 11:28 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 6
Registered: July 2009
Junior Member
Hi Deepak,

I am trying to transform a annotated(with MARTE)deployment diagram (source
model in .di2 extension)into another model.

Can I directly use the UML2 metamodel(.ecore) or I need to extend it with
MARTE profile first.

Please can you let me know if the source model file has to be in .ecore
for the transformation to be successful.


Thanks
Re: UML2 Metamodel extension [message #478161 is a reply to message #478154] Thu, 05 February 2009 17:19 Go to previous message
Eclipse UserFriend
Rodrigues schrieb:
> Hi Deepak,
>
> I am trying to transform a annotated(with MARTE)deployment diagram
> (source model in .di2 extension)into another model.
>
> Can I directly use the UML2 metamodel(.ecore) or I need to extend it
> with MARTE profile first.
>
> Please can you let me know if the source model file has to be in .ecore
> for the transformation to be successful.
>
>
> Thanks
>

Hello,

You should better ask in M2M newsgroup :-)

Anyway; if you are using ATL you have to use the UML2 metamodel in ecore.

I think you must use both of them : UML.ecore and Marte Profile


The source model can be in uml.


This would be the first lines in ATL:


module MARTE2AnoterModel

create OUT : UML2 from IN: UML2, MARTEProfile:UML2;

You have to point to the UML.ecore for "UML2" while MARTEProfile will be
directed to the MARTE-Profile.
Re: Reusing package-element in UML Metamodel extension [message #627316 is a reply to message #478102] Tue, 06 January 2009 14:48 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Deepak,

If you can see the corresponding EPackage in the EMF model then the EMF
codegenerator should create a package for you.
What does your EMF model look like?

Cheers,
- James.


"Deepak" <dee_n@gmx.de> wrote in message
news:gjr9lq$17g$1@build.eclipse.org...
> Hello,
>
> Is there any possibility to use uml:package in an extended UML-Metamodel ?
>
> What I tried so far:
> -Create new UML model (Model Object: Model)
>
> -I add an UML Package element to the model and then I transform this model
> to a metamodel (convert to->metamodel).
> After that I generate EMF Model and let EMF create the code for the model
> and editor.
>
> When I run the editor there is no UML Package available in my instance
> model.
>
>
> Regards,
>
> Deepak
>
>
>
Re: Reusing package-element in UML Metamodel extension [message #627317 is a reply to message #478109] Wed, 07 January 2009 13:17 Go to previous message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------060602050409040405070603
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi James,

Yes, I can see the corresponding EPackage but if I run the generated
editor I can't insert any UML:Package element in my model. I just start
with the Activity element.

I attached a sample of my UML extended model and the derived Ecore file.

I want to create a specific activity diagram (no value pins, no
callbehavior action and some other unnecessary elements) which contains
OCL constraints.

The layout of my activity diagram should be:

uml:package
Activity
CallOperationAction
InputPin
OutputPin
ControlFlow
InitialNode
FinalNode....


Regards,

Deepak










James Bruck schrieb:
> Hi Deepak,
>
> If you can see the corresponding EPackage in the EMF model then the EMF
> codegenerator should create a package for you.
> What does your EMF model look like?
>
> Cheers,
> - James.
>
>
> "Deepak" <dee_n@gmx.de> wrote in message
> news:gjr9lq$17g$1@build.eclipse.org...
>> Hello,
>>
>> Is there any possibility to use uml:package in an extended UML-Metamodel ?
>>
>> What I tried so far:
>> -Create new UML model (Model Object: Model)
>>
>> -I add an UML Package element to the model and then I transform this model
>> to a metamodel (convert to->metamodel).
>> After that I generate EMF Model and let EMF create the code for the model
>> and editor.
>>
>> When I run the editor there is no UML Package available in my instance
>> model.
>>
>>
>> Regards,
>>
>> Deepak
>>
>>
>>
>
>


--------------060602050409040405070603
Content-Type: text/xml;
name="My.uml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="My.uml"

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Standard="http://www.eclipse.org/uml2/schemas/Standard/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Standard/1 pathmap://UML_PROFILES/Standard.profile.uml#_yzU58YinEdqtvbn fB2L_5w">
<uml:Model xmi:id="_0" name="TestMeta">
<packagedElement xmi:type="uml:Package" xmi:id="ActvityWithOCL" name="ActvityWithOCL">
<packagedElement xmi:type="uml:Activity" xmi:id="ActvityWithOCL-ExtActivity" name="ExtActivity" precondition="ActvityWithOCL-ExtActivity-OCL">
<ownedRule xmi:id="ActvityWithOCL-ExtActivity-OCL" name="OCL">
<specification xmi:type="uml:OpaqueExpression" xmi:id="ActvityWithOCL-ExtActivity-OCL-containsInputPin" name="containsInputPin">
<language>OCL</language>
</specification>
</ownedRule>
<generalization xmi:id="ActvityWithOCL-ExtActivity-_generalization.0">
<general xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Activity"/>
</generalization>
<node xmi:type="uml:CallBehaviorAction" xmi:id="ActvityWithOCL-ExtActivity-testGet" name="testGet"/>
</packagedElement>
</packagedElement>
<profileApplication xmi:id="_profileApplication.0">
<eAnnotations xmi:id=" _profileApplication.0-_http2F2Fwww.eclipse.org2Fuml22F2.0.02 FUML " source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href=" pathmap://UML_PROFILES/Standard.profile.uml#_yzU58YinEdqtvbn fB2L_5w"/>
</eAnnotations>
<appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
</profileApplication>
</uml:Model>
<Standard:Metamodel xmi:id="_mORn4L--Ed2_NN0Jjs2C1w" base_Model="_0"/>
<Standard:Metaclass xmi:id="_mOax0L--Ed2_NN0Jjs2C1w" base_Class="ActvityWithOCL-ExtActivity"/>
</xmi:XMI>

--------------060602050409040405070603
Content-Type: text/xml;
name="testMeta.ecore"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="testMeta.ecore"

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="testMeta"
nsURI="http:///testMeta.ecore" nsPrefix="testMeta">
<eSubpackages name="actvityWithOcl" nsURI="http:///testMeta/actvityWithOcl.ecore"
nsPrefix="testMeta.actvityWithOcl">
<eClassifiers xsi:type="ecore:EClass" name="ExtActivity" eSuperTypes=" platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Acti vity ">
<eOperations name="ocl" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The chain of diagnostics to which problems are to be appended."/>
</eAnnotations>
</eParameters>
<eParameters name="context">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The cache of context-specific information."/>
</eAnnotations>
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
<eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
</eGenericType>
</eParameters>
</eOperations>
</eClassifiers>
</eSubpackages>
</ecore:EPackage>

--------------060602050409040405070603--
Re: Reusing package-element in UML Metamodel extension [message #627320 is a reply to message #478110] Wed, 07 January 2009 18:37 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Deepak,

I think you might want something like in the attachment.
Try adding the attached .ecore, reloading you .genmodel, then regenerate
all.
Let me know if that is what you were looking for.

-James.

"Deepak" <dee_n@gmx.de> wrote in message
news:gk2a1s$15v$1@build.eclipse.org...
> Hi James,
>
> Yes, I can see the corresponding EPackage but if I run the generated
> editor I can't insert any UML:Package element in my model. I just start
> with the Activity element.
>
> I attached a sample of my UML extended model and the derived Ecore file.
>
> I want to create a specific activity diagram (no value pins, no
> callbehavior action and some other unnecessary elements) which contains
> OCL constraints.
>
> The layout of my activity diagram should be:
>
> uml:package
> Activity
> CallOperationAction
> InputPin
> OutputPin
> ControlFlow
> InitialNode
> FinalNode....
>
>
> Regards,
>
> Deepak
>
>
>
>
>
>
>
>
>
>
> James Bruck schrieb:
>> Hi Deepak,
>>
>> If you can see the corresponding EPackage in the EMF model then the EMF
>> codegenerator should create a package for you.
>> What does your EMF model look like?
>>
>> Cheers,
>> - James.
>>
>>
>> "Deepak" <dee_n@gmx.de> wrote in message
>> news:gjr9lq$17g$1@build.eclipse.org...
>>> Hello,
>>>
>>> Is there any possibility to use uml:package in an extended UML-Metamodel
>>> ?
>>>
>>> What I tried so far:
>>> -Create new UML model (Model Object: Model)
>>>
>>> -I add an UML Package element to the model and then I transform this
>>> model
>>> to a metamodel (convert to->metamodel).
>>> After that I generate EMF Model and let EMF create the code for the
>>> model
>>> and editor.
>>>
>>> When I run the editor there is no UML Package available in my instance
>>> model.
>>>
>>>
>>> Regards,
>>>
>>> Deepak
>>>
>>>
>>>
>>
>>
>
>


------------------------------------------------------------ --------------------


> <?xml version="1.0" encoding="UTF-8"?>
> <xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:Standard="http://www.eclipse.org/uml2/schemas/Standard/1"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
> xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Standard/1
> pathmap://UML_PROFILES/Standard.profile.uml#_yzU58YinEdqtvbn fB2L_5w">
> <uml:Model xmi:id="_0" name="TestMeta">
> <packagedElement xmi:type="uml:Package" xmi:id="ActvityWithOCL"
> name="ActvityWithOCL">
> <packagedElement xmi:type="uml:Activity"
> xmi:id="ActvityWithOCL-ExtActivity" name="ExtActivity"
> precondition="ActvityWithOCL-ExtActivity-OCL">
> <ownedRule xmi:id="ActvityWithOCL-ExtActivity-OCL" name="OCL">
> <specification xmi:type="uml:OpaqueExpression"
> xmi:id="ActvityWithOCL-ExtActivity-OCL-containsInputPin"
> name="containsInputPin">
> <language>OCL</language>
> </specification>
> </ownedRule>
> <generalization
> xmi:id="ActvityWithOCL-ExtActivity-_generalization.0">
> <general xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Activity"/>
> </generalization>
> <node xmi:type="uml:CallBehaviorAction"
> xmi:id="ActvityWithOCL-ExtActivity-testGet" name="testGet"/>
> </packagedElement>
> </packagedElement>
> <profileApplication xmi:id="_profileApplication.0">
> <eAnnotations
> xmi:id=" _profileApplication.0-_http2F2Fwww.eclipse.org2Fuml22F2.0.02 FUML "
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href=" pathmap://UML_PROFILES/Standard.profile.uml#_yzU58YinEdqtvbn fB2L_5w"/>
> </eAnnotations>
> <appliedProfile
> href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
> </profileApplication>
> </uml:Model>
> <Standard:Metamodel xmi:id="_mORn4L--Ed2_NN0Jjs2C1w" base_Model="_0"/>
> <Standard:Metaclass xmi:id="_mOax0L--Ed2_NN0Jjs2C1w"
> base_Class="ActvityWithOCL-ExtActivity"/>
> </xmi:XMI>
>


------------------------------------------------------------ --------------------


> <?xml version="1.0" encoding="UTF-8"?>
> <ecore:EPackage xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="testMeta"
> nsURI="http:///testMeta.ecore" nsPrefix="testMeta">
> <eSubpackages name="actvityWithOcl"
> nsURI="http:///testMeta/actvityWithOcl.ecore"
> nsPrefix="testMeta.actvityWithOcl">
> <eClassifiers xsi:type="ecore:EClass" name="ExtActivity"
> eSuperTypes=" platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Acti vity ">
> <eOperations name="ocl" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
> <eParameters name="diagnostics" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="The chain of diagnostics to
> which problems are to be appended."/>
> </eAnnotations>
> </eParameters>
> <eParameters name="context">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="The cache of
> context-specific information."/>
> </eAnnotations>
> <eGenericType eClassifier="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EMap">
> <eTypeArguments eClassifier="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
> <eTypeArguments eClassifier="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
> </eGenericType>
> </eParameters>
> </eOperations>
> </eClassifiers>
> </eSubpackages>
> </ecore:EPackage>
>


Re: Reusing package-element in UML Metamodel extension [message #627321 is a reply to message #478113] Thu, 08 January 2009 08:54 Go to previous message
Eclipse UserFriend
Thanks James !!

That's exactly what I want.

I thought it could be done in with the UML editor itself.

Regards,

Deepak



James Bruck schrieb:
> Hi Deepak,
>
> I think you might want something like in the attachment.
> Try adding the attached .ecore, reloading you .genmodel, then regenerate
> all.
> Let me know if that is what you were looking for.
>
> -James.
>
> "Deepak" <dee_n@gmx.de> wrote in message
> news:gk2a1s$15v$1@build.eclipse.org...
>> Hi James,
>>
>> Yes, I can see the corresponding EPackage but if I run the generated
>> editor I can't insert any UML:Package element in my model. I just start
>> with the Activity element.
>>
>> I attached a sample of my UML extended model and the derived Ecore file.
>>
>> I want to create a specific activity diagram (no value pins, no
>> callbehavior action and some other unnecessary elements) which contains
>> OCL constraints.
>>
>> The layout of my activity diagram should be:
>>
>> uml:package
>> Activity
>> CallOperationAction
>> InputPin
>> OutputPin
>> ControlFlow
>> InitialNode
>> FinalNode....
>>
>>
>> Regards,
>>
>> Deepak
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> James Bruck schrieb:
>>> Hi Deepak,
>>>
>>> If you can see the corresponding EPackage in the EMF model then the EMF
>>> codegenerator should create a package for you.
>>> What does your EMF model look like?
>>>
>>> Cheers,
>>> - James.
>>>
>>>
>>> "Deepak" <dee_n@gmx.de> wrote in message
>>> news:gjr9lq$17g$1@build.eclipse.org...
>>>> Hello,
>>>>
>>>> Is there any possibility to use uml:package in an extended UML-Metamodel
>>>> ?
>>>>
>>>> What I tried so far:
>>>> -Create new UML model (Model Object: Model)
>>>>
>>>> -I add an UML Package element to the model and then I transform this
>>>> model
>>>> to a metamodel (convert to->metamodel).
>>>> After that I generate EMF Model and let EMF create the code for the
>>>> model
>>>> and editor.
>>>>
>>>> When I run the editor there is no UML Package available in my instance
>>>> model.
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Deepak
>>>>
>>>>
>>>>
Re: Reusing package-element in UML Metamodel extension [message #627322 is a reply to message #478114] Thu, 08 January 2009 16:00 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Deepak,

Yes you could do this with UML itself - you can do all your metamodeling
using UML only. Simply create a meta-type called MyPackage that
specializes the Package meta-type from UML. Behind the scenes, the .uml
model gets converted to a .ecore model. EMF codegeneration works with the
..ecore representation. The .ecore representation should look like the
previously attached file - I cut some corners by just jumping to the .ecore
representation.

What you are doing in your example is "meta-modeling" not "modeling". That
is, you are trying to create specializtions of UML meta-types etc. as
opposed to creating a model using *instances* of UML types. It looks like
you created a "Package" which is an instance of the uml:Package metatype
(modeling); what you want to do is create a new meta-type called "MyPackge"
which extends uml:Package (meta-modeling). The "MyPackage" would be
represented with an instance of a MOF meta-type.

Hopefully I didn't overly complicate this ;)

Cheers,
- James.


"Deepak" <dee_n@gmx.de> wrote in message
news:gk4eve$igu$1@build.eclipse.org...
> Thanks James !!
>
> That's exactly what I want.
>
> I thought it could be done in with the UML editor itself.
>
> Regards,
>
> Deepak
>
>
>
> James Bruck schrieb:
>> Hi Deepak,
>>
>> I think you might want something like in the attachment.
>> Try adding the attached .ecore, reloading you .genmodel, then regenerate
>> all.
>> Let me know if that is what you were looking for.
>>
>> -James.
>>
>> "Deepak" <dee_n@gmx.de> wrote in message
>> news:gk2a1s$15v$1@build.eclipse.org...
>>> Hi James,
>>>
>>> Yes, I can see the corresponding EPackage but if I run the generated
>>> editor I can't insert any UML:Package element in my model. I just start
>>> with the Activity element.
>>>
>>> I attached a sample of my UML extended model and the derived Ecore file.
>>>
>>> I want to create a specific activity diagram (no value pins, no
>>> callbehavior action and some other unnecessary elements) which contains
>>> OCL constraints.
>>>
>>> The layout of my activity diagram should be:
>>>
>>> uml:package
>>> Activity
>>> CallOperationAction
>>> InputPin
>>> OutputPin
>>> ControlFlow
>>> InitialNode
>>> FinalNode....
>>>
>>>
>>> Regards,
>>>
>>> Deepak
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> James Bruck schrieb:
>>>> Hi Deepak,
>>>>
>>>> If you can see the corresponding EPackage in the EMF model then the EMF
>>>> codegenerator should create a package for you.
>>>> What does your EMF model look like?
>>>>
>>>> Cheers,
>>>> - James.
>>>>
>>>>
>>>> "Deepak" <dee_n@gmx.de> wrote in message
>>>> news:gjr9lq$17g$1@build.eclipse.org...
>>>>> Hello,
>>>>>
>>>>> Is there any possibility to use uml:package in an extended
>>>>> UML-Metamodel ?
>>>>>
>>>>> What I tried so far:
>>>>> -Create new UML model (Model Object: Model)
>>>>>
>>>>> -I add an UML Package element to the model and then I transform this
>>>>> model
>>>>> to a metamodel (convert to->metamodel).
>>>>> After that I generate EMF Model and let EMF create the code for the
>>>>> model
>>>>> and editor.
>>>>>
>>>>> When I run the editor there is no UML Package available in my instance
>>>>> model.
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Deepak
>>>>>
>>>>>
>>>>>
Re: Reusing package-element in UML Metamodel extension [message #627326 is a reply to message #478115] Fri, 09 January 2009 09:18 Go to previous message
Eclipse UserFriend
Hi James,

Thank you very much for your explanation. I should always keep in mind
the difference between metamodeling and modeling.

This confused me:

The element uml:model will be converted to <<metamodel>> when choosing
"convert to"-->"Metamodel.

So I somehow thought uml:package will also be automatically converted to
<<metapackage>>


Regards,


Deepak







James Bruck schrieb:
> Hi Deepak,
>
> Yes you could do this with UML itself - you can do all your metamodeling
> using UML only. Simply create a meta-type called MyPackage that
> specializes the Package meta-type from UML. Behind the scenes, the .uml
> model gets converted to a .ecore model. EMF codegeneration works with the
> .ecore representation. The .ecore representation should look like the
> previously attached file - I cut some corners by just jumping to the .ecore
> representation.
>
> What you are doing in your example is "meta-modeling" not "modeling". That
> is, you are trying to create specializtions of UML meta-types etc. as
> opposed to creating a model using *instances* of UML types. It looks like
> you created a "Package" which is an instance of the uml:Package metatype
> (modeling); what you want to do is create a new meta-type called "MyPackge"
> which extends uml:Package (meta-modeling). The "MyPackage" would be
> represented with an instance of a MOF meta-type.
>
> Hopefully I didn't overly complicate this ;)
>
> Cheers,
> - James.
>
>
> "Deepak" <dee_n@gmx.de> wrote in message
> news:gk4eve$igu$1@build.eclipse.org...
>> Thanks James !!
>>
>> That's exactly what I want.
>>
>> I thought it could be done in with the UML editor itself.
>>
>> Regards,
>>
>> Deepak
>>
>>
>>
>> James Bruck schrieb:
>>> Hi Deepak,
>>>
>>> I think you might want something like in the attachment.
>>> Try adding the attached .ecore, reloading you .genmodel, then regenerate
>>> all.
>>> Let me know if that is what you were looking for.
>>>
>>> -James.
>>>
>>> "Deepak" <dee_n@gmx.de> wrote in message
>>> news:gk2a1s$15v$1@build.eclipse.org...
>>>> Hi James,
>>>>
>>>> Yes, I can see the corresponding EPackage but if I run the generated
>>>> editor I can't insert any UML:Package element in my model. I just start
>>>> with the Activity element.
>>>>
>>>> I attached a sample of my UML extended model and the derived Ecore file.
>>>>
>>>> I want to create a specific activity diagram (no value pins, no
>>>> callbehavior action and some other unnecessary elements) which contains
>>>> OCL constraints.
>>>>
>>>> The layout of my activity diagram should be:
>>>>
>>>> uml:package
>>>> Activity
>>>> CallOperationAction
>>>> InputPin
>>>> OutputPin
>>>> ControlFlow
>>>> InitialNode
>>>> FinalNode....
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Deepak
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> James Bruck schrieb:
>>>>> Hi Deepak,
>>>>>
>>>>> If you can see the corresponding EPackage in the EMF model then the EMF
>>>>> codegenerator should create a package for you.
>>>>> What does your EMF model look like?
>>>>>
>>>>> Cheers,
>>>>> - James.
>>>>>
>>>>>
>>>>> "Deepak" <dee_n@gmx.de> wrote in message
>>>>> news:gjr9lq$17g$1@build.eclipse.org...
>>>>>> Hello,
>>>>>>
>>>>>> Is there any possibility to use uml:package in an extended
>>>>>> UML-Metamodel ?
>>>>>>
>>>>>> What I tried so far:
>>>>>> -Create new UML model (Model Object: Model)
>>>>>>
>>>>>> -I add an UML Package element to the model and then I transform this
>>>>>> model
>>>>>> to a metamodel (convert to->metamodel).
>>>>>> After that I generate EMF Model and let EMF create the code for the
>>>>>> model
>>>>>> and editor.
>>>>>>
>>>>>> When I run the editor there is no UML Package available in my instance
>>>>>> model.
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Deepak
>>>>>>
>>>>>>
>>>>>>
>
>
UML2 Metamodel extension [message #627359 is a reply to message #478102] Wed, 04 February 2009 11:28 Go to previous message
No real name is currently offline No real nameFriend
Messages: 6
Registered: July 2009
Junior Member
Hi Deepak,

I am trying to transform a annotated(with MARTE)deployment diagram (source
model in .di2 extension)into another model.

Can I directly use the UML2 metamodel(.ecore) or I need to extend it with
MARTE profile first.

Please can you let me know if the source model file has to be in .ecore
for the transformation to be successful.


Thanks
Re: UML2 Metamodel extension [message #627367 is a reply to message #478154] Thu, 05 February 2009 17:19 Go to previous message
Eclipse UserFriend
Rodrigues schrieb:
> Hi Deepak,
>
> I am trying to transform a annotated(with MARTE)deployment diagram
> (source model in .di2 extension)into another model.
>
> Can I directly use the UML2 metamodel(.ecore) or I need to extend it
> with MARTE profile first.
>
> Please can you let me know if the source model file has to be in .ecore
> for the transformation to be successful.
>
>
> Thanks
>

Hello,

You should better ask in M2M newsgroup :-)

Anyway; if you are using ATL you have to use the UML2 metamodel in ecore.

I think you must use both of them : UML.ecore and Marte Profile


The source model can be in uml.


This would be the first lines in ATL:


module MARTE2AnoterModel

create OUT : UML2 from IN: UML2, MARTEProfile:UML2;

You have to point to the UML.ecore for "UML2" while MARTEProfile will be
directed to the MARTE-Profile.
Previous Topic:No automatic generation of OCL classes
Next Topic:API for manipulating UML Profiled
Goto Forum:
  


Current Time: Wed Apr 24 22:27:03 GMT 2024

Powered by FUDForum. Page generated in 0.05774 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top