Add a tool that subscribes to editor changes

Hey everybody,

I would like to add a tool that displays an outline of the opened root node of my DSL.

I found and studies the following examples:

The first examples contains a class “ToolSynchronizer”. I cannot find it but it looks quite interesting.

Is the source code somewhere available?

I found FileEditorManagerListener, studied ContextActionTool and some Mbeddr source code..
The first works but is not the listener I am looking for. The other two are quite large and look too complicated.


Isn’t there a simple solution

  • to access the currently opened root node (to travers this node), and
  • listen to content changes and selection changes?




To listen to the selection use GlobalSelectionListener from MPS extensions.

To listen to content changes use SRepositoryContentAdapter.

To traverse the node use MPS Open API,

Does this help?


Thanks for your replay, Sergej.

The first sounds like the class I was looking for. I will check it soon.


Please sign in to leave a comment.