google / depan

DepAn is a direct manipulation tool for visualization, analysis, and refactoring of dependencies in large applications.
http://google.github.io/depan
Apache License 2.0
89 stars 20 forks source link

Run interative layout as a background task. #39

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Some layouts (esp. JUNG layouts) run iteratively until they stabilize the
locations of their nodes.  A few of them never reach a complete state; they
will continue iterating indefinitely.  In the both of these iterative
cases, we artificially limit the number of iterations to 1000.

See com.google.devtools.depan.eclipse.visualization.plugins.impl
  .LayoutPlugin.setLayout() for the code in question.

Not only does this impose an arbitrary limit, it interacts poorly with the
user.  Some layouts (e.g. FRLayout) run for a very long time on large
graphs (>5min).  With no feedback, it can appear that DepAn is hung.

This kind of iterative layout should be run as a background task (i.e. use
the Jobs API).  The progress monitor should indicate the limit of the
iterations, and the current iteration.  The user should be able to increase
or decrease the limit, and should be able to stop/cancel the layout task at
any time.  When the layout task is stopped for any reason (stable, limit
reached, user canceled), the computed locations are used to render the
graph's nodes.

In the best case, the View should update incrementally as the background
task proceeds.  Maybe not on every iterations, but it would be nice to
visualize the layout as it proceeds.

Original issue reported on code.google.com by le...@google.com on 12 Sep 2008 at 7:47