Friday November 28, 2008
As part of the JavaScript 1.7 work,
I also beefed up the E4X support. E4X allows you to embed XML objects
directly in your JavaScript source. Here's some simple E4X JavaScript:
We've had E4X support in NetBeans in both NetBeans 6.1 and 6.5. But now, in NetBeans 7.0, semantic highlighting is E4X aware, such that the source code looks like this instead:
The whole XML document declaration has a faint purple background, element names are blue and document content is bolded.
(The green here, as for all JavaScript code in NetBeans, indicates variables in global scope.)
(2008-11-28 10:14:09.0)
Permalink
Comments [2]
That's pretty cool.
Each time I type e4x expressions, I always wonder if something could be done for auto-completion when putting together an xpath expression. Any plans on supporting this in netbeans?
I am not sure if it can be done, or if so, how. Maybe using schemas and annotations, like:
[Schema("blah.xsd") var doc : XML = ...;
The editor could be able to do some completion, could it not?
Posted by Tech Per on December 01, 2008 at 02:13 AM PST #
Thanks Per. Yes, if we had a standard way of annotating the expected Schema or DTD of the XML documents, then not only could we do a better job with code completion, but we could run semantic checks with quickfixes/warnings for errors in your XML!
So many things to do, so little time....
Posted by Tor Norbye on December 01, 2008 at 08:55 AM PST #