Question

I'm currently looking for a solution to the following problem.

I need to be able to draw a hierarchical tree (e.g., syntax tree, which is basically a graph) over a table or other alignable component in an Eclipse RCP view. The cells of the topmost row in the table act as leafs. Consider the following simplistic example:

          S
         /  \
        /    \
       N      VP
       |    /   \
       |   V     NP
       |   |    /  \
       |   |   D    N
       |   |   |    |
    -------------------
WORD|John|hit|the|ball|
CAT.| N  | V | D | N  |

The sentence that is being analysed, and the analysis values themselves, are in a table, but could possibly be placed in any other alignable element.

Now I want to draw a tree above the table. For this I want to use a framework that provides layout algorithms. The trees will be bigger in reality, and I want to be able to provide automated layouting. By "automated layouting" I don't mean different "graph styles" (the graph/tree will always be horizontal and generally more or less "styled" like in the example) but the possibility to order the nodes and edges so that they don't overlap too badly, etc. (highlighting portions of the tree/graph would be nice as well).

Zest of course comes to mind (seeing that those trees are basically graphs), but as far as I've found out it isn't possible to "bind" edges to table cells.

  • Would something like this be possible in GEF?
  • Do you know of other frameworks that might be able to achieve such an outcome?
  • Other ideas, perhaps without using a table?

Many thanks!

Was it helpful?

Solution

I will use the GEF (MVC) plug-in rather than Zest after all, as it is easy enough to achieve something that looks like a table for a number of a certain type of Figure, while the tree can be drawn with different types of Figures.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top