Archive for August, 2009

Maven-like Classpath in Maia

Monday, August 31st, 2009

Starting next Maia EAP, classpath for Maven-based projects will be built following Maven rules.
Also, IntelliJ IDEA will natively support compile, test and run-time dependency scopes.

For more information see Maven Dependency Mechanism documentation.

Improved Linking of Perforce Jobs

Thursday, August 27th, 2009

In the upcoming Maia EAP you will find a slightly different Commit Changes dialog.

  • Automatic use of JobView filter on search results.
  • Support for Perforce native search query syntax (in an example below we’re looking for Job in any field)

search result

Maven 2.2 Support

Thursday, August 27th, 2009

Next Maia EAP includes fully integrated Maven 2.2 support:

  • Parallel dependency resolution
  • Import dependency scope
  • And more.

Code Completion in Android XML Files

Thursday, August 27th, 2009

Maia provides code completion for AndroidManifest.xml and other XML resource files:

  • AndroidManifest.xml file:

  • Other XML resource files:

  • For any Android XML file you also get completion of references to local and system resources:

Developing Android Applications in Maia

Wednesday, August 26th, 2009

Maia supports development of applications for Android operating system. To begin creating an Android application, open the File menu, click New Project, click Next, and then select Android Module type:

Now you need to create Android SDK — just specify its location folder and build target. IntelliJ IDEA will create a new global library for it (to which you can later attach sources or javadoc for better coding assistance).

For that you can either click View Classpath in the Android Facet configuration (which is automatically added to your module) or edit it just as any other library. Note that Android sources and javadoc are added automatically if they are located in default locations: <sdk dir>/src and <target dir>/src for source code and <sdk dir>/docs/reference and <target dir>/docs/reference for javadoc.

You can create Activities, Services, Broadcast Receivers and Remote Interfaces (AIDL files) from popup menu (Alt+Insert). IntelliJ IDEA automatically registers them in an AndroidManifest.xml file and provides syntax highlighting for AIDL code.

To create a new Android Resource, select the res folder (or any of its specific child folders) and press Alt+Insert:

To launch an Android application you can either use an Android run configuration (created automatically when Create ‘Hello, World!’ project option is selected in Android Facet settings), or just press Ctrl+Shift+F10:

You can use external JARs in your application by just adding dependencies via Project Structure dialog, Ctrl+Shift+Alt+S. Java module dependencies can be added in a similar way.

Gradle Support

Friday, August 21st, 2009

The latest Maia EAP features lightweight support for Gradle build framework. You can add Gradle library to a Groovy facet:

You can also run Gradle scripts via Ctrl+Shift+F10 in a script file:

Importing Flexmojos Projects to IntelliJ IDEA 8.1.3

Monday, August 17th, 2009

IntelliJ IDEA 8.1.3 includes initial support for importing Flex projects that are set up using Flexmojos Maven plugin.

To start the import we need to have a compilable Flexmojos project that generates Flex compiler configuration file during compilation. Let’s take a Flexmojos application sample from the book Maven: The Definitive Guide, chapter 17 Developing with Flexmojos,  section 17.3.2. Creating a Flex Application.

(more…)

Original IntelliJ Cast

Friday, August 14th, 2009

Let’s talk about type casts — those things you hardly can avoid in JVM-based code. Being a helpful IDE, IntelliJ IDEA now does all the casting stuff for you when you are using its code completion in Java and Groovy.

To get you started, have a look at this Groovy example. In a dynamic language there’s almost no need in type casting at all — you just invoke any method on any object and hope it won’t fail. IDE can help you here, suggesting a list of acceptable choices based on preceding type checks:

In Java, there’s always a need in explicit casting. It’s easy of course, when you know the type to cast expression to. Smart completion after opening parenthesis has been able to do this for ages:

Imagine you’ve just checked an expression type via instanceof and now you want to invoke a method on the cast expression. Quite a natural wish, isn’t it? A week ago you had to write a cast manually, use a light bulb intention action or inst live template. Now you just invoke code completion after the cast expression and it suggests the members of the cast type. A lot simpler, right? Of course, the cast will be inserted automatically:

This works for both basic (Ctrl+Space) and smart completion (Ctrl+Shift+Space). I’ve been using this feature for 2 days now and I already can’t understand how could I survive without it through all the previous years.

Impressed already? But, there’s more. Say you’ve just checked that a certain expression has certain type. Then, you may want to cast that expression and assign the result to a variable, or pass it to a method. All you need is smart completion:

Moreover, as you know, IntelliJ IDEA has second smart completion feature. It’s now also aware of the run-time type checks that you made. After such a check you can perform cast and method invocation in a single action! Well, actually, you have to press Ctrl+Shift+Space two times, but that still counts:

Enjoy!

Web IDE — IntelliJ IDEA for HTML and PHP Developers

Wednesday, August 12th, 2009

Using IntelliJ IDEA on a daily basis, we’ve got used to its smartness while coding, and not only in Java, but also in XML, JavaScript, HTML, CSS, whatever, even in plain text. But there are SO many of our colleagues out there who do not know how great this feels when you’re developing with pleasure. Why? Many reasons, like doing only PHP development, for instance.

Earlier this year JetBrains released its first specialized Ruby on Rails IDE built on top of the IntelliJ platform. RubyMine’s been a huge success and still going strong! But the funny fact is that developers buy it just to use its JavaScript and HTML editors. I kid you not!

Now, please welcome the new specialized IDE built on the IntelliJ platform: JetBrains Web IDE. (The name isn’t final yet.)

JetBrains Web IDE inherits all the functionality of the latest IntelliJ IDEA (MAIA) for editing HTML, CSS, JavaScript, XML, working with VCS, SQL and more, plus adds advanced PHP support and other tools specific to web development.

Web IDE 1.0 will be available in Q4 2009 in 2 editions: Standard Edition and PHP Developer Edition.

Subscribe to newsletter to receive Web IDE announcements and special offers.

To read more about JetBrains Web IDE and participate in the Early Access Program, visit the Web IDE EAP page.

Naturally, all PHP-related features will be available for IntelliJ IDEA users.

Spring Security 3.0 in Maia

Tuesday, August 11th, 2009

Upcoming IntelliJ IDEA version, Maia brings you initial support for Spring Security 3.0, that includes:

  • Code completion

  • Formatting, syntax and error highlighting
  • Advanced usage search