Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » No automatic generation of OCL classes
No automatic generation of OCL classes [message #627366] Thu, 05 February 2009 17:09
Deepak is currently offline DeepakFriend
Messages: 53
Registered: July 2009
Member
This is a multi-part message in MIME format.
--------------040205090000060103060409
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hello,

I have a metamodel in UML and I want to attach some OCL expressions to it.

In order to get my OCL code in my metamodel I followed this presentation:


http://www.eclipse.org/modeling/mdt/uml2/docs/presentations/ EclipseCon2008_LongTalk_NewFeaturesOfUML2.html


My metaclass contains a "constraint" which in turns contains the "Opaque
Expression".

I set "OCL" to the property field "Language" and the "Body" contains my
OCL expression.

I chose "Process all" for creating the genmodel.

However no OCL related files were generated.

What am I doing wrong ?

I attached the my uml model.


Thanks in advance,


Deepak

--------------040205090000060103060409
Content-Type: text/xml;
name="Test.Behavior.Commons.uml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Test.Behavior.Commons.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="TestMode">
<packagedElement xmi:type="uml:Package" xmi:id="SUM.Behavior.Activities" name="Test.Behavior.Activities">
<packagedElement xmi:type="uml:Class" xmi:id="SUM.Behavior.Activities-K2Activity" name="TestActivity">
<generalization xmi:id="SUM.Behavior.Activities-K2Activity-_generalization.0 ">
<general xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Activity"/>
</generalization>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="SUM.Behavior.Activities-K2CallOperationAction" name="TestCallOperationAction">
<generalization xmi:id=" SUM.Behavior.Activities-K2CallOperationAction-_generalizatio n.0 ">
<general xmi:type="uml:Class" href=" pathmap://UML_METAMODELS/UML.metamodel.uml#CallOperationActi on"/>
</generalization>
</packagedElement>
</packagedElement>
<packagedElement xmi:type="uml:Package" xmi:id="SUM.Structure.Classes" name="Test.Structure.Class">
<packagedElement xmi:type="uml:Class" xmi:id="SUM.Structure.Classes-ComponentClass" name="TestClass">
<generalization xmi:id="SUM.Structure.Classes-ComponentClass-_generalization.0 ">
<general xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
</generalization>
<ownedAttribute xmi:id="SUM.Structure.Classes-ComponentClass-_ownedAttribute.0 " type="SUM.Behavior.Activities-K2CallOperationAction" association="SUM.Structure.Classes-_ClassComp_to_K2Op">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_m9dMYPOjEd23f4Okph-UlQ" value="*"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="SUM.Structure.Classes-K2Operation" name="TestOperation">
<ownedRule xmi:id="SUM.Structure.Classes-K2Operation-_ownedRule.0">
<specification xmi:type="uml:OpaqueExpression" xmi:id=" SUM.Structure.Classes-K2Operation-_ownedRule.0-_specificatio n ">
<language>OCL</language>
<body>method->oclIsKindOf(TestActivity)</body>
</specification>
</ownedRule>
<generalization xmi:id="SUM.Structure.Classes-K2Operation-_generalization.0 ">
<general xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
</generalization>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="SUM.Structure.Classes-_ClassComp_to_K2Op" name="_ClassComp_to_TestOp" visibility="private" memberEnd="SUM.Structure.Classes-ComponentClass-_ownedAttribute.0 _OxSRYPOlEd23f4Okph-UlQ">
<ownedEnd xmi:id="_OxSRYPOlEd23f4Okph-UlQ" type="SUM.Structure.Classes-ComponentClass" association="SUM.Structure.Classes-_ClassComp_to_K2Op">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_YeqVoPOlEd23f4Okph-UlQ" value="*"/>
</ownedEnd>
</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="_F5TKkPOFEd2E4LeBnWmniQ" base_Model="_0"/>
<Standard:Metaclass xmi:id="_NeL4UPOFEd2E4LeBnWmniQ" base_Class="SUM.Structure.Classes-ComponentClass"/>
<Standard:Metaclass xmi:id="_cd0gYPOFEd2E4LeBnWmniQ"/>
<Standard:Metaclass xmi:id="_FEKncPOHEd2E4LeBnWmniQ" base_Class="SUM.Structure.Classes-K2Operation"/>
<Standard:Metaclass xmi:id="_aUQPAPOJEd2E4LeBnWmniQ" base_Class="SUM.Behavior.Activities-K2Activity"/>
<Standard:Metaclass xmi:id="_aUQPAfOJEd2E4LeBnWmniQ" base_Class="SUM.Behavior.Activities-K2CallOperationAction"/ >
</xmi:XMI>

--------------040205090000060103060409--
Previous Topic:Re: Using UML Profiles with EMF
Next Topic:Reusing package-element in UML Metamodel extension
Goto Forum:
  


Current Time: Mon Mar 30 10:18:11 GMT 2020

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

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

Back to the top