"Map" containing present elements? [message #723057] |
Wed, 07 September 2011 10:17  |
Eclipse User |
|
|
|
Hi,
inside AbstractModelQueryCompletionProposalComputer class the method addAttributeValueProposal has a map containing all the inserted attributes.
At the moment I am working on addEntityProposals(ContentAssist, ITextRegion, CompletionProposalInvocationContext)
Let's suppose I have something similar:
<family>
<mother>Lisa</mother>
<father>Bob</father>
Now I call content assist and for example I get proposal for <daughter>...ok...is there a way to know that <mother> and <father> have been already inserted?
Thanks
Marco
|
|
|
|
|
|
|
Re: "Map" containing present elements? [message #724804 is a reply to message #724457] |
Tue, 13 September 2011 04:31  |
Eclipse User |
|
|
|
Nitin Dahyabhai wrote on Mon, 12 September 2011 08:04If the cursor is between the father start and end tags, father is supposed to be the parent of what you insert.
Getting their content requires using the DOM API from org.w3c.dom.Node and its subinterfaces; #toString() has no such requirement.
Those are Text nodes in the DOM representing white space not contained under the "mother" and "father" Elements. There should be one trailing "father" as well.
Yes, ok, but I can not understand why in my NodeList I also get, as children elements, #text elements...
I mean...I get why I have in the NodeList...but is it possible to have only tag name inside NodeList?
For example only "father" and "mother"...nothing else, I do not want #text or #comment
[Updated on: Tue, 13 September 2011 04:57] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03532 seconds