Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Acceleo 3 Problem with Stereotypes(Running through an Activity Diagram created with MagicDraw and trying to find the pre-defined stereotypes)
Acceleo 3 Problem with Stereotypes [message #649565] Wed, 19 January 2011 18:00 Go to next message
woife  is currently offline woife Friend
Messages: 3
Registered: January 2011
Junior Member
Hey there, i could use a little help. I am trying to generate code from an activity diagram made with MagicDraw

I finally understood how to go through the control flow of the diagram. Now i want to check, if a specific activity node has a pre-defined stereotype.

i tried something like this:


[template public generate_activities(a : Activity)]
	
	[comment @main /]
	[file (a.name.concat('Activity.java'), false, 'UTF-8')]	
	[for (i : InitialNode | a.ownedElement->filter(InitialNode))]
	[getNodeFlow(i)/]
	[/for]
	[/file]	
[/template]


[template public getNodeFlow(node : ActivityNode)]
[for (n: ActivityEdge | node.outgoing)]
[if not (n.target.oclIsKindOf(ActivityFinalNode))]

--
[n.target.name /]
[if (n.hasKeyword('stereotype'))]
gefunden
[/if]
[if (n.hasValue(stereotype,'ViewCall'))]
gefunden
[/if]
--

[getNodeFlow(n.target)/]
[/if]
[/for]
[/template]



apparently that is not working... thanks for your help...
Re: Acceleo 3 Problem with Stereotypes [message #649713 is a reply to message #649565] Thu, 20 January 2011 12:16 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

We will need a bit more information in order to help you:

1- could you give me the ouput of this :
[template public generate_activities(a : Activity)]	
	[comment @main /]
	[file (a.name.concat('Activity.java'), false, 'UTF-8')]	
	[for (i : InitialNode | a.ownedElement->filter(InitialNode))]
	[i/]
	[/for]
	[/file]	
[/template]


Because in Acceleo, "i" is also an implicit counter for the "for" and we had a bug with this and since I don't know the version of Acceleo that you are using, you may be affected by the bug.

2- if "i" is not an integer but really an InitialNode, try this :
[template public generate_activities(a : Activity)]
	
	[comment @main /]
	[file (a.name.concat('Activity.java'), false, 'UTF-8')]	
        Step 0
	[for (i : InitialNode | a.ownedElement->filter(InitialNode))]
        Step 1
	[getNodeFlow(i)/]
	[/for]
	[/file]	
[/template]


[template public getNodeFlow(node : ActivityNode)]
Step 2
[for (n: ActivityEdge | node.outgoing)]
Step 3
[if not (n.target.oclIsKindOf(ActivityFinalNode))]
Step 4: "[n/]"
--
[n.target.name /]
[if (n.hasKeyword('stereotype'))]
gefunden
[/if]
[if (n.hasValue(stereotype,'ViewCall'))]
gefunden
[/if]
--

[getNodeFlow(n.target)/]
[/if]
[/for]
[/template]


What is the output ? (maybe one of your variable as not the type that you are imagining or maybe it is null, I don't know so let's try something simple)


Stephane Begaudeau, Obeo.
Re: Acceleo 3 Problem with Stereotypes [message #649758 is a reply to message #649713] Thu, 20 January 2011 14:34 Go to previous messageGo to next message
woife  is currently offline woife Friend
Messages: 3
Registered: January 2011
Junior Member
Hello Stephane,

thanks for the quick reply!

the output of 1 is:

	org.eclipse.uml2.uml.internal.impl.InitialNodeImpl@cacce0 (name: Start, visibility: public) (isLeaf: false)


the output of 2 is:

        Step 0
        Step 1
	Step 2
	Step 3
	Step 4: "org.eclipse.uml2.uml.internal.impl.ControlFlowImpl@10bc1d5 (name: , visibility: public) (isLeaf: false)"
	--
	katalogdurchsuchen
	--
	
	Step 2
	Step 3
	Step 4: "org.eclipse.uml2.uml.internal.impl.ControlFlowImpl@1ef3229 (name: , visibility: public) (isLeaf: false)"
	--
	serversuchen
	--
	
	Step 2
	Step 3
	
	Step 3
	Step 4: "org.eclipse.uml2.uml.internal.impl.ObjectFlowImpl@1dbd0c7 (name: , visibility: public) (isLeaf: false) (isMulticast: false, isMultireceive: false)"
	--
	
	--
	
	Step 2


Maybe the problem is in the uml file i used as a model exported of MagicDraw? Maybe it would help you attach the uml file?

<?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:MagicDrawProfile="http:///schemas/MagicDrawProfile/_KAH_ECPkEeCnhqG_XlMkcQ/0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:stereotypes="http:///schemas/stereotypes/_KARJACPkEeCnhqG_XlMkcQ/0" xmlns:uml="http://www.eclipse.org/uml2/2.0.0/UML" xsi:schemaLocation="http:///schemas/MagicDrawProfile/_KAH_ECPkEeCnhqG_XlMkcQ/0 UML_Standard_Profile.MagicDraw_Profile.profile.uml#_KK99NiPkEeCnhqG_XlMkcQ http:///schemas/stereotypes/_KARJACPkEeCnhqG_XlMkcQ/0 stereotypes.profile.uml#_KK8IgyPkEeCnhqG_XlMkcQ">
  <uml:Model xmi:id="eee_1045467100313_135436_1" name="Data" viewpoint="">
    <ownedComment xmi:id="_17_0_68b0220_1295258916497_446998_1515" body="Author:wolfg.&#xA;Created:17.01.11 11:08.&#xA;Title:.&#xA;Comment:.&#xA;" annotatedElement="eee_1045467100313_135436_1"/>
    <packageImport xmi:id="_0primitiveTypesData">
      <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
    </packageImport>
    <packageImport xmi:id="_0javaPrimitiveTypesData">
      <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/JavaPrimitiveTypes.library.uml#_0"/>
    </packageImport>
    <packagedElement xmi:type="uml:Class" xmi:id="_17_0_68b0220_1295258923528_878974_1709" name="katalogdurchsuchen_view">
      <ownedAttribute xmi:id="_17_0_68b0220_1295261033066_687720_1900" name="" visibility="private" type="_17_0_68b0220_1295258923528_890038_1718" association="_17_0_68b0220_1295261033066_641305_1898"/>
      <ownedAttribute xmi:id="_17_0_68b0220_1295261049863_512070_1913" name="" visibility="private" type="_17_0_68b0220_1295258923528_3285_1714" association="_17_0_68b0220_1295261049863_72811_1911"/>
      <ownedAttribute xmi:id="_17_0_68b0220_1295261055347_810237_1926" name="" visibility="private" type="_17_0_68b0220_1295258923528_914304_1712" association="_17_0_68b0220_1295261055347_866833_1924"/>
      <ownedAttribute xmi:id="_17_0_68b0220_1295261069159_721650_1939" name="" visibility="private" type="_17_0_68b0220_1295258923528_213462_1716" association="_17_0_68b0220_1295261069159_844530_1937"/>
      <ownedAttribute xmi:id="_17_0_68b0220_1295261072269_773591_1952" name="" visibility="private" type="_17_0_68b0220_1295258923528_2049_1710" association="_17_0_68b0220_1295261072269_605166_1950"/>
      <ownedAttribute xmi:id="_16_5_4_59401f5_1295433714457_820246_497" name="" visibility="private" type="_17_0_68b0220_1295258923528_213462_1716" association="_16_5_4_59401f5_1295433714457_828116_496"/>
      <ownedAttribute xmi:id="_16_5_4_59401f5_1295433717252_407405_510" name="" visibility="private" type="_17_0_68b0220_1295258923528_2049_1710" association="_16_5_4_59401f5_1295433717252_972662_509"/>
      <ownedAttribute xmi:id="_16_5_4_59401f5_1295433720469_119454_523" name="" visibility="private" type="_17_0_68b0220_1295258923528_914304_1712" association="_16_5_4_59401f5_1295433720469_42806_522"/>
      <ownedAttribute xmi:id="_16_5_4_59401f5_1295433731473_259755_536" name="" visibility="private" type="_17_0_68b0220_1295258923528_890038_1718" association="_16_5_4_59401f5_1295433731473_110855_535"/>
      <ownedAttribute xmi:id="_16_5_4_59401f5_1295433735168_946117_549" name="" visibility="private" type="_17_0_68b0220_1295258923528_3285_1714" association="_16_5_4_59401f5_1295433735168_946129_548"/>
    </packagedElement>
    <packagedElement xmi:type="uml:Class" xmi:id="_17_0_68b0220_1295258923528_2049_1710" name="titellabel_label">
      <ownedAttribute xmi:id="_17_0_68b0220_1295258923528_297490_1711" name="caption" visibility="private">
        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
        <defaultValue xmi:type="uml:LiteralString" xmi:id="_17_0_68b0220_1295258923544_228960_1733" name="" value="Ersatzteilkatalog durchsuchen"/>
      </ownedAttribute>
      <ownedAttribute xmi:id="_17_0_68b0220_1295261072269_546904_1951" name="" visibility="private" type="_17_0_68b0220_1295258923528_878974_1709" association="_17_0_68b0220_1295261072269_605166_1950"/>
      <ownedAttribute xmi:id="_16_5_4_59401f5_1295433717252_547999_511" name="" visibility="private" type="_17_0_68b0220_1295258923528_878974_1709" association="_16_5_4_59401f5_1295433717252_972662_509"/>
    </packagedElement>
    <packagedElement xmi:type="uml:Class" xmi:id="_17_0_68b0220_1295258923528_914304_1712" name="suchlabel_label">
      <ownedAttribute xmi:id="_17_0_68b0220_1295258923528_678903_1713" name="caption" visibility="private">
        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
        <defaultValue xmi:type="uml:LiteralString" xmi:id="_17_0_68b0220_1295258923544_131823_1735" name="" value="Bezeichnung"/>
      </ownedAttribute>
      <ownedAttribute xmi:id="_17_0_68b0220_1295261055347_587074_1925" name="" visibility="private" type="_17_0_68b0220_1295258923528_878974_1709" association="_17_0_68b0220_1295261055347_866833_1924"/>
      <ownedAttribute xmi:id="_16_5_4_59401f5_1295433720469_554000_524" name="" visibility="private" type="_17_0_68b0220_1295258923528_878974_1709" association="_16_5_4_59401f5_1295433720469_42806_522"/>
    </packagedElement>
    <packagedElement xmi:type="uml:Class" xmi:id="_17_0_68b0220_1295258923528_3285_1714" name="suche_textfield">
      <ownedAttribute xmi:id="_17_0_68b0220_1295258923528_158888_1715" name="binding" visibility="private">
        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
      </ownedAttribute>
      <ownedAttribute xmi:id="_17_0_68b0220_1295261049863_336854_1912" name="" visibility="private" type="_17_0_68b0220_1295258923528_878974_1709" association="_17_0_68b0220_1295261049863_72811_1911"/>
      <ownedAttribute xmi:id="_16_5_4_59401f5_1295433735168_922483_550" name="" visibility="private" type="_17_0_68b0220_1295258923528_878974_1709" association="_16_5_4_59401f5_1295433735168_946129_548"/>
    </packagedElement>
    <packagedElement xmi:type="uml:Class" xmi:id="_17_0_68b0220_1295258923528_213462_1716" name="khslogo_picture">
      <ownedAttribute xmi:id="_17_0_68b0220_1295258923528_893606_1717" name="file" visibility="private">
        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
        <defaultValue xmi:type="uml:LiteralString" xmi:id="_17_0_68b0220_1295273637282_359223_1678" name="" value="khslogo"/>
      </ownedAttribute>
      <ownedAttribute xmi:id="_17_0_68b0220_1295261069159_282101_1938" name="" visibility="private" type="_17_0_68b0220_1295258923528_878974_1709" association="_17_0_68b0220_1295261069159_844530_1937"/>
      <ownedAttribute xmi:id="_16_5_4_59401f5_1295433714458_667906_498" name="" visibility="private" type="_17_0_68b0220_1295258923528_878974_1709" association="_16_5_4_59401f5_1295433714457_828116_496"/>
    </packagedElement>
    <packagedElement xmi:type="uml:Class" xmi:id="_17_0_68b0220_1295258923528_890038_1718" name="suchen_button">
      <ownedAttribute xmi:id="_17_0_68b0220_1295258923528_851366_1719" name="caption" visibility="private">
        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
        <defaultValue xmi:type="uml:LiteralString" xmi:id="_17_0_68b0220_1295258923544_402300_1740" name="" value="suchen"/>
      </ownedAttribute>
      <ownedAttribute xmi:id="_17_0_68b0220_1295258923528_576721_1720" name="outcome" visibility="private">
        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
        <defaultValue xmi:type="uml:LiteralString" xmi:id="_17_0_68b0220_1295258923544_479156_1741" name="" value="ErsatzteilSuchen"/>
      </ownedAttribute>
      <ownedAttribute xmi:id="_17_0_68b0220_1295258923528_148234_1721" name="kind" visibility="private">
        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
        <defaultValue xmi:type="uml:LiteralString" xmi:id="_17_0_68b0220_1295261157268_201773_1959" name="" value="submit"/>
      </ownedAttribute>
      <ownedAttribute xmi:id="_17_0_68b0220_1295261033066_29417_1899" name="" visibility="private" type="_17_0_68b0220_1295258923528_878974_1709" association="_17_0_68b0220_1295261033066_641305_1898"/>
      <ownedAttribute xmi:id="_16_5_4_59401f5_1295433731473_365081_537" name="" visibility="private" type="_17_0_68b0220_1295258923528_878974_1709" association="_16_5_4_59401f5_1295433731473_110855_535"/>
    </packagedElement>
    <packagedElement xmi:type="uml:Association" xmi:id="_17_0_68b0220_1295261033066_641305_1898" name="" memberEnd="_17_0_68b0220_1295261033066_29417_1899 _17_0_68b0220_1295261033066_687720_1900"/>
    <packagedElement xmi:type="uml:Association" xmi:id="_17_0_68b0220_1295261049863_72811_1911" name="" memberEnd="_17_0_68b0220_1295261049863_336854_1912 _17_0_68b0220_1295261049863_512070_1913"/>
    <packagedElement xmi:type="uml:Association" xmi:id="_17_0_68b0220_1295261055347_866833_1924" name="" memberEnd="_17_0_68b0220_1295261055347_810237_1926 _17_0_68b0220_1295261055347_587074_1925"/>
    <packagedElement xmi:type="uml:Association" xmi:id="_17_0_68b0220_1295261069159_844530_1937" name="" memberEnd="_17_0_68b0220_1295261069159_282101_1938 _17_0_68b0220_1295261069159_721650_1939"/>
    <packagedElement xmi:type="uml:Association" xmi:id="_17_0_68b0220_1295261072269_605166_1950" name="" memberEnd="_17_0_68b0220_1295261072269_546904_1951 _17_0_68b0220_1295261072269_773591_1952"/>
    <packagedElement xmi:type="uml:Package" xmi:id="magicdraw_uml_standard_profile_v_0001" name="UML Standard Profile">
      <ownedComment xmi:id="_be00301_1078843546940_242228_131" body="UML Standard Profile contains several popular stereotypes, tag definitions and constraints described in UML  2 Specifications." annotatedElement="magicdraw_uml_standard_profile_v_0001"/>
    </packagedElement>
    <packagedElement xmi:type="uml:Association" xmi:id="_16_5_4_59401f5_1295433714457_828116_496" name="" memberEnd="_16_5_4_59401f5_1295433714457_820246_497 _16_5_4_59401f5_1295433714458_667906_498"/>
    <packagedElement xmi:type="uml:Association" xmi:id="_16_5_4_59401f5_1295433717252_972662_509" name="" memberEnd="_16_5_4_59401f5_1295433717252_547999_511 _16_5_4_59401f5_1295433717252_407405_510"/>
    <packagedElement xmi:type="uml:Association" xmi:id="_16_5_4_59401f5_1295433720469_42806_522" name="" memberEnd="_16_5_4_59401f5_1295433720469_554000_524 _16_5_4_59401f5_1295433720469_119454_523"/>
    <packagedElement xmi:type="uml:Association" xmi:id="_16_5_4_59401f5_1295433731473_110855_535" name="" memberEnd="_16_5_4_59401f5_1295433731473_259755_536 _16_5_4_59401f5_1295433731473_365081_537"/>
    <packagedElement xmi:type="uml:Association" xmi:id="_16_5_4_59401f5_1295433735168_946129_548" name="" memberEnd="_16_5_4_59401f5_1295433735168_922483_550 _16_5_4_59401f5_1295433735168_946117_549"/>
    <packagedElement xmi:type="uml:Activity" xmi:id="_16_5_4_59401f5_1295446439401_677724_921" name="flow1">
      <node xmi:type="uml:InitialNode" xmi:id="_16_5_4_59401f5_1295446442594_750950_942" name="Start" visibility="public" outgoing="_16_5_4_59401f5_1295446579537_587174_984"/>
      <node xmi:type="uml:ActivityFinalNode" xmi:id="_16_5_4_59401f5_1295446446226_109698_948" name="Ende" visibility="public" incoming="_16_5_4_59401f5_1295446627161_69324_1016"/>
      <node xmi:type="uml:CallBehaviorAction" xmi:id="_16_5_4_59401f5_1295446461457_845250_954" name="katalogdurchsuchen" visibility="public" outgoing="_16_5_4_59401f5_1295446614066_48612_1003 _16_5_4_59401f5_1295446622703_315676_1011" incoming="_16_5_4_59401f5_1295446579537_587174_984"/>
      <node xmi:type="uml:CallBehaviorAction" xmi:id="_16_5_4_59401f5_1295446592284_317576_988" name="serversuchen" visibility="public" outgoing="_16_5_4_59401f5_1295446627161_69324_1016" incoming="_16_5_4_59401f5_1295446622703_315676_1011"/>
      <node xmi:type="uml:CentralBufferNode" xmi:id="_16_5_4_59401f5_1295446614041_902269_1001" name="" visibility="public" incoming="_16_5_4_59401f5_1295446614066_48612_1003"/>
      <edge xmi:type="uml:ControlFlow" xmi:id="_16_5_4_59401f5_1295446579537_587174_984" name="" visibility="public" source="_16_5_4_59401f5_1295446442594_750950_942" target="_16_5_4_59401f5_1295446461457_845250_954">
        <weight xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_16_5_4_59401f5_1295446579537_117875_985" name="" value="1"/>
      </edge>
      <edge xmi:type="uml:ObjectFlow" xmi:id="_16_5_4_59401f5_1295446614066_48612_1003" name="" visibility="public" source="_16_5_4_59401f5_1295446461457_845250_954" target="_16_5_4_59401f5_1295446614041_902269_1001">
        <weight xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_16_5_4_59401f5_1295446614066_122981_1004" name="" value="1"/>
      </edge>
      <edge xmi:type="uml:ControlFlow" xmi:id="_16_5_4_59401f5_1295446622703_315676_1011" name="" visibility="public" source="_16_5_4_59401f5_1295446461457_845250_954" target="_16_5_4_59401f5_1295446592284_317576_988">
        <weight xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_16_5_4_59401f5_1295446622703_443068_1012" name="" value="1"/>
      </edge>
      <edge xmi:type="uml:ControlFlow" xmi:id="_16_5_4_59401f5_1295446627161_69324_1016" name="" visibility="public" source="_16_5_4_59401f5_1295446592284_317576_988" target="_16_5_4_59401f5_1295446446226_109698_948">
        <weight xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_16_5_4_59401f5_1295446627161_37972_1017" name="" value="1"/>
      </edge>
    </packagedElement>
    <profileApplication xmi:id="_be00301_1073394351331_445580_2profileApplicationData">
      <eAnnotations xmi:id="_KK-k6yPkEeCnhqG_XlMkcQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
        <references xmi:type="ecore:EPackage" href="UML_Standard_Profile.MagicDraw_Profile.profile.uml#_KK99NiPkEeCnhqG_XlMkcQ"/>
      </eAnnotations>
      <appliedProfile href="UML_Standard_Profile.MagicDraw_Profile.profile.uml#_be00301_1073394351331_445580_2"/>
    </profileApplication>
    <profileApplication xmi:id="_9_0_be00301_1108050582343_527400_10847profileApplicationData">
      <eAnnotations xmi:id="_KK_LQSPkEeCnhqG_XlMkcQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
        <references xmi:type="ecore:EPackage" href="UML_Standard_Profile.UML_Standard_Profile.profile.uml#_KK5rsiPkEeCnhqG_XlMkcQ"/>
      </eAnnotations>
      <appliedProfile href="UML_Standard_Profile.UML_Standard_Profile.profile.uml#_9_0_be00301_1108050582343_527400_10847"/>
    </profileApplication>
    <profileApplication xmi:id="_16_8beta_62a020a_1256807755193_508228_378profileApplicationData">
      <eAnnotations xmi:id="_KK_yUSPkEeCnhqG_XlMkcQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
        <references xmi:type="ecore:EPackage" href="UML_Standard_Profile.StandardProfileL3.profile.uml#_KK8IfSPkEeCnhqG_XlMkcQ"/>
      </eAnnotations>
      <appliedProfile href="UML_Standard_Profile.StandardProfileL3.profile.uml#_16_8beta_62a020a_1256807755193_508228_378"/>
    </profileApplication>
    <profileApplication xmi:id="_11_5_be00301_1153310565718_226811_161profileApplicationData">
      <eAnnotations xmi:id="_KLAZYCPkEeCnhqG_XlMkcQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
        <references xmi:type="ecore:EPackage" href="UML_Standard_Profile.MagicDraw_Profile.DSL_Customization.profile.uml#_KK8ImyPkEeCnhqG_XlMkcQ"/>
      </eAnnotations>
      <appliedProfile href="UML_Standard_Profile.MagicDraw_Profile.DSL_Customization.profile.uml#_11_5_be00301_1153310565718_226811_161"/>
    </profileApplication>
    <profileApplication xmi:id="_16_5_4_59401f5_1295446551857_176310_972profileApplicationData">
      <eAnnotations xmi:id="_KLBAcCPkEeCnhqG_XlMkcQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
        <references xmi:type="ecore:EPackage" href="stereotypes.profile.uml#_KK8IgyPkEeCnhqG_XlMkcQ"/>
      </eAnnotations>
      <appliedProfile href="stereotypes.profile.uml#_16_5_4_59401f5_1295446551857_176310_972"/>
    </profileApplication>
    <profileApplication xmi:id="_11_5_f720368_1159529670215_231387_1profileApplicationData">
      <eAnnotations xmi:id="_KLBngCPkEeCnhqG_XlMkcQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
        <references xmi:type="ecore:EPackage" href="UML_Standard_Profile.Validation_Profile.profile.uml#_KK8vhCPkEeCnhqG_XlMkcQ"/>
      </eAnnotations>
      <appliedProfile href="UML_Standard_Profile.Validation_Profile.profile.uml#_11_5_f720368_1159529670215_231387_1"/>
    </profileApplication>
  </uml:Model>
  <MagicDrawProfile:auxiliaryResource xmi:id="_KLPC4iPkEeCnhqG_XlMkcQ" base_Element="magicdraw_uml_standard_profile_v_0001" base_Package="magicdraw_uml_standard_profile_v_0001"/>
  <stereotypes:ViewCall xmi:id="_KWIrUSPkEeCnhqG_XlMkcQ" base_CallBehaviorAction="_16_5_4_59401f5_1295446461457_845250_954"/>
  <stereotypes:SytemCall xmi:id="_KWIrUiPkEeCnhqG_XlMkcQ" base_CallBehaviorAction="_16_5_4_59401f5_1295446592284_317576_988"/>
</xmi:XMI>


Sorry for the huge file, but i didn't know how to attach files directly...

Thanks for the help in advance!
Re: Acceleo 3 Problem with Stereotypes [message #649767 is a reply to message #649713] Thu, 20 January 2011 14:53 Go to previous messageGo to next message
woife  is currently offline woife Friend
Messages: 3
Registered: January 2011
Junior Member
Ok,

sorry to have bothered you... i found my own error in the loop. i made a mistake...

the correct code for the second template has to be:

[template public getNodeFlow(node : ActivityNode)]
[for (n: ActivityEdge | node.outgoing)]
[if not (n.target.oclIsKindOf(ActivityFinalNode))]

--
[n.target.name /]
[for (ns: Stereotype | n.target.getAppliedStereotypes())]
gefunden
[ns.name /]
[/for]
--

[getNodeFlow(n.target)/]
[/if]
[/for]
[/template]


and it works! Wink
Re: Acceleo 3 Problem with Stereotypes [message #649958 is a reply to message #649767] Fri, 21 January 2011 08:22 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080904010307020309010409
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

Glad to see you managed :). That may not be the case here, but do not
hesitate to raise enhancement requests when you think that Acceleo could
have helped more (compilation warning, error message ...).

Laurent Goubet
Obeo

On 20/01/2011 15:53, woife wrote:
> Ok,
>
> sorry to have bothered you... i found my own error in the loop. i made a
> mistake...
>
> the correct code for the second template has to be:
>
>
> [template public getNodeFlow(node : ActivityNode)]
> [for (n: ActivityEdge | node.outgoing)]
> [if not (n.target.oclIsKindOf(ActivityFinalNode))]
>
> --
> [n.target.name /]
> [for (ns: Stereotype | n.target.getAppliedStereotypes())]
> gefunden
> [ns.name /]
> [/for]
> --
>
> [getNodeFlow(n.target)/]
> [/if]
> [/for]
> [/template]
>
>
> and it works! ;)


--------------080904010307020309010409
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------080904010307020309010409--
Previous Topic:[XPand] strange failure (no viable alternative at input)
Next Topic:[MWE] No logging and strange errors when workflow is run in a context of a plugin
Goto Forum:
  


Current Time: Fri Apr 19 00:21:09 GMT 2024

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

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

Back to the top