Author Archive

Editing HTML Inside of JS Literals

Thursday, December 3rd, 2009

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 :)

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!

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!

Code Inspections for Web Applications

Thursday, September 17th, 2009

If you ever coded a Web project, you know that all the errors in those HTML / JavaScript files are detected only during run time. Starting next build IntelliJ IDEA 9 (Maia) will help you to spot the problems much earlier. Just invoke Inspect code action from the Analyze menu on the necessary files.
(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

Helping You with JavaScript Expressions in CSS

Tuesday, June 2nd, 2009

As you may already know, Internet Explorer supports a technique of inserting JavaScript snippets into css expressions. In case you need to edit such code, IntelliJ IDEA 9 will be happy to assist you with completion and highlighting!