Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » inStructuredNode reference
inStructuredNode reference [message #475228] Sat, 25 August 2007 13:11 Go to next message
Krzysztof Kaczmarski is currently offline Krzysztof KaczmarskiFriend
Messages: 88
Registered: July 2009
Member
Hi All,

I just wanted to ask if this is correct.

When I create any kind of StructuredActivityNode inside a SequenceNode
using createNode(...) I can navigate from parent node to child node
using getNode() or getNodes(). However, I cannot navigate from child
to parent element using getInStructuredNode. Specification says that
the latter is the reverse reference to the first.
The problem is solved when I do:
child.setInStructuredNode( parentNode )
manually, after the child is created.
Shouldn't it be set automatically?

Cheers,
Krzysztof

Ps. The same is for Activity and its nodes. I have to use
setInActivity() for them.
Re: inStructuredNode reference [message #475232 is a reply to message #475228] Sun, 26 August 2007 15:44 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Krzysztof ,

I think I see the issue. SequenceNode::executableNode redefines
StructuredActivityNode::node. If you have a sequenceNode and call
getNodes() you get the overriden SequenceNode::getNodes() which returns the
executable nodes: a EObjectContainmentEList.
If you look at the super implementation StructuredActivityNode::getNodes()
it returns an EObjectContainmentWithInverseEList with the inverse set up to
be ACTIVITY_NODE__IN_STRUCTURED_NODE.

So if you have a sequence node and call createNode(), it will simply add to
the EObjectContainmentEList and EMF will not be able to maintain the reverse
reference as might be expected.

- James.


"Krzysztof Kaczmarski" <krzysztof_kaczmarski@o2.pl> wrote in message
news:fap9pd$bcq$1@build.eclipse.org...
> Hi All,
>
> I just wanted to ask if this is correct.
>
> When I create any kind of StructuredActivityNode inside a SequenceNode
> using createNode(...) I can navigate from parent node to child node using
> getNode() or getNodes(). However, I cannot navigate from child to parent
> element using getInStructuredNode. Specification says that the latter is
> the reverse reference to the first.
> The problem is solved when I do:
> child.setInStructuredNode( parentNode )
> manually, after the child is created.
> Shouldn't it be set automatically?
>
> Cheers,
> Krzysztof
>
> Ps. The same is for Activity and its nodes. I have to use setInActivity()
> for them.
Re: inStructuredNode reference [message #475234 is a reply to message #475232] Sun, 26 August 2007 15:46 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
.... refer to figure 12.21 in the superstructure spec and
SequencNodeImpl.getNodes().

"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:fas70a$l7g$1@build.eclipse.org...
> Hi Krzysztof ,
>
> I think I see the issue. SequenceNode::executableNode redefines
> StructuredActivityNode::node. If you have a sequenceNode and call
> getNodes() you get the overriden SequenceNode::getNodes() which returns
> the executable nodes: a EObjectContainmentEList.
> If you look at the super implementation StructuredActivityNode::getNodes()
> it returns an EObjectContainmentWithInverseEList with the inverse set up
> to be ACTIVITY_NODE__IN_STRUCTURED_NODE.
>
> So if you have a sequence node and call createNode(), it will simply add
> to the EObjectContainmentEList and EMF will not be able to maintain the
> reverse reference as might be expected.
>
> - James.
>
>
> "Krzysztof Kaczmarski" <krzysztof_kaczmarski@o2.pl> wrote in message
> news:fap9pd$bcq$1@build.eclipse.org...
>> Hi All,
>>
>> I just wanted to ask if this is correct.
>>
>> When I create any kind of StructuredActivityNode inside a SequenceNode
>> using createNode(...) I can navigate from parent node to child node using
>> getNode() or getNodes(). However, I cannot navigate from child to parent
>> element using getInStructuredNode. Specification says that the latter is
>> the reverse reference to the first.
>> The problem is solved when I do:
>> child.setInStructuredNode( parentNode )
>> manually, after the child is created.
>> Shouldn't it be set automatically?
>>
>> Cheers,
>> Krzysztof
>>
>> Ps. The same is for Activity and its nodes. I have to use setInActivity()
>> for them.
>
>
Re: inStructuredNode reference [message #475239 is a reply to message #475234] Mon, 27 August 2007 06:14 Go to previous message
Krzysztof Kaczmarski is currently offline Krzysztof KaczmarskiFriend
Messages: 88
Registered: July 2009
Member
Hi James,
thanks for this clarification. I create reverse references everywhere
manually now.

Thanks,
Krzysztof

James Bruck wrote:
> .... refer to figure 12.21 in the superstructure spec and
> SequencNodeImpl.getNodes().
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:fas70a$l7g$1@build.eclipse.org...
>> Hi Krzysztof ,
>>
>> I think I see the issue. SequenceNode::executableNode redefines
>> StructuredActivityNode::node. If you have a sequenceNode and call
>> getNodes() you get the overriden SequenceNode::getNodes() which returns
>> the executable nodes: a EObjectContainmentEList.
>> If you look at the super implementation StructuredActivityNode::getNodes()
>> it returns an EObjectContainmentWithInverseEList with the inverse set up
>> to be ACTIVITY_NODE__IN_STRUCTURED_NODE.
>>
>> So if you have a sequence node and call createNode(), it will simply add
>> to the EObjectContainmentEList and EMF will not be able to maintain the
>> reverse reference as might be expected.
>>
>> - James.
>>
>>
>> "Krzysztof Kaczmarski" <krzysztof_kaczmarski@o2.pl> wrote in message
>> news:fap9pd$bcq$1@build.eclipse.org...
>>> Hi All,
>>>
>>> I just wanted to ask if this is correct.
>>>
>>> When I create any kind of StructuredActivityNode inside a SequenceNode
>>> using createNode(...) I can navigate from parent node to child node using
>>> getNode() or getNodes(). However, I cannot navigate from child to parent
>>> element using getInStructuredNode. Specification says that the latter is
>>> the reverse reference to the first.
>>> The problem is solved when I do:
>>> child.setInStructuredNode( parentNode )
>>> manually, after the child is created.
>>> Shouldn't it be set automatically?
>>>
>>> Cheers,
>>> Krzysztof
>>>
>>> Ps. The same is for Activity and its nodes. I have to use setInActivity()
>>> for them.
>>
>
>
Re: inStructuredNode reference [message #624533 is a reply to message #475228] Sun, 26 August 2007 15:44 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Krzysztof ,

I think I see the issue. SequenceNode::executableNode redefines
StructuredActivityNode::node. If you have a sequenceNode and call
getNodes() you get the overriden SequenceNode::getNodes() which returns the
executable nodes: a EObjectContainmentEList.
If you look at the super implementation StructuredActivityNode::getNodes()
it returns an EObjectContainmentWithInverseEList with the inverse set up to
be ACTIVITY_NODE__IN_STRUCTURED_NODE.

So if you have a sequence node and call createNode(), it will simply add to
the EObjectContainmentEList and EMF will not be able to maintain the reverse
reference as might be expected.

- James.


"Krzysztof Kaczmarski" <krzysztof_kaczmarski@o2.pl> wrote in message
news:fap9pd$bcq$1@build.eclipse.org...
> Hi All,
>
> I just wanted to ask if this is correct.
>
> When I create any kind of StructuredActivityNode inside a SequenceNode
> using createNode(...) I can navigate from parent node to child node using
> getNode() or getNodes(). However, I cannot navigate from child to parent
> element using getInStructuredNode. Specification says that the latter is
> the reverse reference to the first.
> The problem is solved when I do:
> child.setInStructuredNode( parentNode )
> manually, after the child is created.
> Shouldn't it be set automatically?
>
> Cheers,
> Krzysztof
>
> Ps. The same is for Activity and its nodes. I have to use setInActivity()
> for them.
Re: inStructuredNode reference [message #624534 is a reply to message #475232] Sun, 26 August 2007 15:46 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
.... refer to figure 12.21 in the superstructure spec and
SequencNodeImpl.getNodes().

"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:fas70a$l7g$1@build.eclipse.org...
> Hi Krzysztof ,
>
> I think I see the issue. SequenceNode::executableNode redefines
> StructuredActivityNode::node. If you have a sequenceNode and call
> getNodes() you get the overriden SequenceNode::getNodes() which returns
> the executable nodes: a EObjectContainmentEList.
> If you look at the super implementation StructuredActivityNode::getNodes()
> it returns an EObjectContainmentWithInverseEList with the inverse set up
> to be ACTIVITY_NODE__IN_STRUCTURED_NODE.
>
> So if you have a sequence node and call createNode(), it will simply add
> to the EObjectContainmentEList and EMF will not be able to maintain the
> reverse reference as might be expected.
>
> - James.
>
>
> "Krzysztof Kaczmarski" <krzysztof_kaczmarski@o2.pl> wrote in message
> news:fap9pd$bcq$1@build.eclipse.org...
>> Hi All,
>>
>> I just wanted to ask if this is correct.
>>
>> When I create any kind of StructuredActivityNode inside a SequenceNode
>> using createNode(...) I can navigate from parent node to child node using
>> getNode() or getNodes(). However, I cannot navigate from child to parent
>> element using getInStructuredNode. Specification says that the latter is
>> the reverse reference to the first.
>> The problem is solved when I do:
>> child.setInStructuredNode( parentNode )
>> manually, after the child is created.
>> Shouldn't it be set automatically?
>>
>> Cheers,
>> Krzysztof
>>
>> Ps. The same is for Activity and its nodes. I have to use setInActivity()
>> for them.
>
>
Re: inStructuredNode reference [message #624541 is a reply to message #475234] Mon, 27 August 2007 06:14 Go to previous message
Krzysztof Kaczmarski is currently offline Krzysztof KaczmarskiFriend
Messages: 88
Registered: July 2009
Member
Hi James,
thanks for this clarification. I create reverse references everywhere
manually now.

Thanks,
Krzysztof

James Bruck wrote:
> .... refer to figure 12.21 in the superstructure spec and
> SequencNodeImpl.getNodes().
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:fas70a$l7g$1@build.eclipse.org...
>> Hi Krzysztof ,
>>
>> I think I see the issue. SequenceNode::executableNode redefines
>> StructuredActivityNode::node. If you have a sequenceNode and call
>> getNodes() you get the overriden SequenceNode::getNodes() which returns
>> the executable nodes: a EObjectContainmentEList.
>> If you look at the super implementation StructuredActivityNode::getNodes()
>> it returns an EObjectContainmentWithInverseEList with the inverse set up
>> to be ACTIVITY_NODE__IN_STRUCTURED_NODE.
>>
>> So if you have a sequence node and call createNode(), it will simply add
>> to the EObjectContainmentEList and EMF will not be able to maintain the
>> reverse reference as might be expected.
>>
>> - James.
>>
>>
>> "Krzysztof Kaczmarski" <krzysztof_kaczmarski@o2.pl> wrote in message
>> news:fap9pd$bcq$1@build.eclipse.org...
>>> Hi All,
>>>
>>> I just wanted to ask if this is correct.
>>>
>>> When I create any kind of StructuredActivityNode inside a SequenceNode
>>> using createNode(...) I can navigate from parent node to child node using
>>> getNode() or getNodes(). However, I cannot navigate from child to parent
>>> element using getInStructuredNode. Specification says that the latter is
>>> the reverse reference to the first.
>>> The problem is solved when I do:
>>> child.setInStructuredNode( parentNode )
>>> manually, after the child is created.
>>> Shouldn't it be set automatically?
>>>
>>> Cheers,
>>> Krzysztof
>>>
>>> Ps. The same is for Activity and its nodes. I have to use setInActivity()
>>> for them.
>>
>
>
Previous Topic:Is there a plug-in for reverse engineering a class diagram from .java files
Next Topic:Problem running uml2 api program
Goto Forum:
  


Current Time: Sun Mar 29 15:53:58 GMT 2020

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

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

Back to the top