Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » ConnectionEditPart is created multiple times
ConnectionEditPart is created multiple times [message #154649] Wed, 20 October 2004 17:47 Go to next message
Eclipse UserFriend
Originally posted by: pavan_podila.hotmail.com

This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C4B69A.A1865250
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,
I am having a problem with the mapping of the model to =
ConnectionEditPart. In refreshSourceConnections(), GEF identifies that =
there is no EditPart for the model Connection class and queries the =
EditPartFactory to get the ConnectionEditPart. Till here it is fine. I =
want to know when is GEF updating the EditPartRegistry with this new =
mapping. My problem is that in refreshTargetConnections(), the =
EditPartRegistry doesn't contain the earlier model Connection class and =
thus returns null. Because of this GEF is again creating the =
ConnectionEditPart.
The outcome is that my diagram has 2 connections from node A to node =
B and both of them are broken. In one of them the source is null and in =
the other the target is null. So I have weird lines coming from (0, 0) =
to the nodes. Can someone please tell me what's wrong ?

Thanks in advance,
Pavan
------=_NextPart_000_000A_01C4B69A.A1865250
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2523" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DVerdana size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>&nbsp;&nbsp;&nbsp; I am having a =
problem with the=20
mapping of the model to ConnectionEditPart. In =
refreshSourceConnections(), GEF=20
identifies that there is no EditPart for the model Connection class and =
queries=20
the EditPartFactory to get the ConnectionEditPart. Till here it is fine. =
I want=20
to know when is GEF updating the EditPartRegistry with this new mapping. =
My=20
problem is that in refreshTargetConnections(), the EditPartRegistry =
doesn't=20
contain the earlier model Connection class and thus returns null. =
Because of=20
this GEF is again creating the ConnectionEditPart.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>&nbsp;&nbsp;&nbsp; The outcome is =
that my diagram=20
has 2 connections from node A to node B and both of them are broken. In =
one of=20
them the source is null and in the other the target is null. So&nbsp;I =
have=20
weird lines coming from (0,&nbsp;0) to the nodes. Can someone please =
tell me=20
what's wrong ?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>Thanks in advance,</FONT></DIV>
<DIV><FONT face=3DVerdana =
size=3D2>Pavan</FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000A_01C4B69A.A1865250--
Re: ConnectionEditPart is created multiple times [message #154660 is a reply to message #154649] Wed, 20 October 2004 19:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pavan_podila.hotmail.com

This is a multi-part message in MIME format.

------=_NextPart_000_003D_01C4B6AB.4A141730
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

additionally, the EditPartRegistry's HashMap is storing the =
ConnectionEditPart against "Object" instead of =
"Connection"..........Connection is my model object.

Someone help me resolve my problem.

"Pavan Podila" <pavan_podila@hotmail.com> wrote in message =
news:cl64fp$mch$1@eclipse.org...
Hi,
I am having a problem with the mapping of the model to =
ConnectionEditPart. In refreshSourceConnections(), GEF identifies that =
there is no EditPart for the model Connection class and queries the =
EditPartFactory to get the ConnectionEditPart. Till here it is fine. I =
want to know when is GEF updating the EditPartRegistry with this new =
mapping. My problem is that in refreshTargetConnections(), the =
EditPartRegistry doesn't contain the earlier model Connection class and =
thus returns null. Because of this GEF is again creating the =
ConnectionEditPart.
The outcome is that my diagram has 2 connections from node A to =
node B and both of them are broken. In one of them the source is null =
and in the other the target is null. So I have weird lines coming from =
(0, 0) to the nodes. Can someone please tell me what's wrong ?

Thanks in advance,
Pavan
------=_NextPart_000_003D_01C4B6AB.4A141730
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2523" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DVerdana size=3D2>additionally, the EditPartRegistry's =
HashMap is=20
storing the ConnectionEditPart against "Object" instead of=20
"Connection"..........Connection is my model object.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>Someone help me resolve my =
problem.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>"Pavan Podila" &lt;<A=20
href=3D"mailto:pavan_podila@hotmail.com">pavan_podila@hotmail.com</A>&gt;=
wrote in=20
message <A=20
href=3D"news:cl64fp$mch$1@eclipse.org">news:cl64fp$mch$1@eclipse.org</A>.=
...</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DVerdana size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>&nbsp;&nbsp;&nbsp; I am having a =
problem with=20
the mapping of the model to ConnectionEditPart. In =
refreshSourceConnections(),=20
GEF identifies that there is no EditPart for the model Connection =
class and=20
queries the EditPartFactory to get the ConnectionEditPart. Till here =
it is=20
fine. I want to know when is GEF updating the EditPartRegistry with =
this new=20
mapping. My problem is that in refreshTargetConnections(), the=20
EditPartRegistry doesn't contain the earlier model Connection class =
and thus=20
returns null. Because of this GEF is again creating the=20
ConnectionEditPart.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>&nbsp;&nbsp;&nbsp; The outcome is =
that my=20
diagram has 2 connections from node A to node B and both of them are =
broken.=20
In one of them the source is null and in the other the target is null. =

So&nbsp;I have weird lines coming from (0,&nbsp;0) to the nodes. Can =
someone=20
please tell me what's wrong ?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>Thanks in advance,</FONT></DIV>
<DIV><FONT face=3DVerdana=20
size=3D2>Pavan</FONT>&nbsp;</DIV></BLOCKQUOTE></BODY ></HTML>

------=_NextPart_000_003D_01C4B6AB.4A141730--
Re: ConnectionEditPart is created multiple times [message #154798 is a reply to message #154660] Thu, 21 October 2004 18:02 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_00D5_01C4B776.A0D87220
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

What is this "Object" that it is being stored against? Does your =
ConnectionEditPart return the model Connection in its getModel() method?
"Pavan Podila" <pavan_podila@hotmail.com> wrote in message =
news:cl6bg0$5a7$1@eclipse.org...
additionally, the EditPartRegistry's HashMap is storing the =
ConnectionEditPart against "Object" instead of =
"Connection"..........Connection is my model object.

Someone help me resolve my problem.

"Pavan Podila" <pavan_podila@hotmail.com> wrote in message =
news:cl64fp$mch$1@eclipse.org...
Hi,
I am having a problem with the mapping of the model to =
ConnectionEditPart. In refreshSourceConnections(), GEF identifies that =
there is no EditPart for the model Connection class and queries the =
EditPartFactory to get the ConnectionEditPart. Till here it is fine. I =
want to know when is GEF updating the EditPartRegistry with this new =
mapping. My problem is that in refreshTargetConnections(), the =
EditPartRegistry doesn't contain the earlier model Connection class and =
thus returns null. Because of this GEF is again creating the =
ConnectionEditPart.
The outcome is that my diagram has 2 connections from node A to =
node B and both of them are broken. In one of them the source is null =
and in the other the target is null. So I have weird lines coming from =
(0, 0) to the nodes. Can someone please tell me what's wrong ?

Thanks in advance,
Pavan
------=_NextPart_000_00D5_01C4B776.A0D87220
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1476" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>What is this "Object" that it is being =
stored=20
against?&nbsp; Does your ConnectionEditPart return the model Connection =
in its=20
getModel() method?</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Pavan Podila" &lt;<A=20
=
href=3D"mailto:pavan_podila@hotmail.com">pavan_podila@hotmail.com</A>&gt;=
wrote=20
in message <A=20
=
href=3D"news:cl6bg0$5a7$1@eclipse.org">news:cl6bg0$5a7$1@eclipse.org</A>.=
...</DIV>
<DIV><FONT face=3DVerdana size=3D2>additionally, the =
EditPartRegistry's HashMap is=20
storing the ConnectionEditPart against "Object" instead of=20
"Connection"..........Connection is my model object.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>Someone help me resolve my=20
problem.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>"Pavan Podila" &lt;<A=20
=
href=3D"mailto:pavan_podila@hotmail.com">pavan_podila@hotmail.com</A>&gt;=
wrote=20
in message <A=20
=
href=3D"news:cl64fp$mch$1@eclipse.org">news:cl64fp$mch$1@eclipse.org</A>.=
...</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DVerdana size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>&nbsp;&nbsp;&nbsp; I am having a =
problem with=20
the mapping of the model to ConnectionEditPart. In=20
refreshSourceConnections(), GEF identifies that there is no EditPart =
for the=20
model Connection class and queries the EditPartFactory to get the=20
ConnectionEditPart. Till here it is fine. I want to know when is GEF =

updating the EditPartRegistry with this new mapping. My problem is =
that in=20
refreshTargetConnections(), the EditPartRegistry doesn't contain the =
earlier=20
model Connection class and thus returns null. Because of this GEF is =
again=20
creating the ConnectionEditPart.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>&nbsp;&nbsp;&nbsp; The outcome is =
that my=20
diagram has 2 connections from node A to node B and both of them are =
broken.=20
In one of them the source is null and in the other the target is =
null.=20
So&nbsp;I have weird lines coming from (0,&nbsp;0) to the nodes. Can =
someone=20
please tell me what's wrong ?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>Thanks in advance,</FONT></DIV>
<DIV><FONT face=3DVerdana=20
size=3D2>Pavan</FONT>&nbsp;</DIV></BLOCKQUOTE></BLOCKQUOTE ></BODY></HTML>=


------=_NextPart_000_00D5_01C4B776.A0D87220--
Re: ConnectionEditPart is created multiple times [message #155064 is a reply to message #154798] Fri, 22 October 2004 03:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pavan_podila.hotmail.com

I got the problem. I was not setting the model for the
ConnectionEditPart. Thanks for your help.


Pratik Shah wrote:
> What is this "Object" that it is being stored against? Does your
> ConnectionEditPart return the model Connection in its getModel() method?
>
> "Pavan Podila" <pavan_podila@hotmail.com
> <mailto:pavan_podila@hotmail.com>> wrote in message
> news:cl6bg0$5a7$1@eclipse.org...
> additionally, the EditPartRegistry's HashMap is storing the
> ConnectionEditPart against "Object" instead of
> "Connection"..........Connection is my model object.
>
> Someone help me resolve my problem.
>
> "Pavan Podila" <pavan_podila@hotmail.com
> <mailto:pavan_podila@hotmail.com>> wrote in message
> news:cl64fp$mch$1@eclipse.org...
>
> Hi,
> I am having a problem with the mapping of the model to
> ConnectionEditPart. In refreshSourceConnections(), GEF
> identifies that there is no EditPart for the model Connection
> class and queries the EditPartFactory to get the
> ConnectionEditPart. Till here it is fine. I want to know when is
> GEF updating the EditPartRegistry with this new mapping. My
> problem is that in refreshTargetConnections(), the
> EditPartRegistry doesn't contain the earlier model Connection
> class and thus returns null. Because of this GEF is again
> creating the ConnectionEditPart.
> The outcome is that my diagram has 2 connections from node A
> to node B and both of them are broken. In one of them the source
> is null and in the other the target is null. So I have weird
> lines coming from (0, 0) to the nodes. Can someone please tell
> me what's wrong ?
>
> Thanks in advance,
> Pavan
Re: ConnectionEditPart is created multiple times [message #155078 is a reply to message #155064] Fri, 22 October 2004 03:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

So the object you were referring to was the one used to mask NULL??
"Pavan Podila" <pavan_podila@hotmail.com> wrote in message
news:417881D9.7070707@hotmail.com...
> I got the problem. I was not setting the model for the
> ConnectionEditPart. Thanks for your help.
>
>
Re: ConnectionEditPart is created multiple times [message #155084 is a reply to message #155078] Fri, 22 October 2004 04:06 Go to previous message
Eclipse UserFriend
Originally posted by: pavan_podila.hotmail.com

Randy Hudson wrote:
> So the object you were referring to was the one used to mask NULL??
> "Pavan Podila" <pavan_podila@hotmail.com> wrote in message
> news:417881D9.7070707@hotmail.com...
>
>>I got the problem. I was not setting the model for the
>>ConnectionEditPart. Thanks for your help.
>>
>>
>
>
>
If I don't set the model for the ConnectionEditPart, then is it null? If
yes, then the "Object" returned must be to mask this null.
Previous Topic:Adding children to child figures
Next Topic:Strange exception
Goto Forum:
  


Current Time: Tue Jan 21 19:57:44 GMT 2025

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

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

Back to the top