Extending XML Content Assist [message #73913] |
Mon, 14 February 2005 19:57  |
Eclipse User |
|
|
|
Along with the validation extensions I've been asking about, I also need
to extend content assist so that the schema-based content assist is still
present, but with additional proposals supplied by moi.
It looks as though I might be able to:
1) subclass XMLContentAssistProcessor
2) override computeContentProposals, computeAttributeValueProposals etc.,
calling the inherited method, and adding proposals to the
ContentAssistRequest.
3) subclass StructuredTextViewerConfigurationXML and replace the
implementation of getContentAssistant() wholesale. Suggestion: perhaps a
factory method for the XMLContentProcessor, so I don't have to copy all
the partition stuff?
4) Specify my configuration subclass using the extension point
org.eclipse.wst.sse.ui.extendedconfiguration. Will this work to replace
the configuration object with my own, or is there some other mechanism I
should use?
Does this seem like the correct approach?
Thanks!
- Richard
|
|
|
|
|
|
|
|
Re: Extending XML Content Assist [message #74376 is a reply to message #74304] |
Wed, 16 February 2005 09:24  |
Eclipse User |
|
|
|
Just added my comment:
>>>
Raphael's example of a path value attribute is one I was going to suggest.
For elements, an example might be the Ant editor, where you would want
contributed tasks to show up as tag proposals, while the built-in tasks
would be covered by the schema.
The chain-of-processors idea is interesting if performance doesn't suffer.
I suppose you could have an extension point that referred to a base
processor. In the short term, I think I would be content with a
nicely-factored base processor class to derive from (it doesn't look too
bad right now) and a way for an editor to replace the processor that's
configured by default.
<<<
|
|
|
Powered by
FUDForum. Page generated in 0.04336 seconds