Ralf Ebert wrote:
> I'm trying to get an event whenever a wst editor of a particular type
> (xml with own model handler) is saved. Currently I'm doing it like this:
> http://github.com/ralfebert/swtxml/tree/master/plugins/com.s wtxml.ide/src/com/swtxml/ide/PreviewViewPart.java
>
>
> I'm
> following the dirty propertychange event of the part via a workbench
> partlistener, try to adapt the part to IStructuredModel (restricted
> API), and if so, I check if it's my model handler.
>
> I wonder if there is a better way to accomplish this task - this was the
> only thing I could come up with after browsing the APIs for some time...
> Thanks for your help!

You may want to look at how the Outline view works. As a
PageBookView, it's up to the active editor (or part) to return the
control to show when that part is active. This makes it fairly easy
for your editor to control what's shown, as well as determine when
an update of your "preview" should occur.