…a look at refactoring, intellisense, navigability, and usability.
As agile software development becomes more commonplace, it becomes more and more essential that the tools we use allow us to develop software in a fast and flexible fashion. Particularly important is refactoring. Being able to refactor is what allows us to respond to change, and makes our code evolve over time.
|Object Rename|| If I rename the method methodXYZ in the method test in the below example, it should not affect the method in ObjectA.
|Rename var or param||Can I rename local variable or parameters in the scope of a method?|
|Intelligent Intellisense||Entering a ‘dot’ will bring up a pop up list of methods.If I type ‘.’ After declaring ‘v’ in the example below :
Then I want my IDE to intelligently know that methodB is an available method of v because v is an ObjectB object.
|Create Method Hint||If I type in a method that does not yet exist, I want a graphical hint or shortcut to allow the quick creation of a method stub (offering perhaps various options for scope).
I want my IDE to highlight or underline unsed code in some way to make it stand out.
|jQuery intellisense||Whenever I press ‘.’ In this scenario :
I want to have a list of all JQuery methods.
|Method Step Into||I want my IDE to know how to navigate to the methodXYZ in ObjectA, through the use of a function key or short cut key.
|Var Step Into||In the case of a simple locally scoped variable When doing the ‘step into’, I want my cursor to move to the line of the ‘var’ assignment.In the case of a variable defined with this. The Step Into should be as intelligent as possible, and try to determine where it first has been defined/instantiated.Ideally all instances of the variable should be clearly highlighted.|
|JSDoc||Does the IDE support JSDoc to some degree?|
|JSDoc Type Checking||Is it possible to do Type Checking by using JSDoc or perhaps another means? Can the IDE perform some basic error checking before sending the code to runtime?For example in the below example the call of methodXYZ in test is wrong because it is expecting an object of ‘type’ ObjectA through JSDoc markup. Can the IDE visually underline or highlight these errors in code?
|Method Encapsulation and JSDoc||Using the JSDoc @private annotation, is it possible to hide methods?Does intellisense then hide the method? Or at least indicate that it should treated as private?|
These are the results :
|Object Rename||Yes. But sometimes it doesn’t understand the context and does a string replace.||No||Yes.Weirdly does not allow a rename from the menu.||No|
|Rename var or param||Yes.||No. Seems to lack any refactoring capabilities.||yes||No|
|Create Method Hint||Webstorm :Creates in method or globally in file. Cant figure out type.||No||No. Offers ‘Surround with function’ which is almost as good.||No|
|Unreachable Code||Yes. Underlines in gray with tooltip||No||No.||No.|
|Method Step Into||Yes.Across files? = yes||No. Some code navigation, but extremely limited.||Yes.Across files? = yes||YesAcross files? = No|
|Var Step Into||Yes||No||yes||yes|
|Find Usages||Yes||No||No||No. Not apparent to me that it can.|
|Pull Out local to global variable||Webstorm: doesn’t seem to work||No||No||No|
|JSDoc Type Checking||Yes. Reasonable support||No||Yes||No.|
|Method Encapsulation and JSDoc||Yes.||No||No.||No.|
Netbeans is also pretty good, however it lacks some basic features. Why can’t I ‘find usages’ for a method, even if it is just a string search? It would help immensely. You can’t delete or change code if you don’t know where its being used. Renaming a method doesn’t seem to register across files which is a shame too.
So Webstorm comes out on top. Even though I have been using it, i was quite surprised that there isn’t anything out there to compete with it. Hopefully that will change.