|Re: [text] actionSetPartAssociations deprecated -> how to replace this with commands? [message #983901 is a reply to message #983024]
||Wed, 14 November 2012 08:32
| Dennis Hendriks
Registered: January 2010
Location: Eindhoven, The Netherland...
No, I never found a solution that allows me to use commands.|
Instead, I now have the following code in my text editor class:
public void init(IEditorSite site, IEditorInput input)
// Perform normal initialization.
// Show the 'presentation' action set with the 'Toggle Block Selection
// Mode' and 'Show Whitespace Characters' actions.
IWorkbenchPage page = site.getPage();
which overrides org.eclipse.ui.texteditor.AbstractTextEditor.init(IEditorSite, IEditorInput).
One of the problems with this 'solution', is that I show the action set, but never hide it. As such, the buttons are now always visible in the toolbar. They are however disabled if the current editor (the one with the focus) does not support them.
It works good enough for me, although I would probably prefer a proper commands solution, if one were available.
Powered by FUDForum
. Page generated in 0.02367 seconds