|Contributing to the structure merge viewer's toolbar? [message #1341450]
||Thu, 08 May 2014 13:41
| Andreas Mayer
Registered: April 2014
I would like to contribute a command of my own to the toolbar of EMF Compare's structure merge viewer. Since the toolbar picks up contributions for "toolbar:org.eclipse.emf.compare.structuremergeviewer.toolbar", that's quite easy. However, there seems to be no feasible way for the command handler to access the Comparison instance or the diff model. So you can contribute commands, but you can't actually do anything useful with it. Or am I missing something?
A few more details: In the command handler I can access current active editor (an instance of org.eclipse.team.internal.ui.synchronize.SaveablesCompareEditorInput) or its input (an instance of org.eclipse.compare.CompareEditorInput). Neither provides an API to access EMF Compare-specific information nor can they be adapted to something that does.
The CompareEditorInput.getCompareConfiguration() returns a CompareConfiguration, which supports generic properties. EMF Compare uses these properties to attach the Comparison instance (among others), which I am looking for, but the corresponding property key is a private implementation detail of org.eclipse.emf.compare.ide.ui.internal.configuration.EMFCompareConfiguration. This could be used for a hack, but again is no safe API to access the diff model.
Powered by FUDForum
. Page generated in 0.02213 seconds