Archive for the ‘How-To's’ Category

IntelliJ IDEA’s Move Refactoring for ActionScript/Flex gets Smarter

Monday, January 16th, 2012

At JetBrains we not only bring you new powerful features that make your life better, but also take care to polish the good old stuff to perfection. Let’s take a look at the Move refactoring for ActionScript classes, Flex components and all other types of top-level declarations (namespaces, functions, variables and constants), that has just got a little smarter. By the way, this refactoring also works for inner declarations (also known as helpers or file-local declarations), defined in ActionScript file out of the package statement.

(more…)

Create FlexUnit Tests Quickly in IntelliJ IDEA

Wednesday, December 28th, 2011

Do you know how to navigate from a class to its test and back again or how to create a FlexUnit test quickly with IntelliJ IDEA 11? Let me tell you.

First of all make sure that flexunit.swc is within your module dependencies:

and just press Ctrl+Shift+T (Cmd+Shift+T on Mac) or select Navigate | Test from main menu:

(more…)

Some Nice/New Features of ActionScript/Flex Debugger

Tuesday, December 13th, 2011

I’d like to highlight few useful features in ActionScript/Flex debugger, some of which are new in IntelliJ IDEA 11.

Better members presentation in Variables view (informative icons, sorting) with ability to jump to source:

Convenient collections view (size, Vector status, collection elements):

Mark any object instance and this instance will be highlighted in all views if met again until the end of the debug session:

[SWF] and [UnloadSWF] messages are now filtered out by default. Toggle respective button in Debug tool window to switch the filter off:

Debug with pleasure!

New in 11: Spring 3.1 @Configuration based contexts support

Friday, December 2nd, 2011

Spring 3.1 significantly extends @Configuration based applications with a set of new annotations responsible for processing of Spring models

  • @ComponentScan configures component scanning directives for use with @Configuration classes. Provides support parallel with Spring XML’s <context:component-scan> element
  • @Import indicates one or more @Configuration classes to import. Provides functionality equivalent to the <import/> element in Spring XML.
  • @ImportResource indicates one or more resources containing bean definitions to import.
  • @PropertySource providing a convenient and declarative mechanism for adding a PropertySource to Spring Environment.
  • @Profile indicates that a component is eligible for registration when one or more specified profiles are active.
  • NavBar improvements in IntelliJ IDEA 11

    Tuesday, November 29th, 2011

    We’ve slightly redesigned Navigation Bar and added some new sweet features. Watch this short demo for the details and a general overview of NavBar abilities.

    Devoxx follow-up: your IDE can do more!

    Wednesday, November 23rd, 2011

    We’ve received lots of positive feedback at Devoxx 11 last week and met many happy users of IntelliJ IDEA. But to my surprise, many of them don’t know some little productivity features that have been there for quite a while. So, I want to just highlight a couple of them in this post.

    Restore layout

    You may sometimes find your IDE bloated with numerous tool-windows… but there is a simple way to get rid of them and rollback to pure editor. That is achieved by the following:
    1. Configure tool windows in preferred way (e.g. all tool windows are closed);
    2. Remember the layout - ‘Main menu | Window | Store Current Layout as Default’;
    3. Call ‘Restore Default Layout’ action (mapped to ‘Shift+F12′ by default) when it’s necessary to rollback the UI;

    Soft wraps

    In essence, this is the ability to show all text even when it is wider than your editor’s viewport. Use-cases: laptops, diff views, split editor, console output etc:

    IntelliJ IDEA support soft wraps starting from version 10 but the feature is significantly improved in the upcoming v.11.

    Configuring soft wraps:

    Soft wraps effect in Diffs view:

    New in 11: Git log gets more power

    Monday, November 14th, 2011

    The most exciting news for me is that now in forthcoming IntelliJ IDEA 11, we show Git revisions graph!

    Now that IntelliJ IDEA can visualize commits links, we’ve added context actions to tag a commit, create (and checkout) new branch, and checkout a selected revision.

    I want to specifically mention the highlight actions — now you can see what commits are in “ancestors subgraph” for a selected commit. By default, IntelliJ IDEA shows HEAD subgraph, i.e. you see what commits you have in your working tree now.

    It is really convenient when you are checking what commits went into some tag (or branch).

    To find any commit in git log (in already shown part), use the new “Goto Commit” action — type commit hash, or description fragment, or branch or tag name, and be navigated to it.

    And, finally — when browsing history, sometimes you work with a set of commits and need to track this set.

    Now you can mark commits by simply pressing Space and they get stared.

    New in 11: Diff Tool for Binary Files

    Thursday, November 10th, 2011

    Did you know that IntelliJ IDEA 11 Diff Tool supports some of binary contents? Now, it’s not a problem to see changes from file history or a change list. Every binary content you’re able to open in IntelliJ might be compared in Diff Tool: UML diagrams, SWF files, of course images, and much, much more.

    How to check your RegExps in IntelliJ IDEA 11?

    Friday, November 4th, 2011

    In IntelliJ IDEA 11 you can check your Regular Expressions while coding without leaving the IDE. Just invoke the ‘Check RegExp’ intention action on a regular expression and play!

    Tip: You can turn any string into a regular expression by injecting RegExp language. Try the ‘Inject Language’ intention action.

    New in 11: Javadoc editing improvements

    Thursday, October 20th, 2011

    Recently I realized that javadoc editing may be easily improved by introducing some handy little features. After using them for a couple of days, I can say they are cool, so, it’s time to share them with you. And you can try them all in the latest IntelliJ IDEA 11 EAP.

    The main idea is to ease fulfilling method javadoc stubs that IntelliJ IDEA generates for you:

    • Smart “End”
      Pressing End when the caret is located after javadoc parameter name relocates it to the position where description should start. It respects ‘Align parameters description’ code style setting as well (‘Code Style | Javadoc | Alignment’).
      Before:
      After:
    • Smart “Enter”
      We rather often need to write a multi-line javadoc parameter description. Now pressing Enter preserves previous line indent if a corresponding option is enabled (‘Editor | Smart Keys | Enter | Smart indent’).
      Before:

      After:
    • Smart complete statement
      Corresponding support is added for smart complete statement (Ctrl+Shift+Enter by default).
      Before:

      After: