January 28th, 2010 by Alexander Doroshko
Writing JavaScript/ActionScript/Flex code becomes easier with upcoming IntelliJ IDEA 9.0.2. New set of live templates (see Settings dialog (Ctrl+Alt+S), Live Templates, JavaScript/ActionScript group), allows to avoid tedious typing when you need to loop over an Array, Vector or anything else. Luckily, some abbreviations are the same as with Java: iter, itar, ritar. Here’s the list of currently available live templates:
| Abbreviation |
Description |
| iter |
Iterate (for each..in) |
| itin |
Iterate (for..in) |
| itar |
Iterate elements of array |
| ritar |
Iterate elements of array in reverse order |
Read the rest of this entry »
Tags: actionscript, Flex, javascript, Live Templates, maia
Posted in FYI | 2 Comments »
January 26th, 2010 by Nikolay Chashnikov
The first IntelliJ IDEA 9.0.2 EAP build will add support for UiBinder, new functionality introduced in GWT 2.0. IntelliJ IDEA will understand tags and attributes in ui.xml files:
Inconsistencies between ui.xml file and associated Java class will be highlighted:
You can jump from field to the corresponding tag by using icon on the gutter:
Also IDE provides actions to quickly create new ui.xml file with associated Java class (in Edit | New | Google Web Toolkit menu) and to generate @UiHandler method (in Code | Generate menu).
Expect new version EAP to be published shortly.
Tags: GWT, maia, UiBinder
Posted in How-To's, In Development | No Comments »
January 25th, 2010 by Kirill Kalishev
Since IntelliJ IDEA is so much loved by keyboard addicts, here is a tiny yet helpful feature introduced in version 9.0.2: you can change size of a tool window by means of your keyboard.
Say, you’re doing “find usages”, the tool window is popping up and it’s too small for you to comfortably look at the usages tree. Now you don’t have to grab a mouse to stretch it up, just hit Ctrl-Shift-Up (Meta-Shift-Up for Mac users) and your tool window is getting bigger.
So, if you need to resize a tool window: focus it (by Alt-number or Ctrl-Tab) and then use Ctrl-Shift plus an arrow key that points to the direction you want.

You can also use these arrow shortcuts to resize dialogs and actually any window that IntelliJ IDEA shows. Say, you opened the project structure dialog and it’s too narrow for you. Use Ctrl-Shift-Right and Ctrl-Shift-Down to make it bigger.
Tags: maia, user interface
Posted in How-To's, In Development | 11 Comments »
January 19th, 2010 by yole
IntelliJ IDEA 9.0.1, the first bugfix update for IntelliJ IDEA 9, is now available. With almost 200 resolved issues in such areas as Flex support, version control integration, Groovy support and others, it’s a strongly recommended upgrade for all users of both Ultimate and Community editions of IntelliJ IDEA 9.
Download IntelliJ IDEA 9.0.1 now, and check the release notes for the new update.
Tags: maia, Release
Posted in News & Events | No Comments »
January 18th, 2010 by Alexander Doroshko
If you are working with Flexmojos Maven projects in IntelliJ IDEA 9, and have imported Flexmojos project as described in this post, and are planning to debug your application and browse through Flex SDK sources, this post is a must-read for you. Inside you will find details on how to configure IntelliJ IDEA so that it properly recognizes SDK sources and their ASdocs.
Read the rest of this entry »
Tags: Flex, flexmojos, maia, Maven
Posted in How-To's | No Comments »
December 22nd, 2009 by Peter Gromov
Sometimes I find myself writing repetitive code constructs without being able to extract common code due to Java syntax hmm… let’s call them peculiarities. ‘Sounds like a job for a live template’, I think, and I simply create it. Here’s how. The documentation has it too, but a good example never hurts.
Let’s suppose you have read/write synchronization in your project, and from time to time you need to wrap a bunch of statements in, say, a read action. This involves putting them into a Runnable and giving the latter to some runReadAction method. Do you still do this manually? You don’t need to, IntelliJ IDEA will help you!
First, find an existing code which already invokes the read action and select it:

Go to Tools menu and choose Save as Live Template there:

You’ll see a typical Edit Live Template dialog with the text you’ve selected. Note that all the class references are qualified there and Shorten FQ names checkbox is on, so the mentioned classes will remain the same no matter where you choose to insert it.

What we want to keep is the external syntax: the method call and the runnable. So remove everything inside the run() method braces and replace it with a $SELECTION$ on a single line. It means that you may select something and it’ll be wrapped in this particular construct.
Enter some abbreviation to easily invoke it each time, and some description (optional, but useful). Finally, the formatting looks not quite pretty, so turn on the Reformat according to style checkbox.

That’s all! Click OK and start using it. Find a fragment you want to wrap into a read-action, select it and invoke Surround With… action (Ctrl+Alt+T). You’ll see the read action template in the list:

Select it and the read action is in there:

Tags: java, Live Templates, surround with
Posted in Tips & Tricks | 1 Comment »
December 11th, 2009 by ksafonov
If you read our recent posts on ActionScript/Flex refactorings, you might have noticed that UML diagramming in freshly released IntelliJ IDEA 9 works not only for Java. That’s right, you can use it to analyze your ActionScript and Flex classes.
Read the rest of this entry »
Tags: actionscript, Flex, UML
Posted in FYI | 7 Comments »
December 8th, 2009 by Ann Oreshnikova
IntelliJ IDEA 9 is finally out, bringing you lots of goodies across the board!
If you haven’t followed the EAP (Early Access Program) or missed the Beta release, here is a quick summary of the key new features and improvements in this release:
- Two editions: Community Edition, free and open-source, and Ultimate Edition, encompassing 100% of the famous IntelliJ IDEA functionality
- Much faster environment, with background indexing on startup
- Extensive Java EE 6 support
- Many productivity features in core Java functionality
- Best-of-breed PHP support, with dedicated debugger, PHPUnit, etc.
- Visual editor for defining the structure of project deliverables (.war, .ear archives, etc.)
- AIR support, ActionScript refactorings, and other Flex support improvements
- And lots more!
Read more about what’s new and download a free 30-day trial today.
Buy or upgrade to IntelliJ IDEA 9 right now.
Oh, and did you happen to buy your IntelliJ IDEA 8 license on or after October 1, 2009? If so, download v9 and upgrade right now — for free!
Start enjoying this latest and greatest IntelliJ IDEA every day — like we do!
— IntelliJ IDEA Team
Tags: IntelliJ IDEA, Java EE 6, Release
Posted in News & Events | 8 Comments »
December 3rd, 2009 by nicity
It often happens that we need to edit HTML code inside JavaScript literals. With Maia this is at last possible, and even with pleasure!

Completion, quick documentation, and navigation for HTML, CSS and even JavaScript inside JavaScript literals is at your service
Tags: css, html, javascript, maia
Posted in FYI, In Development | 2 Comments »
December 2nd, 2009 by Eugene Kudelevsky
Editing CSS files in Flex applications becomes easier with the help of some new Maia features.
First, completion for CSS selectors, properties, and property values. For example, if you press Ctrl+Space in this context, you get all class names from
a default namespace http://www.adobe.com/2006/mxml + global selector:

If a CSS property has a color format, IntelliJ IDEA helps you to select a color:

You can look up documentation for default Flex CSS selectors and properties. Just press Ctrl+Q in editor or completion pop-up window:

You may easily navigate from CSS properties and selectors to their declarations in ActionScript. All you need is to press Ctrl+B. Note that if there are several declarations to navigate, you will see a pop-up list.

Also, IntelliJ IDEA provides validation of CSS selectors and properties:

Note that these features are available only in CSS and MXML files under a Flex module, or module with a Flex facet.
Tags: css, Flex, maia
Posted in In Development | 2 Comments »