Question

I have a GEF editor which represent a finite state machine. Editor's input (and output) is XML. What I am looking for is a way to debug my editor visually.

The way editor works is you create a state Start->Email->End, XML that is created is send to the server and there magic happens, of course Email object has properties that you set: from email, to email, subject, etc. What I am looking for is a way I can launch a debugger and step through each step of execution. So for example if I break at Email step I would be able to see what message was, whom it was for and what server returned at the end.

Is this something that is possible to accomplish and if so are there any articles I need to read to familiarize myself with how to create this debugger?

I found some discussion about Eclipse debuggers (1,2) but nothing about what I am interested in doing.

Was it helpful?

Solution

There are two different issues here.

One is writing a debugger engine, that manages the execution of your model, for example steps the execution, allows querying the variables/states, etc., and another one that outputs the result in your editor.

The articles you have linked work with the first issue: creating an engine that executes the model in the background, and integrates the engine into the Eclipse environment using 1) the launch framework to execute it similarly as Java programs, and 2) allows displaying the state in the textual editors.

You want to display the state in graphical editors. Because graphical editors have much less in common, the back-annotation of the debug state has to be done manually (instead of the generic support for text editors). Basically, I would create actions that set up breakpoints, and update the model to be able to store/query the execution state, and then update the GEF views to display it on the GUI. For this you have to change your Figures and your EditParts at least, and possibly other places as well.

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