Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Content Assist filtering
Content Assist filtering [message #173398] Thu, 06 July 2006 16:27 Go to next message
Brian Jakubik is currently offline Brian JakubikFriend
Messages: 140
Registered: July 2009
Senior Member
I have the following schema (snippet), and I want to only allow the user to
put in one tag1 in the parent, but content assist allows me to do as many as
I want (assuming from the maxOccurs="unbounded").

<xsd:element name="parent">
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="tag1" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="tag2" minOccurs="0" maxOccurs="1"/>
<!-- other items that can appear * time... -->
</xsd:choice>
<xsd:attribute name="should" type="xsd:boolean"/>
</xsd:complexType>
</xsd:element>

So when im in content assit, I want to filter out the entry tag1 if the
parent already has one,

I have my class that extends XMLContentAssistProcessor and think i could
figure out if it should be in the list by digging into the
contentassistrequest dom stuff ... and removing it from the proposal list if
it exists.

Does anyone see anything wrong with this approach, any side affects I might
be creating, or have a better suggestion (other than changing the schema)?

Thanks
Brian J
Re: Content Assist filtering [message #173534 is a reply to message #173398] Sat, 08 July 2006 01:07 Go to previous message
Craig Salter is currently offline Craig SalterFriend
Messages: 169
Registered: July 2009
Senior Member
The 'strict' content assist option may help ...

http://www.eclipse.org/webtools/wst/components/xml/1.0/new_a nd_noteworthy/wst-xml-1.0news.html
Previous Topic:Compiled JSP
Next Topic:XML editor content assistor problem with multiple schemas
Goto Forum:
  


Current Time: Fri Apr 19 13:21:13 GMT 2024

Powered by FUDForum. Page generated in 0.02455 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top