I have plugin that supports physics modeling. It implements a PDE like
editor that hosts a FormEditor with multiple pages (overview, datasets,
multiple graphics views, etc.). One can of course have several projects
open at once in different tabs, just as one can have several PDE editors
open. However, there are several Eclipse entities that are effectively
static, e.g. I have a VCR-like control bar that allows one to
start/stop/pause the current model. But that bar implements an actionSet
through a IWorkbenchWindowActionDelegate.
Question is, what is the proper way for such a delegate to know WHICH of the
currently open editors is the active one? At present, the editor with the
focus populates a field in the plugin's activator and the currently active
editor-object can be fetched from the delegate via a static member in the
plugin's activator. This doesn't feel very nice to me though.