XML Schema Editing: Intellisense not working as expected

SyntaxEditor Web Languages Add-on for Windows Forms Forum

Posted 12 years ago by gardea
Version: 4.0.0251
Avatar
Using the XML Reflection test form in the provided sample, I've tried the following scenarios:

Opened a custom schema: I've used the XMLSchema.xsd which ships with the product

Opened an XML: I've used the Xslt.xsd

Started editing (basically emulating schema editing)

After I type in <, then the name of an element and then space, the intelli does not show up. Pressed escape, ctrl+space, intelli still doesn't show up. For some reason, I can't seem to be able to show the intelli popup when the custom schema is set to xmlschema.xsd.

I've tried then the same by loading XSLT.xsd as schema and Xslt.xslt as xml. Now space and ctrl+space show up the intelli prompt.

Another issue I've noticed: if I use aliases (say xsl) and I type (I am using square brackets to delimit my typing):
[<] the intelli shows up
[xsl] the intelli stays
[:] whatever is the first option in the list which matches the prefix + : is selected (inserted in the text) along with another : at the end and the intelli popup is dismissed. If I delete everything up to the first colon (the one delimiting the alias) and I try ctrl+break or whatever, I can't bring the popup to show again...

Is it possible that my expectations are wrong? Or is there a problem with the code?

Thank you, Petru.

Comments (3)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Petru,

Thanks for the bug reports. We've updated the code and just posted a new build that corrects these things:
http://www.actiprosoftware.com/Support/Forums/ViewForumTopic.aspx?ForumTopicID=2396


Actipro Software Support

Posted 12 years ago by gardea
Avatar
Thank you for the prompt response. I've went through the source code and have at least an additional suggestion to make the intelli list contextual. For e.g., when the list of attributes is shown, the one already typed in should not be made available for selection since an attribute may only show once. To the same extent, for child elements we should have the same.

I've modified AddMemberListItemsForAttributes but I am not sure I should post the code here.

Basically I've build a hashtable ("already filled") with keys being xmlqualifiedname calculated from the list of attributes (under context.TargetElement.Attributes). For that, I've needed another index to map aliases back to namespaces (I've found context.NamespacePrefixes but didn't find the inverted index), btw, did you have somewhere and I've missed it? Then in your foreach (XmlSchemaAttribute attribute in attributes) I've skipped over the one "already filled".

If you don't mind and are interested, please send me an email with the address where I could send my code for your review (since I've done it pretty quickly). Please get my email from my profile.

I would also be interested in understanding how automatic "code" insertion could be done (like snippets I suppose). All mandatory children elements and/or attributes should be automatically inserted, recursively, and then the cursor set to the first one editable (a text node for an element or the attribute in between the quotes).

Thank you, Petru.
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Petru,

Sure email us what you have at our support address and we'll be happy to incorporate it. The full email address is on our Contact Us page.

I don't believe we currently store an inverted alias/namespace table in the context.

For your other question it does sound like code snippets might be exactly what you want since they have all those capabilities.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 10 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.