angelozerr/eclipse-wtp-xml-search — pull request #15 by kuozhang (2014-08-26 06:08:23+00:00)
Title: split-editor-plugin

The editor plugin is split into two plugins editor.core and editor(keep the name for comparison, will be named editor.ui)

The most significant changes are the extension-point: searcher, addtionalProposalInfoProvider

The IXMLSearcher is split into two:

IXMLValidationSearcher(in core plugin), IXMLAssistSearcher(in ui plugin)

The original IXMLSearcher has four methods:

searchForValidation, searchForCompletion, searchForHyperlink, searchForTextHover

now they are divided as follows:

IXMLValidationSearcher: searchForValidation
IXMLAssistSearcher: searchForCompletion, searchForHyperlink, searchForTextHover

all the functions are the same as before.

Since the XMLReference and XMLReferenceTo are definded in the editor.core plugin now where IXMLAssistSearcher cannot be in, so the way to use extension-point has been changed,
Two extension point "...bindings" are added to bind the searchers and XMLReferenceTo or XMLReferenceToExpression

The old way:

The new way:

for validation searchers:

for assist searchers:

In the java codes, the way to get Searcher also got changed,

The old way:

IXMLReferenceTo.getSearcher()

The new way:
for validation searchers:

XMLValidationSearcherBindingsManager.getDefault().getSearcher(IXMLReferenceTo or IXMLReferenceToExpression)

for assist searchers:

XMLAssistSearcherBindingsManager.getDefault().getSearcher(IXMLReferenceTo or IXMLReferenceToExpression)

There is an extension-point called content-assists, it may be a little confused with the assist-searchers,
the ContentAssist is used to provide additional proposal info. Now the content-assists extension also used like the searchers:

In java codes, use the following method to get the provider:

ContentAssistBindingsManager.getDefault().getProvider(IXMLReferenceTo)