Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Same Source Target- Bendpoint Problem
Same Source Target- Bendpoint Problem [message #176595] Mon, 11 April 2005 03:03 Go to next message
Eclipse UserFriend
Originally posted by: binti.ksu.edu

Hi All,

I tried inserting the bendpoint in my connection after recognizing that the
source and target are same. I tried the following code which is given at
eclipsewiki. I even set the connection layer's router as benpoint router.
Still it does not work. I have added this code in the connection's edit part
class.

RelativeBendpoint rbp = new RelativeBendpoint(conn);
rbp.setRelativeDimensions(new Dimension(1, 1), new Dimension(2, 2));
ArrayList list = new ArrayList();
list.add(rbp);
conn.setRoutingConstraint(list);
conn.setConnectionRouter(new BendpointConnectionRouter());

What could be the possible problem? Is there something obvious that I am
missing?

Thanks in Advance,
Binti.
Re: Same Source Target- Bendpoint Problem [message #176615 is a reply to message #176595] Mon, 11 April 2005 05:50 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
You shouldn't create a new router for each connection. You need to create
one router that you register with the connection layer. Then you don't need
to set the router on the connection yourself. Look at our examples.
ShapesEditor#initializeGraphicalViewer().

"Binti Sepaha" <binti@ksu.edu> wrote in message
news:d3cpoi$9fk$1@news.eclipse.org...
> Hi All,
>
> I tried inserting the bendpoint in my connection after recognizing that
the
> source and target are same. I tried the following code which is given at
> eclipsewiki. I even set the connection layer's router as benpoint router.
> Still it does not work. I have added this code in the connection's edit
part
> class.
>
> RelativeBendpoint rbp = new RelativeBendpoint(conn);
> rbp.setRelativeDimensions(new Dimension(1, 1), new Dimension(2, 2));
> ArrayList list = new ArrayList();
> list.add(rbp);
> conn.setRoutingConstraint(list);
> conn.setConnectionRouter(new BendpointConnectionRouter());
>
> What could be the possible problem? Is there something obvious that I am
> missing?
>
> Thanks in Advance,
> Binti.
>
>
Re: Same Source Target- Bendpoint Problem [message #176701 is a reply to message #176615] Mon, 11 April 2005 20:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: binti.ksu.edu

Alright, But where in teh shapes editor is this done?

The method you asked me to see is -

protected void initializeGraphicalViewer() {
super.initializeGraphicalViewer();
GraphicalViewer graphicalViewer = getGraphicalViewer();
graphicalViewer.setContents(getModel()); // set the contents of this editor
// listen for dropped parts
graphicalViewer.addDropTargetListener(createTransferDropTarg etListener());
}

Where am I supposed to set the connection layer's router? Can I do it in the
diagram edit part?

Thanks,
Binti.

"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:d3d3h3$jks$1@news.eclipse.org...
> You shouldn't create a new router for each connection. You need to create
> one router that you register with the connection layer. Then you don't
> need
> to set the router on the connection yourself. Look at our examples.
> ShapesEditor#initializeGraphicalViewer().
>
> "Binti Sepaha" <binti@ksu.edu> wrote in message
> news:d3cpoi$9fk$1@news.eclipse.org...
>> Hi All,
>>
>> I tried inserting the bendpoint in my connection after recognizing that
> the
>> source and target are same. I tried the following code which is given at
>> eclipsewiki. I even set the connection layer's router as benpoint router.
>> Still it does not work. I have added this code in the connection's edit
> part
>> class.
>>
>> RelativeBendpoint rbp = new RelativeBendpoint(conn);
>> rbp.setRelativeDimensions(new Dimension(1, 1), new Dimension(2, 2));
>> ArrayList list = new ArrayList();
>> list.add(rbp);
>> conn.setRoutingConstraint(list);
>> conn.setConnectionRouter(new BendpointConnectionRouter());
>>
>> What could be the possible problem? Is there something obvious that I am
>> missing?
>>
>> Thanks in Advance,
>> Binti.
>>
>>
>
>
Re: Same Source Target- Bendpoint Problem [message #176723 is a reply to message #176701] Mon, 11 April 2005 21:07 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
You need to catch up with the latest code.

"Binti Sepaha" <binti@ksu.edu> wrote in message
news:d3ells$u9f$1@news.eclipse.org...
> Alright, But where in teh shapes editor is this done?
>
> The method you asked me to see is -
>
> protected void initializeGraphicalViewer() {
> super.initializeGraphicalViewer();
> GraphicalViewer graphicalViewer = getGraphicalViewer();
> graphicalViewer.setContents(getModel()); // set the contents of this
editor
> // listen for dropped parts
>
graphicalViewer.addDropTargetListener(createTransferDropTarg etListener());
> }
>
> Where am I supposed to set the connection layer's router? Can I do it in
the
> diagram edit part?
>
> Thanks,
> Binti.
>
> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> news:d3d3h3$jks$1@news.eclipse.org...
> > You shouldn't create a new router for each connection. You need to
create
> > one router that you register with the connection layer. Then you don't
> > need
> > to set the router on the connection yourself. Look at our examples.
> > ShapesEditor#initializeGraphicalViewer().
> >
> > "Binti Sepaha" <binti@ksu.edu> wrote in message
> > news:d3cpoi$9fk$1@news.eclipse.org...
> >> Hi All,
> >>
> >> I tried inserting the bendpoint in my connection after recognizing that
> > the
> >> source and target are same. I tried the following code which is given
at
> >> eclipsewiki. I even set the connection layer's router as benpoint
router.
> >> Still it does not work. I have added this code in the connection's edit
> > part
> >> class.
> >>
> >> RelativeBendpoint rbp = new RelativeBendpoint(conn);
> >> rbp.setRelativeDimensions(new Dimension(1, 1), new Dimension(2, 2));
> >> ArrayList list = new ArrayList();
> >> list.add(rbp);
> >> conn.setRoutingConstraint(list);
> >> conn.setConnectionRouter(new BendpointConnectionRouter());
> >>
> >> What could be the possible problem? Is there something obvious that I
am
> >> missing?
> >>
> >> Thanks in Advance,
> >> Binti.
> >>
> >>
> >
> >
>
>
Re: Same Source Target- Bendpoint Problem [message #176866 is a reply to message #176723] Tue, 12 April 2005 13:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: binti.ksu.edu

Thanks, I saw that. But I do not have an initialGraphicalViewer methode in
my editor. But it is an editor with flyout palette. Is it ok if I add it
still? I will try it now anyways.

Also, I have another version of draw2d, I guess. Where can I get the latest
version from?

Binti.


"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:d3ep98$433$1@news.eclipse.org...
> You need to catch up with the latest code.
>
> "Binti Sepaha" <binti@ksu.edu> wrote in message
> news:d3ells$u9f$1@news.eclipse.org...
>> Alright, But where in teh shapes editor is this done?
>>
>> The method you asked me to see is -
>>
>> protected void initializeGraphicalViewer() {
>> super.initializeGraphicalViewer();
>> GraphicalViewer graphicalViewer = getGraphicalViewer();
>> graphicalViewer.setContents(getModel()); // set the contents of this
> editor
>> // listen for dropped parts
>>
> graphicalViewer.addDropTargetListener(createTransferDropTarg etListener());
>> }
>>
>> Where am I supposed to set the connection layer's router? Can I do it in
> the
>> diagram edit part?
>>
>> Thanks,
>> Binti.
>>
>> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
>> news:d3d3h3$jks$1@news.eclipse.org...
>> > You shouldn't create a new router for each connection. You need to
> create
>> > one router that you register with the connection layer. Then you don't
>> > need
>> > to set the router on the connection yourself. Look at our examples.
>> > ShapesEditor#initializeGraphicalViewer().
>> >
>> > "Binti Sepaha" <binti@ksu.edu> wrote in message
>> > news:d3cpoi$9fk$1@news.eclipse.org...
>> >> Hi All,
>> >>
>> >> I tried inserting the bendpoint in my connection after recognizing
>> >> that
>> > the
>> >> source and target are same. I tried the following code which is given
> at
>> >> eclipsewiki. I even set the connection layer's router as benpoint
> router.
>> >> Still it does not work. I have added this code in the connection's
>> >> edit
>> > part
>> >> class.
>> >>
>> >> RelativeBendpoint rbp = new RelativeBendpoint(conn);
>> >> rbp.setRelativeDimensions(new Dimension(1, 1), new Dimension(2,
>> >> 2));
>> >> ArrayList list = new ArrayList();
>> >> list.add(rbp);
>> >> conn.setRoutingConstraint(list);
>> >> conn.setConnectionRouter(new BendpointConnectionRouter());
>> >>
>> >> What could be the possible problem? Is there something obvious that I
> am
>> >> missing?
>> >>
>> >> Thanks in Advance,
>> >> Binti.
>> >>
>> >>
>> >
>> >
>>
>>
>
>
Re: Same Source Target- Bendpoint Problem [message #176882 is a reply to message #176723] Tue, 12 April 2005 13:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: binti.ksu.edu

Pratik,

I tried the code in the create GraphicalViewer in my editor class and wrote
the code mentioned before in the connection edit part class to check for
same source and target. My anchors check for this case too and return points
which are set for the connection in this case. But still no bendpoints?

What should I do?

Binti.


"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:d3ep98$433$1@news.eclipse.org...
> You need to catch up with the latest code.
>
> "Binti Sepaha" <binti@ksu.edu> wrote in message
> news:d3ells$u9f$1@news.eclipse.org...
>> Alright, But where in teh shapes editor is this done?
>>
>> The method you asked me to see is -
>>
>> protected void initializeGraphicalViewer() {
>> super.initializeGraphicalViewer();
>> GraphicalViewer graphicalViewer = getGraphicalViewer();
>> graphicalViewer.setContents(getModel()); // set the contents of this
> editor
>> // listen for dropped parts
>>
> graphicalViewer.addDropTargetListener(createTransferDropTarg etListener());
>> }
>>
>> Where am I supposed to set the connection layer's router? Can I do it in
> the
>> diagram edit part?
>>
>> Thanks,
>> Binti.
>>
>> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
>> news:d3d3h3$jks$1@news.eclipse.org...
>> > You shouldn't create a new router for each connection. You need to
> create
>> > one router that you register with the connection layer. Then you don't
>> > need
>> > to set the router on the connection yourself. Look at our examples.
>> > ShapesEditor#initializeGraphicalViewer().
>> >
>> > "Binti Sepaha" <binti@ksu.edu> wrote in message
>> > news:d3cpoi$9fk$1@news.eclipse.org...
>> >> Hi All,
>> >>
>> >> I tried inserting the bendpoint in my connection after recognizing
>> >> that
>> > the
>> >> source and target are same. I tried the following code which is given
> at
>> >> eclipsewiki. I even set the connection layer's router as benpoint
> router.
>> >> Still it does not work. I have added this code in the connection's
>> >> edit
>> > part
>> >> class.
>> >>
>> >> RelativeBendpoint rbp = new RelativeBendpoint(conn);
>> >> rbp.setRelativeDimensions(new Dimension(1, 1), new Dimension(2,
>> >> 2));
>> >> ArrayList list = new ArrayList();
>> >> list.add(rbp);
>> >> conn.setRoutingConstraint(list);
>> >> conn.setConnectionRouter(new BendpointConnectionRouter());
>> >>
>> >> What could be the possible problem? Is there something obvious that I
> am
>> >> missing?
>> >>
>> >> Thanks in Advance,
>> >> Binti.
>> >>
>> >>
>> >
>> >
>>
>>
>
>
Re: Same Source Target- Bendpoint Problem [message #176890 is a reply to message #176866] Tue, 12 April 2005 13:47 Go to previous message
Brian Fernandes is currently offline Brian FernandesFriend
Messages: 68
Registered: July 2009
Member
Binti,

http://www.eclipse.org/downloads/download.php?file=/tools/ge f/downloads/index.php
or
http://download.eclipse.org/tools/gef/downloads/index.php

That will give you a list of GEF builds. For the latest code, use the 3.1
stream Integration Builds - or you can always pull it right off CVS.

Best,
Brian.

"Binti Sepaha" <binti@ksu.edu> wrote in message
news:d3gij8$b8r$1@news.eclipse.org...
> Thanks, I saw that. But I do not have an initialGraphicalViewer methode in
> my editor. But it is an editor with flyout palette. Is it ok if I add it
> still? I will try it now anyways.
>
> Also, I have another version of draw2d, I guess. Where can I get the
> latest version from?
>
> Binti.
>
>
> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> news:d3ep98$433$1@news.eclipse.org...
>> You need to catch up with the latest code.
>>
>> "Binti Sepaha" <binti@ksu.edu> wrote in message
>> news:d3ells$u9f$1@news.eclipse.org...
>>> Alright, But where in teh shapes editor is this done?
>>>
>>> The method you asked me to see is -
>>>
>>> protected void initializeGraphicalViewer() {
>>> super.initializeGraphicalViewer();
>>> GraphicalViewer graphicalViewer = getGraphicalViewer();
>>> graphicalViewer.setContents(getModel()); // set the contents of this
>> editor
>>> // listen for dropped parts
>>>
>> graphicalViewer.addDropTargetListener(createTransferDropTarg etListener());
>>> }
>>>
>>> Where am I supposed to set the connection layer's router? Can I do it in
>> the
>>> diagram edit part?
>>>
>>> Thanks,
>>> Binti.
>>>
>>> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
>>> news:d3d3h3$jks$1@news.eclipse.org...
>>> > You shouldn't create a new router for each connection. You need to
>> create
>>> > one router that you register with the connection layer. Then you
>>> > don't
>>> > need
>>> > to set the router on the connection yourself. Look at our examples.
>>> > ShapesEditor#initializeGraphicalViewer().
>>> >
>>> > "Binti Sepaha" <binti@ksu.edu> wrote in message
>>> > news:d3cpoi$9fk$1@news.eclipse.org...
>>> >> Hi All,
>>> >>
>>> >> I tried inserting the bendpoint in my connection after recognizing
>>> >> that
>>> > the
>>> >> source and target are same. I tried the following code which is given
>> at
>>> >> eclipsewiki. I even set the connection layer's router as benpoint
>> router.
>>> >> Still it does not work. I have added this code in the connection's
>>> >> edit
>>> > part
>>> >> class.
>>> >>
>>> >> RelativeBendpoint rbp = new RelativeBendpoint(conn);
>>> >> rbp.setRelativeDimensions(new Dimension(1, 1), new Dimension(2,
>>> >> 2));
>>> >> ArrayList list = new ArrayList();
>>> >> list.add(rbp);
>>> >> conn.setRoutingConstraint(list);
>>> >> conn.setConnectionRouter(new BendpointConnectionRouter());
>>> >>
>>> >> What could be the possible problem? Is there something obvious that I
>> am
>>> >> missing?
>>> >>
>>> >> Thanks in Advance,
>>> >> Binti.
>>> >>
>>> >>
>>> >
>>> >
>>>
>>>
>>
>>
>
>
Previous Topic:Missing feedback layer
Next Topic:Runtime Workbench Hangs
Goto Forum:
  


Current Time: Sat Feb 04 03:43:30 GMT 2023

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

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

Back to the top