Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Connections disappear after the refreshChildren()
Connections disappear after the refreshChildren() [message #176582] Mon, 11 April 2005 01:34 Go to next message
Eclipse UserFriend
Originally posted by: mheinman.rumms.uni-mannheim.de

Hello GEF folks,



I have in my application some very strange effect with the refreshChildren()
method.



I do following:

1) The creation tool sends a REQ_CREATE request to the DiagramEditPart

2) My implementation of the LayoutEditPolicy instantiates a CreationCommand

3) CreationCommand adds a child on the model layer.

4) Model propagates a property change to the listeners

5) The DiagramEditPart handles the model change propagation with the
refreshChildren()



So, the communication between all parts works fine and the subsequence of
the communication is although correct.



Now the "buggy" scenario:

1) Add a child -> refresh children -> all connections disappear

2) Add a child -> refresh children -> all connections appear again

3) Add a child -> refresh children -> all connections disappear

4) Add a child -> refresh children -> all connections appear again

....

I could not really explain this behaviour, may be I did a typical beginner
mistake? Does somebody saw the same behaviour in his application and knows a
solution?



Thank you in advance!



M.H.
Re: Connections disappear after the refreshChildren() [message #176610 is a reply to message #176582] Mon, 11 April 2005 05:36 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
What do your getModelSourceConnections() and getModelTargetConnections()
look like?

"Michail Heinmann" <mheinman@rumms.uni-mannheim.de> wrote in message
news:d3ckg0$490$1@news.eclipse.org...
> Hello GEF folks,
>
>
>
> I have in my application some very strange effect with the
refreshChildren()
> method.
>
>
>
> I do following:
>
> 1) The creation tool sends a REQ_CREATE request to the DiagramEditPart
>
> 2) My implementation of the LayoutEditPolicy instantiates a
CreationCommand
>
> 3) CreationCommand adds a child on the model layer.
>
> 4) Model propagates a property change to the listeners
>
> 5) The DiagramEditPart handles the model change propagation with the
> refreshChildren()
>
>
>
> So, the communication between all parts works fine and the subsequence of
> the communication is although correct.
>
>
>
> Now the "buggy" scenario:
>
> 1) Add a child -> refresh children -> all connections disappear
>
> 2) Add a child -> refresh children -> all connections appear again
>
> 3) Add a child -> refresh children -> all connections disappear
>
> 4) Add a child -> refresh children -> all connections appear again
>
> ...
>
> I could not really explain this behaviour, may be I did a typical beginner
> mistake? Does somebody saw the same behaviour in his application and knows
a
> solution?
>
>
>
> Thank you in advance!
>
>
>
> M.H.
>
>
>
>
>
Re: Connections disappear after the refreshChildren() [message #176616 is a reply to message #176610] Mon, 11 April 2005 06:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mheinman.rumms.uni-mannheim.de

Hi, thank you for a replay.

My getModelSource/TargetConnections() return the list of
ProcessNetworkConnections. The issue is that in the both cases:
When the connections appear and when the connections disappear the
refreshVisuals() methods of the ConnectionEditParts are called.

I use a connecton with bendpoints router and source/target anchors. The
issue is that, when the connectoins are disappear - the methods getStart()
and getEnd() of the connection's EditPart return normal not default values.
In the case of the connectoins, when they are visible, the methods
getStart()/getEnd() return default values (0,0)-(100,100).

Thank you in advance for a feedback!

Best Regards,
M.H.


"Pratik Shah" <ppshah@us.ibm.com> schrieb im Newsbeitrag
news:d3d2n1$isp$1@news.eclipse.org...
> What do your getModelSourceConnections() and getModelTargetConnections()
> look like?
>
> "Michail Heinmann" <mheinman@rumms.uni-mannheim.de> wrote in message
> news:d3ckg0$490$1@news.eclipse.org...
>> Hello GEF folks,
>>
>>
>>
>> I have in my application some very strange effect with the
> refreshChildren()
>> method.
>>
>>
>>
>> I do following:
>>
>> 1) The creation tool sends a REQ_CREATE request to the DiagramEditPart
>>
>> 2) My implementation of the LayoutEditPolicy instantiates a
> CreationCommand
>>
>> 3) CreationCommand adds a child on the model layer.
>>
>> 4) Model propagates a property change to the listeners
>>
>> 5) The DiagramEditPart handles the model change propagation with the
>> refreshChildren()
>>
>>
>>
>> So, the communication between all parts works fine and the subsequence of
>> the communication is although correct.
>>
>>
>>
>> Now the "buggy" scenario:
>>
>> 1) Add a child -> refresh children -> all connections disappear
>>
>> 2) Add a child -> refresh children -> all connections appear again
>>
>> 3) Add a child -> refresh children -> all connections disappear
>>
>> 4) Add a child -> refresh children -> all connections appear again
>>
>> ...
>>
>> I could not really explain this behaviour, may be I did a typical
>> beginner
>> mistake? Does somebody saw the same behaviour in his application and
>> knows
> a
>> solution?
>>
>>
>>
>> Thank you in advance!
>>
>>
>>
>> M.H.
>>
>>
>>
>>
>>
>
>
Re: Connections disappear after the refreshChildren() [message #176930 is a reply to message #176616] Tue, 12 April 2005 15:45 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
"Michail Heinmann" <mheinman@rumms.uni-mannheim.de> wrote in message
news:d3d64l$mj6$1@news.eclipse.org...
> Hi, thank you for a replay.
>
> My getModelSource/TargetConnections() return the list of
> ProcessNetworkConnections. The issue is that in the both cases:
> When the connections appear and when the connections disappear the
> refreshVisuals() methods of the ConnectionEditParts are called.
>
> I use a connecton with bendpoints router and source/target anchors. The
> issue is that, when the connectoins are disappear - the methods getStart()
> and getEnd() of the connection's EditPart return normal not default
values.
> In the case of the connectoins, when they are visible, the methods
> getStart()/getEnd() return default values (0,0)-(100,100).

I am not sure what you mean by this. What are the normal values? Is it
possible that the coordinates are not right and the connections are showing
up somewhere off-screen?

>
> Thank you in advance for a feedback!
>
> Best Regards,
> M.H.
>
>
> "Pratik Shah" <ppshah@us.ibm.com> schrieb im Newsbeitrag
> news:d3d2n1$isp$1@news.eclipse.org...
> > What do your getModelSourceConnections() and getModelTargetConnections()
> > look like?
> >
> > "Michail Heinmann" <mheinman@rumms.uni-mannheim.de> wrote in message
> > news:d3ckg0$490$1@news.eclipse.org...
> >> Hello GEF folks,
> >>
> >>
> >>
> >> I have in my application some very strange effect with the
> > refreshChildren()
> >> method.
> >>
> >>
> >>
> >> I do following:
> >>
> >> 1) The creation tool sends a REQ_CREATE request to the DiagramEditPart
> >>
> >> 2) My implementation of the LayoutEditPolicy instantiates a
> > CreationCommand
> >>
> >> 3) CreationCommand adds a child on the model layer.
> >>
> >> 4) Model propagates a property change to the listeners
> >>
> >> 5) The DiagramEditPart handles the model change propagation with the
> >> refreshChildren()
> >>
> >>
> >>
> >> So, the communication between all parts works fine and the subsequence
of
> >> the communication is although correct.
> >>
> >>
> >>
> >> Now the "buggy" scenario:
> >>
> >> 1) Add a child -> refresh children -> all connections disappear
> >>
> >> 2) Add a child -> refresh children -> all connections appear again
> >>
> >> 3) Add a child -> refresh children -> all connections disappear
> >>
> >> 4) Add a child -> refresh children -> all connections appear again
> >>
> >> ...
> >>
> >> I could not really explain this behaviour, may be I did a typical
> >> beginner
> >> mistake? Does somebody saw the same behaviour in his application and
> >> knows
> > a
> >> solution?
> >>
> >>
> >>
> >> Thank you in advance!
> >>
> >>
> >>
> >> M.H.
> >>
> >>
> >>
> >>
> >>
> >
> >
>
>
Re: Connections disappear after the refreshChildren() [message #176963 is a reply to message #176930] Tue, 12 April 2005 17:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mheinman.rumms.uni-mannheim.de

I mean with the normal values the coordinates of the Source/Target Anchors
derived from the Source/Target elements. The default values are the values
from the default initialization from the AbstarctConnectionEditPart:
private static final ConnectionAnchor DEFAULT_SOURCE_ANCHOR =
new XYAnchor(new Point(10, 10));
private static final ConnectionAnchor DEFAULT_TARGET_ANCHOR =
new XYAnchor(new Point(100, 100));

I hope this help to clarify the situation!

Thank you in advance!

"Pratik Shah" <ppshah@us.ibm.com> schrieb im Newsbeitrag
news:d3gqpd$ojg$1@news.eclipse.org...
>
> "Michail Heinmann" <mheinman@rumms.uni-mannheim.de> wrote in message
> news:d3d64l$mj6$1@news.eclipse.org...
>> Hi, thank you for a replay.
>>
>> My getModelSource/TargetConnections() return the list of
>> ProcessNetworkConnections. The issue is that in the both cases:
>> When the connections appear and when the connections disappear the
>> refreshVisuals() methods of the ConnectionEditParts are called.
>>
>> I use a connecton with bendpoints router and source/target anchors. The
>> issue is that, when the connectoins are disappear - the methods
>> getStart()
>> and getEnd() of the connection's EditPart return normal not default
> values.
>> In the case of the connectoins, when they are visible, the methods
>> getStart()/getEnd() return default values (0,0)-(100,100).
>
> I am not sure what you mean by this. What are the normal values? Is it
> possible that the coordinates are not right and the connections are
> showing
> up somewhere off-screen?
>
>>
>> Thank you in advance for a feedback!
>>
>> Best Regards,
>> M.H.
>>
>>
>> "Pratik Shah" <ppshah@us.ibm.com> schrieb im Newsbeitrag
>> news:d3d2n1$isp$1@news.eclipse.org...
>> > What do your getModelSourceConnections() and
>> > getModelTargetConnections()
>> > look like?
>> >
>> > "Michail Heinmann" <mheinman@rumms.uni-mannheim.de> wrote in message
>> > news:d3ckg0$490$1@news.eclipse.org...
>> >> Hello GEF folks,
>> >>
>> >>
>> >>
>> >> I have in my application some very strange effect with the
>> > refreshChildren()
>> >> method.
>> >>
>> >>
>> >>
>> >> I do following:
>> >>
>> >> 1) The creation tool sends a REQ_CREATE request to the DiagramEditPart
>> >>
>> >> 2) My implementation of the LayoutEditPolicy instantiates a
>> > CreationCommand
>> >>
>> >> 3) CreationCommand adds a child on the model layer.
>> >>
>> >> 4) Model propagates a property change to the listeners
>> >>
>> >> 5) The DiagramEditPart handles the model change propagation with the
>> >> refreshChildren()
>> >>
>> >>
>> >>
>> >> So, the communication between all parts works fine and the subsequence
> of
>> >> the communication is although correct.
>> >>
>> >>
>> >>
>> >> Now the "buggy" scenario:
>> >>
>> >> 1) Add a child -> refresh children -> all connections disappear
>> >>
>> >> 2) Add a child -> refresh children -> all connections appear again
>> >>
>> >> 3) Add a child -> refresh children -> all connections disappear
>> >>
>> >> 4) Add a child -> refresh children -> all connections appear again
>> >>
>> >> ...
>> >>
>> >> I could not really explain this behaviour, may be I did a typical
>> >> beginner
>> >> mistake? Does somebody saw the same behaviour in his application and
>> >> knows
>> > a
>> >> solution?
>> >>
>> >>
>> >>
>> >> Thank you in advance!
>> >>
>> >>
>> >>
>> >> M.H.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>>
>>
>
>
SOLVED: Connections disappear after the refreshChildren() [message #177265 is a reply to message #176963] Wed, 13 April 2005 13:30 Go to previous message
Eclipse UserFriend
Originally posted by: mheinman.rumms.uni-mannheim.de

The issue was that the model was build each time "on-fly" and because of the
specific properties of the model (3 tier model) - the objects of the second
tier were build always new. In the refresh() method of the AbstactEditPart
is equalency of the elements is defined on the equalency of the model
elements (I think it does not make a sence to discuss this aspect, because
it is a design desicion). I think (my own wrong and very subjectiv opinion)
,the only issue is that the GEF Framework has some deficits by supporting
the models with more then 2 levels of hierarchy.

Thanks a lot for all who supported me on the solution.

Best Regards,
M.H.

"Michail Heinmann" <mheinman@rumms.uni-mannheim.de> schrieb im Newsbeitrag
news:d3h0hi$1u5$1@news.eclipse.org...
>I mean with the normal values the coordinates of the Source/Target Anchors
>derived from the Source/Target elements. The default values are the values
>from the default initialization from the AbstarctConnectionEditPart:
> private static final ConnectionAnchor DEFAULT_SOURCE_ANCHOR =
> new XYAnchor(new Point(10, 10));
> private static final ConnectionAnchor DEFAULT_TARGET_ANCHOR =
> new XYAnchor(new Point(100, 100));
>
> I hope this help to clarify the situation!
>
> Thank you in advance!
>
> "Pratik Shah" <ppshah@us.ibm.com> schrieb im Newsbeitrag
> news:d3gqpd$ojg$1@news.eclipse.org...
>>
>> "Michail Heinmann" <mheinman@rumms.uni-mannheim.de> wrote in message
>> news:d3d64l$mj6$1@news.eclipse.org...
>>> Hi, thank you for a replay.
>>>
>>> My getModelSource/TargetConnections() return the list of
>>> ProcessNetworkConnections. The issue is that in the both cases:
>>> When the connections appear and when the connections disappear the
>>> refreshVisuals() methods of the ConnectionEditParts are called.
>>>
>>> I use a connecton with bendpoints router and source/target anchors. The
>>> issue is that, when the connectoins are disappear - the methods
>>> getStart()
>>> and getEnd() of the connection's EditPart return normal not default
>> values.
>>> In the case of the connectoins, when they are visible, the methods
>>> getStart()/getEnd() return default values (0,0)-(100,100).
>>
>> I am not sure what you mean by this. What are the normal values? Is it
>> possible that the coordinates are not right and the connections are
>> showing
>> up somewhere off-screen?
>>
>>>
>>> Thank you in advance for a feedback!
>>>
>>> Best Regards,
>>> M.H.
>>>
>>>
>>> "Pratik Shah" <ppshah@us.ibm.com> schrieb im Newsbeitrag
>>> news:d3d2n1$isp$1@news.eclipse.org...
>>> > What do your getModelSourceConnections() and
>>> > getModelTargetConnections()
>>> > look like?
>>> >
>>> > "Michail Heinmann" <mheinman@rumms.uni-mannheim.de> wrote in message
>>> > news:d3ckg0$490$1@news.eclipse.org...
>>> >> Hello GEF folks,
>>> >>
>>> >>
>>> >>
>>> >> I have in my application some very strange effect with the
>>> > refreshChildren()
>>> >> method.
>>> >>
>>> >>
>>> >>
>>> >> I do following:
>>> >>
>>> >> 1) The creation tool sends a REQ_CREATE request to the
>>> >> DiagramEditPart
>>> >>
>>> >> 2) My implementation of the LayoutEditPolicy instantiates a
>>> > CreationCommand
>>> >>
>>> >> 3) CreationCommand adds a child on the model layer.
>>> >>
>>> >> 4) Model propagates a property change to the listeners
>>> >>
>>> >> 5) The DiagramEditPart handles the model change propagation with the
>>> >> refreshChildren()
>>> >>
>>> >>
>>> >>
>>> >> So, the communication between all parts works fine and the
>>> >> subsequence
>> of
>>> >> the communication is although correct.
>>> >>
>>> >>
>>> >>
>>> >> Now the "buggy" scenario:
>>> >>
>>> >> 1) Add a child -> refresh children -> all connections disappear
>>> >>
>>> >> 2) Add a child -> refresh children -> all connections appear again
>>> >>
>>> >> 3) Add a child -> refresh children -> all connections disappear
>>> >>
>>> >> 4) Add a child -> refresh children -> all connections appear again
>>> >>
>>> >> ...
>>> >>
>>> >> I could not really explain this behaviour, may be I did a typical
>>> >> beginner
>>> >> mistake? Does somebody saw the same behaviour in his application and
>>> >> knows
>>> > a
>>> >> solution?
>>> >>
>>> >>
>>> >>
>>> >> Thank you in advance!
>>> >>
>>> >>
>>> >>
>>> >> M.H.
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>>
>>>
>>
>>
>
>
Previous Topic:Why GEF uses its own GEFMessages, not the WorkbenchMessage?
Next Topic:milestone 6?
Goto Forum:
  


Current Time: Sat Apr 27 02:01:34 GMT 2024

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

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

Back to the top