Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gef-dev] DOT for Zest poster, API, and UI

Hi!

As I am starting to prepare the dot4zest poster that I will be presenting at Eclipse Summit Europe I have been thinking about which parts to focus on and also what makes sense to keep in dot4zest in general.

Currently, dot4zest contains API for importing DOT to Zest Graphs both by generating Zest Graph subclasses (*.java files) and by creating a Zest Graph instance dynamically at runtime. It also contains API for exporting Zest Graphs to DOT.

Much of the UI in dot4zest is for the subclass import, in particular the wizards (to create a project and a graph) - the other UI elements are the DOT editor and the graph view, which displays DOT changed in the workspace as a Zest Graph (using the instance import).

I am not sure the subclass import actually makes much sense - my own usage and additions I've done since the initial version are mostly around the instance import, and every DOT feature supported in the import would need to be implemented in both import mechanisms.

So I have been wondering if it would make sense to cut down dot4zest a bit, and basically only offer instance import and export as API, and only the DOT editor and graph view as UI.

The import API could be just a single Zest Graph subclass (currently called Dot, since DotGraph is a generated Xtext class, but we could change that), which is created from a DOT graph and can be modified with DOT snippets (see http://wiki.eclipse.org/Graphviz_DOT_as_a_DSL_for_Zest#DOT_Graph).

The export API could be made part of the Zest Graph class itself. The export has no additional dependencies (the generator class is created by JET at compile time). Would it be possible to add a toDot() method to the Zest Graph class? Or would that have to wait for Zest 2.0 (since it could break client code that happens to have such a method)?

I think this would make a very easy and maintainable API: DotGraph for import and Graph#toDot for export, and that's it.

For the remaining UI elements (editor and view), the main usage I see is writing documentation - standalone DOT files, in source code comments, or in wiki markup files. This made me wonder if the editor and the view would make more sense as part of the new Mylyn Docs project (if they would be interested).

Any thoughts on any of this? If this makes sense I could put only these things (instance import, export, editor, view) on the poster, instead of presenting everything that is currently there.

And sorry for the lengthy mail :-)

Cheers,
Fabian

Back to the top