Dart support in WebStorm 6

As you know WebStorm 6 includes Dart language support out of the box. Let’s spend a couple of minutes and go through supported features.

Note: You can install the Dart plugin both in WebStorm 5 and IntelliJ IDEA 12.

First of all we need to configure Dart SDK in WebStorm 6. This screencast shows how easy you can do it.

The IDE understands the latest Dart syntax and automatically provides a proper code completion for classes, functions, variables and even files paths.

Also you get great tools to observe code. You can easily navigate to a class with Goto Class Name action (Ctrl+N / Cmd – N) or use Goto Symbol action (Ctrl+Alt+Shift+N / Cmd-Alt-Shift-N) to navigate to methods or global functions/variables. With Quick Definition action (Ctrl+Shift+I / Cmd-Shift-I) these two actions become extremely powerful.

Note: Quick Definition action works with any usage.

To observe the structure of the current file just open Structure window or use File Structure action (Ctrl+F12 / Cmd-F12).

When you use Find Usages action (Alt+F7) results are grouped by the context.

Use Goto Implementation action (Ctrl+Alt+B / Cmd-Alt-B) to navigate to the implementation of the particular class, interface or method.

Or use Goto Super action (Ctrl+U / Cmd-U) to navigate to a super class or method.

Note: Quick Definition action (Ctrl+Shift+I / Cmd-Shift-I) works here too.

Now lets check features that will help you to edit your code and keep it clean. First of all the IDE uses Dart analyzer from the SDK to validate your code and suggests you quick fixes.

Automatic refactorings will make you super productive:

  • inplace rename (Shift+F6);
  • move file;
  • extract method (Ctrl+Shift+M / Cmd-Shift-M);
  • introduce variable (Ctrl+Shift+V / Cmd-Shift-V).

Generate actions (Alt+Insert / Control-N) will make coding even more fast:

To keep your code nicely formatted according to the Dart coding style you can use the built-in formatter.

The IDE also helps you to installing and updating pub dependencies.

And translate your Dart application to JavaScript.

The IDE provides a powerful debugger for both client and command-line applications.

Also of course there is Dart unittest support.

This is all for now, you can try all these features in the latest WebStorm 6 EAP.

As always, your suggestions and feedback are very much appreciated in our issue tracker.

Create modern web apps with pleasure!
– JetBrains WebStorm Team

This entry was posted in Cool Feature, Screencast and tagged , . Bookmark the permalink.

19 Responses to Dart support in WebStorm 6

  1. F_Z_14 says:

    Make a similar post for TypeScript, please

  2. Thor Adam says:

    Awesome, now do TypeScript *5*

  3. adam says:

    Does WebStorm support launching from a local address instead of from the filesystem? This will cause issues with trying to launch webgl applications.

  4. Richard Hobson says:

    So does this shift to splitting webstorm and phpStorm posts with different content mean these two platforms are splitting away from each other? or are all the webstorm features going to be migrating into the phpStorm core still?

    • Richard Hobson says:

      Anyone? I’m curious are things like Dart support and Typescript going to continue to be in phpStorm or are we looking at a feature split that goes beyond everything being the same but phpStorm has php stuff as well?

      • ksafonov says:

        All WebStorm functionality will be available (either bundled or as free plugins) for PhpStorm and IntelliJ IDEA.

  5. Kai Sellgren says:

    I noticed that the toolbar button does not appear unless you have also NodeJS plugin enabled.

  6. Mike says:

    Do you support web ui with it’s template auto-build like the Dart Editor does?
    BTW I already tried IDEA 12 with the Dart-Plugin because this in combination with the better Java compiler would be the perfect environment but I was not able to setup the Dart-Plugin. I configured the sdk like you showed it in your first video but now it brings up an error which says “Do not know how to load ‘dart:html'”. Debugging is not possible because it finds no connection to Chromium but I have configured Chromium instead of Chrome. If it’s so complicated to configure a working environment in IDEA then I’ll better stay with Eclipse and hope that IDEA 13 is easier…

    • Fedor Korotkov says:

      We are working on even better auto-build feature. Could you please fill bugs about your problems? There are a few known usability problems that will be fixed in the next versions of the plugin.

  7. Kise says:

    why dont use add this requested future from (2 years ago)? is it not worth it ??


  8. Kai Sellgren says:

    There are some sneaky tricks you may need to do… to debug command line apps, I had to enable JavaScript Debugger plugin, and to see Dart support at all, I had to enable NodeJS plugin.

    I’m not saying it’s a problem, but took a while to figure it out. :P

  9. Bob Miner says:

    What is the proper configuration for Dart projects in WebStorm? When I open the Dart SDK samples with the latest WebStorm 6 EAP, all I see for configuration types in the Run/Debug Configurations dialog are DartUnit, some Javascript and Node.js configurations. Using DartUnit doesn’t work for a non-test Dart project. Thanks.

  10. Sachin Dole says:

    How do I integrate a dart web app into maven?

Leave a Reply

Your email address will not be published. Required fields are marked *