Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tracecompass-dev] Editing XML analysis in UI

Hi,

Right now, the managing of XML analysis is done though a context menu that opens a dialog. This is similar to how custom parser management is done. In case you haven't seen it, it looks like this:

 

 


 
In would be good to be able to edit XML analysis through the UI in addition to being able to import, export and delete. We could add an Edit button in this dialog without too much effort but it could do different things:

1. Open the normal XML editor (from Web Tools project)

This is pretty easy to implement. Once the XML editor plugins are part of the installation, we only need to call IDE.openEditor on the URI and it will open the correct editor. This is what has been done in https://git.eclipse.org/r/#/c/70200/

Although this is easy, it is not that much better than the plain text editor. This also adds ~10MB of dependencies to Trace Compass. At the moment, the dependencies have to be specified per plugin instead of a single feature which is a bit combersome but an improvement for this is in the work (bug 480141)

2. Open the "specialized" XML editor (Jonathan Sauvé)

This editors allows you to specify colors, state system paths, etc, for a given XML time graph view, all from the UI without writting.
It looks like this:




This editor opens in a dialog which would be a bit odd to integrate with the XML management dialog. This would mean that a dialog would open another dialog. Since there might be quite a few editing iterations before the analysis does what the users want, I think opening and closing a dialog every time would be too annoying. I think this XML editing should either be a view or simply an editor since it really does fit the edit/save workflow of the editors.

So I would suggest adapting this specialized XML editor from a dialog into an Eclipse editor. The edit button of the XML management dialog would open this editor but only when the content can indeed be edited by this special editor, i.e. for time graph views. Otherwise, it would fall back to the normal XML editor

3. Open State system editor using UML diagrams (Simon Delisle)

Another approach to editing the XML analysis is using UML state system diagrams. This has been done by Simon Delisle as a branch on Github (https://github.com/delislesim/Trace-Compass/tree/statemachine_experimental).




There is some overlap with solution #2 as it does allow specifying colors that will go in the time graph view. Perhaps one way to go would be to take the UI editing from #2 that has to do with specifying paths in the state system and integrate it with this UML diagram editor.

One thing to note about this editor is that it currently uses Graphiti and it would be good to try to make it use Papyrus instead. The code also has to be rebased since it was last updated around a year ago.

4. Combined specialized XML editor with normal XML editor

It is possible to have a multi-tabbed editor that could contain a tab for the more specialized editing (solutions #2 and/or #3) and the plain XML editor (#1). Perhaps the "Design" tab of the normal XML editor could be replaced by that or just adding another tab would be an option. Here is what a multi-tabbed editor looks like in case you don't know what I'm talking about:





So what I suggest is that we could experiment with multi-tabbed editors and see if we can replace the design tab with other editor or ours. If that's reasonably doable, we could have the "State Systems" tab that would show the editor #3 and for editing state system paths, it would reuse parts of editor #2. For things not supported by the UI, the user could go to the "Source" tab and use the normal XML editor from Web Tools.


Let me know what you think!

Marc-André

Back to the top