Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] Customizing XML Editor Outline view

Mickael Istria wrote on 10/26/2015 11:08:48 AM:
> 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 
> 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.

I'd temper that enthusiasm for the CNF specifically because the Label 
Provider is something that gets replaced (or augmented through 
composition) a *lot* in the class hierarchy under 
XMLContentOutlineConfiguration. That class, and the support around it, was 
very much patterned after the way the SourceViewer instance within a Text 
Editor is managed.

That said, Kev, perhaps you could now continue with your original 

Nitin Dahyabhai
IBM Emerging Technologies

Back to the top