Archive for August, 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)
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:
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.
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.
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:
Now, please welcome the new specialized IDE built on the IntelliJ platform: JetBrains Web IDE. (The name isn’t final yet.)
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.