[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [wtp-incubator-dev] Adding Embedded Content/Regions to XML Editor
|
Cameron Bateman wrote:
+1 on the proposal to add extensibility to region parsing.
JSF would benefit from the ability to add a region partitioner for #{} and ${} style expression syntax in XML formats other than JSP. We currently register to things like XML_DEFAULT and then do our own parsing, but this can be somewhat inefficient. Especially for things like content assist that expect decent user response (<1s).
Cameron, I've opened an enhancement request for this, please add any
comments to that bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=225994
In the mean time, I see how the HTML does what appears to be region
specific coloring within the HTML editor for CSS and Scripts. It looks
like it is behind the scenes magic that happens in the
LineStyleProviders and the Content Assistance. A specific Partition is
used to indicate when say a CSS content assister is needed. This in
turns does some Parsing on the CSS that is in that particular Partion,
and based on the information generated from that model, as well as the
position of the cursor, makes some voodoo happen to enable content
assistance.
Unfortunately, this just seems like an unecessary work around from a
design stand point. Especially since it doesn't really continue the
point of the structured editor from my standpoint, it doesn't go far
enough in breaking down these embedded regions as truely structured
regions. The only way to do it is to expand the base Tokenizer to
suppor the additional parsing and functionality.
So it looks like I will have to revisit my content assisters and
restructure them to have pseudo regions based on the parsing of the
XPath statements.
Anways, I have a possible work around that I can implement, even though
it isn't my preferred method.
Dave