Posts Tagged ‘actionscript’

Speed up Flex Compilation!

Friday, February 26th, 2010

If you work on large projects with dozens of Flex modules (or facets) you’ll like this new feature of IntelliJ IDEA 9.0.2, which lets shorten project build time by compiling several independent Flex modules (facets) in parallel.

To enable this feature go to Settings (Ctrl+Alt+S), Compiler node and then Flex Compiler page:

Let’s have a closer look at this feature. (more…)

Live Templates in JavaScript/ActionScript/Flex

Thursday, January 28th, 2010

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

(more…)

ActionScript/Flex UML Class Diagrams in IntelliJ IDEA 9

Friday, December 11th, 2009

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.

(more…)

New ActionScript/Flex Refactoring: Push Members Down

Wednesday, November 25th, 2009

In addition to other refactorings, Maia also has this useful refactoring: push members down the classes hierarchy.

Again, let’s try it on a simple example.

(more…)

Unwrap code constructs in JavaScript / ActionScript

Wednesday, November 18th, 2009

Sometimes when you are editing JavaScript/ActionScript code, you need to remove, say, an enclosing if statement without touching a current code block.

In Maia you can just invoke Unwrap/Remove action (Control+Shift+Delete in Windows keymap), which allows to precisely select which construct to unwrap:

Voila! The edited code block is unwrapped and in place!

BTW, this handy action works in XML/HTML/JSP files, where it removes enclosing tags.

Enjoy developing with pleasure!

New ActionScript/Flex Refactoring: Pull Members Up

Wednesday, November 11th, 2009

Today we’re continuing our series of posts about new ActionScript/Flex refactorings that you can find in the latest Maia EAP, with presentation of this new aid: pull class members up the classes hierarchy.

Let’s have look at this simple example. (more…)

New ActionScript/Flex Refactoring: Move Static Members

Thursday, November 5th, 2009

Next Maia’s EAP will bring you new refactoring that helps to be more productive when coding ActionScript or Flex.

Now you can easily move static methods, properties, fields and constants between AS classes and Mxml components: just place caret on a member (or a reference to it) and hit F6 (Move action).

(more…)

Inline Variable Refactoring for JavaScript / ActionScript

Monday, September 21st, 2009

Next version of IntelliJ IDEA, code named Maia, brings you several new JavaScript and ActionScript refactorings. In this post we showcase one of them — Inline Variable, which works with local variables and ActionScript class fields.

Before Inline Variable

Pressing Control+Alt+N (default Windows keymap) replaces variable occurrences with an initializing expression.

After Inline Variable

During the inline process, IntelliJ IDEA checks if a variable can be safely replaced and warns if, for example, there are its usages inside a functional expression.

Problem detected when inlining variable

By the way, the Inline Variable refactoring also works in the left part of local variable assignment.

Enjoy developing with pleasure!

Creating a Pure ActionScript Project in Maia

Thursday, July 16th, 2009

Want to write an application in pure ActionScript without MXML and  Flex components? Maia can help you with that!

All you need is a Flex module or Flex facet with configured Flex or AIR SDK. Flex module is recommended because New Flex Module Wizard allows you to create pure ActionScript sample application in just few clicks.


(more…)

Better Regular Expression Editing in JavaScript and ActionScript

Wednesday, June 3rd, 2009

If you ever tried to understand or edit regular expression like this in JavaScript or ActionScript:
regular expression in JavaScript editor of IntelliJ IDEA 8
Then you are sure to find IntelliJ IDEA 9 a more helpful in this way. Now you can repeatedly press Ctrl+W to see non-capturing groups:
regular expression in JavaScript editor of IntelliJ IDEA 9
Plus, code completion after \ is also a bit smarter:
completion after \ in regular expression literal in JavaScript editor of IntelliJ IDEA 9