Skip to main content



      Home
Home » Eclipse Projects » GEF » unconnected connections
unconnected connections [message #76581] Thu, 24 April 2003 15:54 Go to next message
Eclipse UserFriend
Originally posted by: amititz.yahoo.com

Hi,
I would like to find a reasonable way to make a connection not connected to
anything. that is, for example, when I delete a node, I want the connections
that were connected to it to stay where they are (and not jump to the
screen's corner). I want to be able to move the loose endpoint around, and
then connect it to a new node
(for example, in visio, you can drop a connection on the page, and only then
connect it to some other shape if you wish). Is there any way to accomplish
that ?
I tried putting an anchor on the location of the request, and set the
connection's anchor to this new anchor. it doesn't work, and seems like a
pretty bad idea.

Thanks,
Amit
Re: unconnected connections [message #76598 is a reply to message #76581] Thu, 24 April 2003 15:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Don't use AbstractConnectionEditPart for this. Use just a regular
GraphicalEditPart whose figure happens to be a connection.

"Amit" <amititz@yahoo.com> wrote in message
news:b89bu4$iqf$1@rogue.oti.com...
> Hi,
> I would like to find a reasonable way to make a connection not connected
to
> anything. that is, for example, when I delete a node, I want the
connections
> that were connected to it to stay where they are (and not jump to the
> screen's corner). I want to be able to move the loose endpoint around, and
> then connect it to a new node
> (for example, in visio, you can drop a connection on the page, and only
then
> connect it to some other shape if you wish). Is there any way to
accomplish
> that ?
> I tried putting an anchor on the location of the request, and set the
> connection's anchor to this new anchor. it doesn't work, and seems like a
> pretty bad idea.
>
> Thanks,
> Amit
>
>
>
Re: unconnected connections [message #76715 is a reply to message #76598] Fri, 25 April 2003 11:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Vadim.Strizhevsky.nowhere.com

I need to do the same thing, but this suggestion seems strange to me.
Would I have to change the connection's edit part when it gets
disconnected and then change it again if it gets connected? Or did you
mean to always have the connection's edit part be a standard
GraphicalEditPart? Would all the connection's logic still work?

I was thinking instead, creating a dummy/error edit part that
"disconnected" connections would connect to. You can display it as X or
even be almost invisble. have it placed anywhere on the graph. These parts
can be constructed/destructed automatically as needed for connections.

I haven't tried this yet. Would such an approach make sense?

Thanks,
Vadim

Randy Hudson wrote:

> Don't use AbstractConnectionEditPart for this. Use just a regular
> GraphicalEditPart whose figure happens to be a connection.

> "Amit" <amititz@yahoo.com> wrote in message
> news:b89bu4$iqf$1@rogue.oti.com...
> > Hi,
> > I would like to find a reasonable way to make a connection not connected
> to
> > anything. that is, for example, when I delete a node, I want the
> connections
> > that were connected to it to stay where they are (and not jump to the
> > screen's corner). I want to be able to move the loose endpoint around, and
> > then connect it to a new node
> > (for example, in visio, you can drop a connection on the page, and only
> then
> > connect it to some other shape if you wish). Is there any way to
> accomplish
> > that ?
> > I tried putting an anchor on the location of the request, and set the
> > connection's anchor to this new anchor. it doesn't work, and seems like a
> > pretty bad idea.
> >
> > Thanks,
> > Amit
> >
> >
> >
Re: unconnected connections [message #76746 is a reply to message #76715] Fri, 25 April 2003 14:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

I forgot to think about the connecting parts. Basically, it's hard to
guarantee that the "connection" is created after the nodes at either end.
Therefore, at startup, the connection might create its figure first (before
the nodes exist), and then try to find its "source" or "target"
connectionanchors, and fail. The solution is to do a double check. The
connection tries to find the source, but can't. Then, when the source is
created, it tries to find its connection. If it does, it says "ok, now you
can set your connection anchor". This is what the viewer's part registry is
for.

Keep in mind I'm using the terms connection, source, and target loosely
here. If this type of thing gets added to GEF, it would be referred to as
an association probably.

"Vadim Strizhevsky" <Vadim.Strizhevsky@nowhere.com> wrote in message
news:b8bkqc$82q$1@rogue.oti.com...
>
> I need to do the same thing, but this suggestion seems strange to me.
> Would I have to change the connection's edit part when it gets
> disconnected and then change it again if it gets connected? Or did you
> mean to always have the connection's edit part be a standard
> GraphicalEditPart? Would all the connection's logic still work?
>
> I was thinking instead, creating a dummy/error edit part that
> "disconnected" connections would connect to. You can display it as X or
> even be almost invisble. have it placed anywhere on the graph. These parts
> can be constructed/destructed automatically as needed for connections.
>
> I haven't tried this yet. Would such an approach make sense?
>
> Thanks,
> Vadim
>
> Randy Hudson wrote:
>
> > Don't use AbstractConnectionEditPart for this. Use just a regular
> > GraphicalEditPart whose figure happens to be a connection.
>
> > "Amit" <amititz@yahoo.com> wrote in message
> > news:b89bu4$iqf$1@rogue.oti.com...
> > > Hi,
> > > I would like to find a reasonable way to make a connection not
connected
> > to
> > > anything. that is, for example, when I delete a node, I want the
> > connections
> > > that were connected to it to stay where they are (and not jump to the
> > > screen's corner). I want to be able to move the loose endpoint around,
and
> > > then connect it to a new node
> > > (for example, in visio, you can drop a connection on the page, and
only
> > then
> > > connect it to some other shape if you wish). Is there any way to
> > accomplish
> > > that ?
> > > I tried putting an anchor on the location of the request, and set the
> > > connection's anchor to this new anchor. it doesn't work, and seems
like a
> > > pretty bad idea.
> > >
> > > Thanks,
> > > Amit
> > >
> > >
> > >
>
>
>
>
>
Re: unconnected connections [message #76926 is a reply to message #76746] Sat, 26 April 2003 17:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vadim.nowhere.com

Sorry, but don't quite get what you mean. Was this for my suggestion or
Amit's? And how does
this apply? I was thinking that the model would know this and will cause
the root part generate
"dummy" models for nodes to which "disconnected" connections get
connected. Does that make
sense would this be a bad aproach?

Thanks,
Vadim

Randy Hudson wrote:

> I forgot to think about the connecting parts. Basically, it's hard to
> guarantee that the "connection" is created after the nodes at either end.
> Therefore, at startup, the connection might create its figure first (before
> the nodes exist), and then try to find its "source" or "target"
> connectionanchors, and fail. The solution is to do a double check. The
> connection tries to find the source, but can't. Then, when the source is
> created, it tries to find its connection. If it does, it says "ok, now you
> can set your connection anchor". This is what the viewer's part registry is
> for.

> Keep in mind I'm using the terms connection, source, and target loosely
> here. If this type of thing gets added to GEF, it would be referred to as
> an association probably.

> "Vadim Strizhevsky" <Vadim.Strizhevsky@nowhere.com> wrote in message
> news:b8bkqc$82q$1@rogue.oti.com...
> >
> > I need to do the same thing, but this suggestion seems strange to me.
> > Would I have to change the connection's edit part when it gets
> > disconnected and then change it again if it gets connected? Or did you
> > mean to always have the connection's edit part be a standard
> > GraphicalEditPart? Would all the connection's logic still work?
> >
> > I was thinking instead, creating a dummy/error edit part that
> > "disconnected" connections would connect to. You can display it as X or
> > even be almost invisble. have it placed anywhere on the graph. These parts
> > can be constructed/destructed automatically as needed for connections.
> >
> > I haven't tried this yet. Would such an approach make sense?
> >
> > Thanks,
> > Vadim
> >
> > Randy Hudson wrote:
> >
> > > Don't use AbstractConnectionEditPart for this. Use just a regular
> > > GraphicalEditPart whose figure happens to be a connection.
> >
> > > "Amit" <amititz@yahoo.com> wrote in message
> > > news:b89bu4$iqf$1@rogue.oti.com...
> > > > Hi,
> > > > I would like to find a reasonable way to make a connection not
> connected
> > > to
> > > > anything. that is, for example, when I delete a node, I want the
> > > connections
> > > > that were connected to it to stay where they are (and not jump to the
> > > > screen's corner). I want to be able to move the loose endpoint around,
> and
> > > > then connect it to a new node
> > > > (for example, in visio, you can drop a connection on the page, and
> only
> > > then
> > > > connect it to some other shape if you wish). Is there any way to
> > > accomplish
> > > > that ?
> > > > I tried putting an anchor on the location of the request, and set the
> > > > connection's anchor to this new anchor. it doesn't work, and seems
> like a
> > > > pretty bad idea.
> > > >
> > > > Thanks,
> > > > Amit
> > > >
> > > >
> > > >
> >
> >
> >
> >
> >
Re: unconnected connections [message #76942 is a reply to message #76926] Sat, 26 April 2003 20:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

This was for your suggestion. I think your technique would work too, but
it's forcing something to be a connection when it isn't. Do you want the
z-order of these "connections" to be mixed with the z-order of other
objects? In visio, if I drop a shape, it will cover up a connection
previously dropped.

"Vadim Strizhevsky" <vadim@nowhere.com> wrote in message
news:b8eseo$6g3$1@rogue.oti.com...
>
> Sorry, but don't quite get what you mean. Was this for my suggestion or
> Amit's? And how does
> this apply? I was thinking that the model would know this and will cause
> the root part generate
> "dummy" models for nodes to which "disconnected" connections get
> connected. Does that make
> sense would this be a bad aproach?
>
> Thanks,
> Vadim
>
> Randy Hudson wrote:
>
> > I forgot to think about the connecting parts. Basically, it's hard to
> > guarantee that the "connection" is created after the nodes at either
end.
> > Therefore, at startup, the connection might create its figure first
(before
> > the nodes exist), and then try to find its "source" or "target"
> > connectionanchors, and fail. The solution is to do a double check. The
> > connection tries to find the source, but can't. Then, when the source
is
> > created, it tries to find its connection. If it does, it says "ok, now
you
> > can set your connection anchor". This is what the viewer's part
registry is
> > for.
>
> > Keep in mind I'm using the terms connection, source, and target loosely
> > here. If this type of thing gets added to GEF, it would be referred to
as
> > an association probably.
>
> > "Vadim Strizhevsky" <Vadim.Strizhevsky@nowhere.com> wrote in message
> > news:b8bkqc$82q$1@rogue.oti.com...
> > >
> > > I need to do the same thing, but this suggestion seems strange to me.
> > > Would I have to change the connection's edit part when it gets
> > > disconnected and then change it again if it gets connected? Or did you
> > > mean to always have the connection's edit part be a standard
> > > GraphicalEditPart? Would all the connection's logic still work?
> > >
> > > I was thinking instead, creating a dummy/error edit part that
> > > "disconnected" connections would connect to. You can display it as X
or
> > > even be almost invisble. have it placed anywhere on the graph. These
parts
> > > can be constructed/destructed automatically as needed for connections.
> > >
> > > I haven't tried this yet. Would such an approach make sense?
> > >
> > > Thanks,
> > > Vadim
> > >
> > > Randy Hudson wrote:
> > >
> > > > Don't use AbstractConnectionEditPart for this. Use just a regular
> > > > GraphicalEditPart whose figure happens to be a connection.
> > >
> > > > "Amit" <amititz@yahoo.com> wrote in message
> > > > news:b89bu4$iqf$1@rogue.oti.com...
> > > > > Hi,
> > > > > I would like to find a reasonable way to make a connection not
> > connected
> > > > to
> > > > > anything. that is, for example, when I delete a node, I want the
> > > > connections
> > > > > that were connected to it to stay where they are (and not jump to
the
> > > > > screen's corner). I want to be able to move the loose endpoint
around,
> > and
> > > > > then connect it to a new node
> > > > > (for example, in visio, you can drop a connection on the page, and
> > only
> > > > then
> > > > > connect it to some other shape if you wish). Is there any way to
> > > > accomplish
> > > > > that ?
> > > > > I tried putting an anchor on the location of the request, and set
the
> > > > > connection's anchor to this new anchor. it doesn't work, and seems
> > like a
> > > > > pretty bad idea.
> > > > >
> > > > > Thanks,
> > > > > Amit
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
> > >
> > >
>
>
>
>
Re: unconnected connections [message #77055 is a reply to message #76942] Mon, 28 April 2003 09:49 Go to previous message
Eclipse UserFriend
Originally posted by: vadim.nowhere.com

Perhaps "connection" is in the eye of the beholder? ;)

The reason why I want this to be a real connection is that I want users to
be able to pick the bad end of it and re-connect it to an existing node. I
don't see how you can do that without it being a real connection part with
all connection policies.

On the general level, which is what Amit asked in the first place, the
question is how to best allow display of connections with one or two
endpoints not connected, while still allowing those endpoints to be
reconnected. It be nice if GEF had some provision for this.

Thanks,
-Vadim

Randy Hudson wrote:

> This was for your suggestion. I think your technique would work too, but
> it's forcing something to be a connection when it isn't. Do you want the
> z-order of these "connections" to be mixed with the z-order of other
> objects? In visio, if I drop a shape, it will cover up a connection
> previously dropped.

> "Vadim Strizhevsky" <vadim@nowhere.com> wrote in message
> news:b8eseo$6g3$1@rogue.oti.com...
> >
> > Sorry, but don't quite get what you mean. Was this for my suggestion or
> > Amit's? And how does
> > this apply? I was thinking that the model would know this and will cause
> > the root part generate
> > "dummy" models for nodes to which "disconnected" connections get
> > connected. Does that make
> > sense would this be a bad aproach?
> >
> > Thanks,
> > Vadim
> >
> > Randy Hudson wrote:
> >
> > > I forgot to think about the connecting parts. Basically, it's hard to
> > > guarantee that the "connection" is created after the nodes at either
> end.
> > > Therefore, at startup, the connection might create its figure first
> (before
> > > the nodes exist), and then try to find its "source" or "target"
> > > connectionanchors, and fail. The solution is to do a double check. The
> > > connection tries to find the source, but can't. Then, when the source
> is
> > > created, it tries to find its connection. If it does, it says "ok, now
> you
> > > can set your connection anchor". This is what the viewer's part
> registry is
> > > for.
> >
> > > Keep in mind I'm using the terms connection, source, and target loosely
> > > here. If this type of thing gets added to GEF, it would be referred to
> as
> > > an association probably.
> >
> > > "Vadim Strizhevsky" <Vadim.Strizhevsky@nowhere.com> wrote in message
> > > news:b8bkqc$82q$1@rogue.oti.com...
> > > >
> > > > I need to do the same thing, but this suggestion seems strange to me.
> > > > Would I have to change the connection's edit part when it gets
> > > > disconnected and then change it again if it gets connected? Or did you
> > > > mean to always have the connection's edit part be a standard
> > > > GraphicalEditPart? Would all the connection's logic still work?
> > > >
> > > > I was thinking instead, creating a dummy/error edit part that
> > > > "disconnected" connections would connect to. You can display it as X
> or
> > > > even be almost invisble. have it placed anywhere on the graph. These
> parts
> > > > can be constructed/destructed automatically as needed for connections.
> > > >
> > > > I haven't tried this yet. Would such an approach make sense?
> > > >
> > > > Thanks,
> > > > Vadim
> > > >
> > > > Randy Hudson wrote:
> > > >
> > > > > Don't use AbstractConnectionEditPart for this. Use just a regular
> > > > > GraphicalEditPart whose figure happens to be a connection.
> > > >
> > > > > "Amit" <amititz@yahoo.com> wrote in message
> > > > > news:b89bu4$iqf$1@rogue.oti.com...
> > > > > > Hi,
> > > > > > I would like to find a reasonable way to make a connection not
> > > connected
> > > > > to
> > > > > > anything. that is, for example, when I delete a node, I want the
> > > > > connections
> > > > > > that were connected to it to stay where they are (and not jump to
> the
> > > > > > screen's corner). I want to be able to move the loose endpoint
> around,
> > > and
> > > > > > then connect it to a new node
> > > > > > (for example, in visio, you can drop a connection on the page, and
> > > only
> > > > > then
> > > > > > connect it to some other shape if you wish). Is there any way to
> > > > > accomplish
> > > > > > that ?
> > > > > > I tried putting an anchor on the location of the request, and set
> the
> > > > > > connection's anchor to this new anchor. it doesn't work, and seems
> > > like a
> > > > > > pretty bad idea.
> > > > > >
> > > > > > Thanks,
> > > > > > Amit
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> >
> >
> >
> >
Previous Topic:EMF Commands vs. GEF Commands
Next Topic:DND issue
Goto Forum:
  


Current Time: Sun May 11 11:40:29 EDT 2025

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

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

Back to the top