On 10/21/2015 10:25 AM, Kev James
wrote:
I'm extending the StructuredTextEditor to provide custom
functionality for a particular set of XML documents my
company's product creates. I've started to
extend XMLContentOutlineConfiguration to provide a custom
outline for these documents, and I'd like to change the icons
that pop up next to each element.
I would recommend you, and I would recommend anyone interested in
contributing that to WTP as well, to rely on the Common Navigator
Framework to implement the outline. This would provide extensibility
"for free" as the CNF is designed for extensibility.
To use CNF, you have to re-implement the Outline View for your
editor by using a CommonViewer or extending CommonNavigator, giving
it an ID, and using the NavigatorService to retrieve the various
content/label providers that will be associated with this ID via
plugin.xml.
If you implement it that way, you'll have to create the extensions
to register the regular WTP content/label providers found in
XMLContentOutlineConfiguration to the NavigatorService registry. In
that case, please also contribute those extensions defined in the
plugin.xml to WTP, that would be a first step towards adoption of
CNF in WTP directly.
HTH
|