I am defining a command that will be used in the view toolbar and/or context menu for multiple views, some of which can have multiple instances. The command has a toggle state (org.eclipse.ui.commands.toggleState). The documentation seems to suggest using org.eclipse.ui.handlers.RegistryToggleState as the state implementation class, but this stores the state per-command, not per-view-per-command as I would need.
I do not need persistance between sessions. Is there a simple/preferred way to achieve this, or should I implement my own state?
I have done this. I could not find any standard API in Eclipse, so I ended up writing my own stuff for it. Which is relatively simple.