Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » Recursive Node Factory
Recursive Node Factory [message #1023804] Mon, 25 March 2013 07:49 Go to next message
Hazem ELRAFFIEE is currently offline Hazem ELRAFFIEE
Messages: 61
Registered: September 2012
Member
Hello Again Smile Smile

I visited this topic before posting mine. But it didn't help me at my situation.

I have a tag called "subcomponent" like:
<subcomponent name="p1" version="1.0"></subcomponent>

the thing is, a "subcomponent" can have children "subcomponent" tags. Infinite number of levels, and infinite number of children for each.
<subcomponent name="p1" version="1.0">
    <subcomponent name="c1" version="2.0"></subcomponent>
    <subcomponent name="c2" version="1.3">
        <subcomponent name="g1" version="2.0"></subcomponent>
        <subcomponent name="g2" version="1.2"></subcomponent>
    </subcomponent>
</subcomponent>


For the model, it's very straight forward, but how can I do it in the SDEF? any ideas?
Re: Recursive Node Factory [message #1024038 is a reply to message #1023804] Mon, 25 March 2013 17:36 Go to previous message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 940
Registered: July 2009
Senior Member
You need to define a node factory at the top level of sdef with an id that self-references. Something like this:

<definition>
    <node-factory>
        <id>MyNodeFactory</id>
        <property>SomeListProperty</property>
        <case>
            <model-element-type>SomeType</model-element-type>
            <node-include>MyNodeFactory</node-include>
        </case>
    </node-factory>
</definition>
Previous Topic:How to enable/disable Action Button
Next Topic:ReferenceValue target object property in EL
Goto Forum:
  


Current Time: Mon Sep 15 04:14:05 GMT 2014

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

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