DirectedGraphLayout and self cycles [message #213070] |
Sun, 02 April 2006 19:17 |
Eclipse User |
|
|
|
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 #213235 is a reply to message #213176] |
Tue, 04 April 2006 08:47 |
Eclipse User |
|
|
|
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 #213443 is a reply to message #213235] |
Thu, 06 April 2006 04:01 |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.04706 seconds