This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Hy, In a situation like this: var global = 10; function f(global){ } 'var global' is a global variable that loses the green color highlighting due to the function parameter by the same name. The problem seems to be in javascript.editing/src/org/netbeans/modules/javascript/editing/VariableVisitor.java See the attached patch which fixes this bug. Global variable handling isn't quite perfect there and I've noticed a TODO from Tor "// TODO - track global assignments separately from", etc. but this small patch does get rid of this particular issue. Please note that the patch is a mercurial bundle with my changeset -- I'm curious if it can be imported as-is. If not, I can also upload the patch file.
Created attachment 104205 [details] Patch which fixes the issue (as mercurial bundle file, against the main repository) I've marked the content type as application/octet-stream. There doesn't seem to be a mimetype for mercurial bundles and checking 'patch' might wrongly assume it's a text file.
Created attachment 104736 [details] Standard patch file (has the same fix as the bundle).
Hi emi, thanks a lot for providing the patch. Finally the javascript editor was rewritten from scratch so I can't apply it any more. Anyway issue you mentioned is already resolved in the new javascript model, so it should work well to you now. Thanks again for contribution and feel free to test new javascript in our latest development builds: http://bits.netbeans.org/download/trunk/nightly/latest/ Thanks...