New File templates (based on freemarker) in Other, Web and Ruby Categories.
Press Ctrl-R on a local variable and you can instantly rename the symbol synchronously
Find Usages and Rename, across multiple files.
Lots of semantic checks are performed on the code and offered as quickfixes. Some things to try:
The assignment-in-conditional error in particular has several quickfixes associated with it; converting to an == expression, and adding double parentheses to turn off the warning.
The background parser and the warning quickfixes are integrated with the tasklist, so you can open it to view errors in any of your files that are associated with JavaScript.
Code completion knows about builtin JavaScript core classes. For example, you can do a
x = "foo";
y = x;
y.
and code completion will show you methods available fo JavaScript strings. This works with all the literal types in JavaScript. The type analysis and code completion machinery also knows about prototype style classes, regular functions obviously, and the new operator for constructing them. However, in this build a number of things are broken so don't try to test this too much.
Works both for local variables as well as functions - but like code completion is a bit shaky at the moment. When the IDE is not sure about the type of your variable (and therefore the target function) it will offer you a popup to disambiguate:
Code completion shows documentation for both the core javascript APIs as well as the DOM APIs. It also works for documentation on your own functions. Ctrl-pointing at calls also shows documentation (as a tooltip).
Code completion on element ids in the html should work for the Prototype.js dollar function. In other words, if you have $("f|"), then code completion should show all HTML element ids in the document that start with f and so on.
The browser support for various API calls are stored in the index. (In this build, this database is incomplete; for an example of this try completing element.hasAttribute - it is not supported on internet explorer and the browser compatilibity icons should show so. In addition, there is a Target Browser dialog in the Tools menu which lets you choose which browsers you want to support, and the strikethrough in code completion is based on the delta between what's supported and what you're trying to support.
JavaScript embedded in RHTML files should work. (This doesn't work yet in HTML or JSP files). All functionality described above should work just as it does in JavaScript files. Note: you may get "expected VALUE" parsererrors - these are coming from the Schliemann HTML support. Some more complicated embedding scenarios should work.
Ctrl-O will let you jump to any of your methods quickly (across files). NOTE - this is buggy at the moment!!!
Quickfix showing calls to unsupported functions (not supported on all browsers you're targeting):
More information on one of these quickfixes:
Detection of incorrect documentation for functions:
Code completion on prototype $$ functions and jQuery $ functions:
The above screenshot showed tag completion; here we're continuing into id completion:
And CSS selection completion:
In NetBeans 6.0 JavaScript support is standard part of NetBeans Core IDE. Our JavaScript editing support is based on Generic Languages Support.
Links:
| browser.png | ![]() |
88374 bytes |
| browsers.png | ![]() |
42467 bytes |
| cc-css.png | ![]() |
103120 bytes |
| cc-id.png | ![]() |
54652 bytes |
| cc-tags.png | ![]() |
67696 bytes |
| completion.png | ![]() |
98849 bytes |
| dollar-completion2.png | ![]() |
53536 bytes |
| exits.png | ![]() |
29827 bytes |
| findusages.png | ![]() |
52500 bytes |
| gotodecl.png | ![]() |
27332 bytes |
| navigator.png | ![]() |
37832 bytes |
| nosideeffects.png | ![]() |
19947 bytes |
| opentype.png | ![]() |
51944 bytes |
| quickfix.png | ![]() |
39979 bytes |
| rename.png | ![]() |
82118 bytes |
| returns.png | ![]() |
38201 bytes |
| semantic.png | ![]() |
19243 bytes |
| tasklist.png | ![]() |
70140 bytes |
| unsupported-calls.png | ![]() |
31874 bytes |
| unsupported-calls2.png | ![]() |
37595 bytes |
| wrong-docs.png | ![]() |
23808 bytes |