XML Editor content assist [message #223419] |
Tue, 04 November 2008 06:58  |
Eclipse User |
|
|
|
I try to find out, how the xml editor knows what proposals he can made at
the respectiv position in the editor.
I have study different tutorial so that i known that the file is divided
in partitions and that i assign every region with a
contentAssistProcessor, but the final step missing me. I can not find out
how it is realized, that the proposals depend on the xml schema, which is
declared in the prolog of the xml-file. I can not find any documents
therefor.
Can somebody tell me how it is realized or advise me same documents, where
i can that find out!?!?
|
|
|
|
|
Re: XML Editor content assist [message #223573 is a reply to message #223541] |
Thu, 06 November 2008 09:54  |
Eclipse User |
|
|
|
Peter wrote:
> Thank you for the answer. This was very helpful to understand the
> content assist better.
>
> But there is one open question i can not solve. Is it right, that in the
> method "computeCompletionProposals(ITextViewer, int)" of the
> AbstractContentAssistProcessor class the ContentAssistUtils offers a
> tree with the corresponding schema. so that i can retriev the node for
> the specific content assist depend on the cursor position in the editor.
> Or what is in the tree and who is responsible to read and parse the
> schema !?!?
>
You're right that the ContentAssistUtils class provides the node for
which the cursor is located.
If you're looking at how to retrieve the content model information about
that node, you should be looking at the ModelQuery interface and its
implementors. The method addAttributeNameProposals(ContentAssistRequest)
in AbstractContentAssistProcessor may be helpful in providing an example.
|
|
|
Powered by
FUDForum. Page generated in 0.04199 seconds