Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » DirectedGraphLayout and self cycles
DirectedGraphLayout and self cycles [message #213070] Sun, 02 April 2006 19:17 Go to next message
Eclipse UserFriend
Originally posted by: no_public_mail.mail.com

I'm writing an ER editor using GEF.
Each time ER model is opened it is programmatically layouted, info about
placement of diagram elements is not persisted anywhere (due to REQ).
I used schema editor example as a reference and currently have problem with
self cycles. There are elements that have references to itself. While
opening editor with such an element I get an exception

java.lang.RuntimeException: Cycle detected in graph
at
org.eclipse.draw2d.internal.graph.InitialRankSolver.solve(In itialRankSolver.java:53)
at
org.eclipse.draw2d.internal.graph.InitialRankSolver.visit(In itialRankSolver.java:34)
at
org.eclipse.draw2d.graph.DirectedGraphLayout.visit(DirectedG raphLayout.java:104)
.....

Entire model contains a single element with a single connection to itself.
Everything else works fine. I can draw such connection on an empty or
existing diagram but once it is saved (as UML) it can't be opened due to
this problem.

I'm using Eclipse 3.1.0, GEF 3.1.0

I would really appreciate if someone could advice whether self loops can be
supported in this case and any tips on this matter.

Thank you
Re: DirectedGraphLayout and self cycles [message #213176 is a reply to message #213070] Mon, 03 April 2006 17:27 Go to previous messageGo to next message
Steven R. Shaw is currently offline Steven R. ShawFriend
Messages: 128
Registered: July 2009
Senior Member
This is still a problem in GEF 3.2. See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=45759

To workaround, you have to not contribute edges to the graph that have
source and target that are equal.

-Steve

"Andry" <no_public_mail@mail.com> wrote in message
news:e0p800$o96$1@utils.eclipse.org...
> I'm writing an ER editor using GEF.
> Each time ER model is opened it is programmatically layouted, info about
> placement of diagram elements is not persisted anywhere (due to REQ).
> I used schema editor example as a reference and currently have problem
with
> self cycles. There are elements that have references to itself. While
> opening editor with such an element I get an exception
>
> java.lang.RuntimeException: Cycle detected in graph
> at
>
org.eclipse.draw2d.internal.graph.InitialRankSolver.solve(In itialRankSolver.
java:53)
> at
>
org.eclipse.draw2d.internal.graph.InitialRankSolver.visit(In itialRankSolver.
java:34)
> at
>
org.eclipse.draw2d.graph.DirectedGraphLayout.visit(DirectedG raphLayout.java:
104)
> ....
>
> Entire model contains a single element with a single connection to itself.
> Everything else works fine. I can draw such connection on an empty or
> existing diagram but once it is saved (as UML) it can't be opened due to
> this problem.
>
> I'm using Eclipse 3.1.0, GEF 3.1.0
>
> I would really appreciate if someone could advice whether self loops can
be
> supported in this case and any tips on this matter.
>
> Thank you
>
>
Re: DirectedGraphLayout and self cycles [message #213235 is a reply to message #213176] Tue, 04 April 2006 08:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: no_public_mail.mail.com

It is not obvious whether anything is going to be done towards this issue,
one is clear that GEF doesn't hang anymore when it encounters such a case.
As much as I know directed graphs are supposed to allow self loops contrary
to undirected.
In my case I just can't avoid them because it limits application.
I would appreciate if somebody from GEF could say whether anything is going
to be done about self loops.

"Steven Shaw" <steveshaw@ca.ibm.com> wrote in message
news:e0rlo5$pov$1@utils.eclipse.org...
> This is still a problem in GEF 3.2. See
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=45759
>
> To workaround, you have to not contribute edges to the graph that have
> source and target that are equal.
>
> -Steve
>
> "Andry" <no_public_mail@mail.com> wrote in message
> news:e0p800$o96$1@utils.eclipse.org...
>> I'm writing an ER editor using GEF.
>> Each time ER model is opened it is programmatically layouted, info about
>> placement of diagram elements is not persisted anywhere (due to REQ).
>> I used schema editor example as a reference and currently have problem
> with
>> self cycles. There are elements that have references to itself. While
>> opening editor with such an element I get an exception
>>
>> java.lang.RuntimeException: Cycle detected in graph
>> at
>>
> org.eclipse.draw2d.internal.graph.InitialRankSolver.solve(In itialRankSolver.
> java:53)
>> at
>>
> org.eclipse.draw2d.internal.graph.InitialRankSolver.visit(In itialRankSolver.
> java:34)
>> at
>>
> org.eclipse.draw2d.graph.DirectedGraphLayout.visit(DirectedG raphLayout.java:
> 104)
>> ....
>>
>> Entire model contains a single element with a single connection to
>> itself.
>> Everything else works fine. I can draw such connection on an empty or
>> existing diagram but once it is saved (as UML) it can't be opened due to
>> this problem.
>>
>> I'm using Eclipse 3.1.0, GEF 3.1.0
>>
>> I would really appreciate if someone could advice whether self loops can
> be
>> supported in this case and any tips on this matter.
>>
>> Thank you
>>
>>
>
>
Re: DirectedGraphLayout and self cycles [message #213249 is a reply to message #213235] Tue, 04 April 2006 12:21 Go to previous messageGo to next message
Steven R. Shaw is currently offline Steven R. ShawFriend
Messages: 128
Registered: July 2009
Senior Member
If this issue is important to you, feel free to contribute a patch in the
bugzilla and it will be considered.

-Steve

"Andry" <no_public_mail@mail.com> wrote in message
news:e0tbrp$3b1$1@utils.eclipse.org...
> It is not obvious whether anything is going to be done towards this issue,
> one is clear that GEF doesn't hang anymore when it encounters such a case.
> As much as I know directed graphs are supposed to allow self loops
contrary
> to undirected.
> In my case I just can't avoid them because it limits application.
> I would appreciate if somebody from GEF could say whether anything is
going
> to be done about self loops.
>
> "Steven Shaw" <steveshaw@ca.ibm.com> wrote in message
> news:e0rlo5$pov$1@utils.eclipse.org...
> > This is still a problem in GEF 3.2. See
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=45759
> >
> > To workaround, you have to not contribute edges to the graph that have
> > source and target that are equal.
> >
> > -Steve
> >
> > "Andry" <no_public_mail@mail.com> wrote in message
> > news:e0p800$o96$1@utils.eclipse.org...
> >> I'm writing an ER editor using GEF.
> >> Each time ER model is opened it is programmatically layouted, info
about
> >> placement of diagram elements is not persisted anywhere (due to REQ).
> >> I used schema editor example as a reference and currently have problem
> > with
> >> self cycles. There are elements that have references to itself. While
> >> opening editor with such an element I get an exception
> >>
> >> java.lang.RuntimeException: Cycle detected in graph
> >> at
> >>
> >
org.eclipse.draw2d.internal.graph.InitialRankSolver.solve(In itialRankSolver.
> > java:53)
> >> at
> >>
> >
org.eclipse.draw2d.internal.graph.InitialRankSolver.visit(In itialRankSolver.
> > java:34)
> >> at
> >>
> >
org.eclipse.draw2d.graph.DirectedGraphLayout.visit(DirectedG raphLayout.java:
> > 104)
> >> ....
> >>
> >> Entire model contains a single element with a single connection to
> >> itself.
> >> Everything else works fine. I can draw such connection on an empty or
> >> existing diagram but once it is saved (as UML) it can't be opened due
to
> >> this problem.
> >>
> >> I'm using Eclipse 3.1.0, GEF 3.1.0
> >>
> >> I would really appreciate if someone could advice whether self loops
can
> > be
> >> supported in this case and any tips on this matter.
> >>
> >> Thank you
> >>
> >>
> >
> >
>
>
Re: DirectedGraphLayout and self cycles [message #213443 is a reply to message #213235] Thu, 06 April 2006 04:01 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> It is not obvious whether anything is going to be done towards this issue,
> one is clear that GEF doesn't hang anymore when it encounters such a case.
> As much as I know directed graphs are supposed to allow self loops
> contrary to undirected.
> In my case I just can't avoid them because it limits application.

We didn't say to remove them from your model. Just remove them from the
input to the graph layout algorithm.

> I would appreciate if somebody from GEF could say whether anything is
> going to be done about self loops.

Steve is a GEF committer.
Previous Topic:Adding header/footer when printing
Next Topic:GEF scalability
Goto Forum:
  


Current Time: Thu Apr 18 04:54:02 GMT 2024

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

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

Back to the top