Over a year ago, I remember watching one of DevExpress evangelists previewing or at least promoting rich Javascript refactoring (beyond just limited intellisense) within the
The problem with something like Javascript Intellisense is that it really needs to have supernatural powers in order to have any clue about what a piece of code means. Like here, in this function fragment:
return function(a) {
var x = a.
Now I've just typed that "." after "a", and I hit "tab" for auto-complete. What is an IDE to do?
In some limited cases, you can make some OK guesses; like, the editor can make some assumptions if you've told it you're using jQuery for example, and it sees
$('something').
well it's a decent guess that completing with jQuery APIs is the right thing to do. That's never going to be much better than a guess, however. Even with that jQuery example, the editor is still going to be stuck with some hard problems:
$('something').each(function(_, element) {
if (element.
After that ".", what should auto-complete show me? Well, a super-smarty editor might be willing to go out on a limb and assume that the "element" is a DOM node, but it'd have to be paranormal to know what kind of DOM node.
Now, another thing one could do would be to enable some sort of comprehensive hinting system, such that the programmer could explicitly tell the editor what's what. That'd take a little bit of the soul out of Javascript for me, but I guess some people might find it useful.
CodeRush supports fifty-two JavaScript refactorings:
And eight consume-first declaration and quick fix features:
Also, we're working to improve our refactoring support for the 10.2 release. We've also recently improved Quick Nav to make navigating to JavaScript functions as easy as navigation in C# or VB. This improvement will ship in 10.2 but is available now for CodeRush customers in a daily build.
Full Disclosure -- I lead the CodeRush team at DevExpress.
JS has only recently become a serious heavy-weight development language for applications. Java by contrast has been used by big rich corporations many years, giving companies and open-source projects alike much longer to invest money/time in building tools.
Building decent software takes a long time.