ajaxorg/cloud9 — pull request #1903 by lennartcl (2012-07-09 10:45:04+00:00)
Title: Add static checks for bad 'this' and 'new require()'

This adds warnings if you do `new require()` or if you use `this` in an event handler like so:

````
ide.addEventListener("onChange", function(e) {
this.onChange(e);
});
````

For this last check, it uses the same way of detecting event handlers as the outline view; it's a heuristic. It also reports the warning in ES' `forEach` and `map`. It would be nice to warn about `this` in other contexts too, but then we'd need more metadata.