Skip to main content



      Home
Home » Eclipse Projects » GEF » getCreateBendpointCommand
getCreateBendpointCommand [message #120629] Thu, 04 March 2004 13:26 Go to next message
Eclipse UserFriend
I have built a custom connection router. Because of the way the router is
designed it could be the case that bendpoint requests are generated even
though the connection might be straight. This is fine, I want this to
happen because I need to record some information in the model, however I
need to distinguish between the two possible scenarios:

1) Bendpoints request where it is genuingly required and is handled by
BendpointEditPolicy.

2) A bendpoint request when the line is straight.

I guess I need to augment (by extension) the tracker which generates the
REQ_CREATE_BENDPOINT with a "line is straight" test and then generate an
alternative request if that is the case. I also guess that I need to
augment either an existing editpolicy or create a new one which handles
this type of request.

I'd really appreciate guidance on the optimum approach for doing this.
This side of GEF is still a mystery to me.

Thanks.

James
Re: getCreateBendpointCommand [message #120851 is a reply to message #120629] Thu, 04 March 2004 18:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

The convention used in GEF is that:

1) if you Drag a small bendpoint handle, you are *always* creating a
bendpoint. There is no such thing as straight in this scenario. Use ESC
key to abort creating the bendpoint.
2) When moving existing bendpoints, it is up to the editpolicy to determine
when "straight" has occurred. When it does so, it interprets this as a
remove bendpoint request. But, There is no type for such a request because
it is specific to the routing algorithm, and therefore up to the policy to
interpret.

If you have any alternative suggestions feel free to make them.

"James Willans" <jwillans@cs.york.ac.uk> wrote in message
news:c27sdj$avn$1@eclipse.org...
> I have built a custom connection router. Because of the way the router is
> designed it could be the case that bendpoint requests are generated even
> though the connection might be straight. This is fine, I want this to
> happen because I need to record some information in the model, however I
> need to distinguish between the two possible scenarios:
>
> 1) Bendpoints request where it is genuingly required and is handled by
> BendpointEditPolicy.
>
> 2) A bendpoint request when the line is straight.
>
> I guess I need to augment (by extension) the tracker which generates the
> REQ_CREATE_BENDPOINT with a "line is straight" test and then generate an
> alternative request if that is the case. I also guess that I need to
> augment either an existing editpolicy or create a new one which handles
> this type of request.
>
> I'd really appreciate guidance on the optimum approach for doing this.
> This side of GEF is still a mystery to me.
>
> Thanks.
>
> James
>
Re: getCreateBendpointCommand [message #120931 is a reply to message #120851] Fri, 05 March 2004 07:12 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Randy. I can now see that the more obvious route is to distill out
the different types of interpretations of REQ_CREATE_BENDPOINT in
BendpointEditPolicy. In this respect it would be useful if the
lineContainsPoint api was exposed (saves me having to copy it down).

James

Randy Hudson wrote:

> The convention used in GEF is that:

> 1) if you Drag a small bendpoint handle, you are *always* creating a
> bendpoint. There is no such thing as straight in this scenario. Use ESC
> key to abort creating the bendpoint.
> 2) When moving existing bendpoints, it is up to the editpolicy to determine
> when "straight" has occurred. When it does so, it interprets this as a
> remove bendpoint request. But, There is no type for such a request because
> it is specific to the routing algorithm, and therefore up to the policy to
> interpret.

> If you have any alternative suggestions feel free to make them.

> "James Willans" <jwillans@cs.york.ac.uk> wrote in message
> news:c27sdj$avn$1@eclipse.org...
> > I have built a custom connection router. Because of the way the router is
> > designed it could be the case that bendpoint requests are generated even
> > though the connection might be straight. This is fine, I want this to
> > happen because I need to record some information in the model, however I
> > need to distinguish between the two possible scenarios:
> >
> > 1) Bendpoints request where it is genuingly required and is handled by
> > BendpointEditPolicy.
> >
> > 2) A bendpoint request when the line is straight.
> >
> > I guess I need to augment (by extension) the tracker which generates the
> > REQ_CREATE_BENDPOINT with a "line is straight" test and then generate an
> > alternative request if that is the case. I also guess that I need to
> > augment either an existing editpolicy or create a new one which handles
> > this type of request.
> >
> > I'd really appreciate guidance on the optimum approach for doing this.
> > This side of GEF is still a mystery to me.
> >
> > Thanks.
> >
> > James
> >
Re: getCreateBendpointCommand [message #120983 is a reply to message #120931] Fri, 05 March 2004 14:39 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Open a bugzilla with the method you want exposed. Thanks.

"James Willans" <jwillans@cs.york.ac.uk> wrote in message
news:c29qs1$doj$1@eclipse.org...
> Thanks Randy. I can now see that the more obvious route is to distill out
> the different types of interpretations of REQ_CREATE_BENDPOINT in
> BendpointEditPolicy. In this respect it would be useful if the
> lineContainsPoint api was exposed (saves me having to copy it down).
>
> James
>
> Randy Hudson wrote:
>
> > The convention used in GEF is that:
>
> > 1) if you Drag a small bendpoint handle, you are *always* creating a
> > bendpoint. There is no such thing as straight in this scenario. Use
ESC
> > key to abort creating the bendpoint.
> > 2) When moving existing bendpoints, it is up to the editpolicy to
determine
> > when "straight" has occurred. When it does so, it interprets this as a
> > remove bendpoint request. But, There is no type for such a request
because
> > it is specific to the routing algorithm, and therefore up to the policy
to
> > interpret.
>
> > If you have any alternative suggestions feel free to make them.
>
> > "James Willans" <jwillans@cs.york.ac.uk> wrote in message
> > news:c27sdj$avn$1@eclipse.org...
> > > I have built a custom connection router. Because of the way the
router is
> > > designed it could be the case that bendpoint requests are generated
even
> > > though the connection might be straight. This is fine, I want this to
> > > happen because I need to record some information in the model, however
I
> > > need to distinguish between the two possible scenarios:
> > >
> > > 1) Bendpoints request where it is genuingly required and is handled by
> > > BendpointEditPolicy.
> > >
> > > 2) A bendpoint request when the line is straight.
> > >
> > > I guess I need to augment (by extension) the tracker which generates
the
> > > REQ_CREATE_BENDPOINT with a "line is straight" test and then generate
an
> > > alternative request if that is the case. I also guess that I need to
> > > augment either an existing editpolicy or create a new one which
handles
> > > this type of request.
> > >
> > > I'd really appreciate guidance on the optimum approach for doing this.
> > > This side of GEF is still a mystery to me.
> > >
> > > Thanks.
> > >
> > > James
> > >
>
>
Previous Topic:setActivePage for multipage editor programatically
Next Topic:Loading the model
Goto Forum:
  


Current Time: Sat Apr 26 00:28:52 EDT 2025

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

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

Back to the top