Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Create List in template
Create List in template [message #1060366] Fri, 24 May 2013 10:11 Go to next message
ghiotto86 ghiotto86 is currently offline ghiotto86 ghiotto86Friend
Messages: 3
Registered: May 2013
Junior Member
Hi, i'm at begin in Acceleo development.
I need to extract information from my model instance. This is a piece of instance:

  <owned_state name="UNDEF/HANDLED INTERRUPT" owning_fsm="/">
    <outgoing_transition name="ahci_qc_prep &lt;libahci>" source="//@owned_state.0" target="//@owned_state.1"/>
    <outgoing_transition name="ahci_qc_prep &lt;libahci>" source="//@owned_state.0" target="//@owned_state.2"/>
    <outgoing_transition name="ahci_qc_prep &lt;libahci>" source="//@owned_state.0" target="//@owned_state.6"/>
    <outgoing_transition name="set_intr_registers &lt;device>" source="//@owned_state.0" target="//@owned_state.4"/>
    <outgoing_transition name="ahci_qc_prep &lt;libahci>" source="//@owned_state.0" target="//@owned_state.10"/>
    <incoming_transition name="ahci_interrupt &lt;libahci>" source="//@owned_state.7" target="//@owned_state.0"/>
    <incoming_transition name="ahci_interrupt &lt;libahci>" source="//@owned_state.8" target="//@owned_state.0"/>
    <incoming_transition name="ahci_interrupt &lt;libahci>" source="//@owned_state.4" target="//@owned_state.0"/>
    <values name="value0" value="UNDEF"/>
    <values name="value1" value="HANDLED INTERRUPT"/>
    <values name="value2" value="UNDEF"/>
    <values name="value3" value="UNDEF"/>
  </owned_state>


For each "outgoing_transition" i need to create two list which i'll use in a second moment: the first have to contain all source state and second all target state (no duplicate).
How can i do it in Acceleo 3?

Thanks for all.
Re: Create List in template [message #1060470 is a reply to message #1060366] Fri, 24 May 2013 23:38 Go to previous message
ghiotto86 ghiotto86 is currently offline ghiotto86 ghiotto86Friend
Messages: 3
Registered: May 2013
Junior Member
For example i want to produce:

ahci_qc_prep
Source State:
S0

Target State:
S1
S2
S6
S10

set_intr_registers
Source State:
S0

Target State:
S4
Previous Topic:What is genBuildAcceleo
Next Topic:XML2SQLtext
Goto Forum:
  


Current Time: Thu Mar 28 22:10:11 GMT 2024

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

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

Back to the top