Archive for February, 2008

Web Service Applications with IntelliJ IDEA

Friday, February 29th, 2008

Since version 7.0 IntelliJ IDEA provides the complete support for creating Web Service applications, providing the full range of productivity-boosting features:

  • Smart code completion
  • Syntax and error highlighting
  • Code analysis, inspections, quick-fixes and refactoring
  • Automatic code generation, including WSDL/WADL from Java and vice versa
  • Dedicated run configurations for debugging and automated deployment
  • and more


To help you get started with developing Web Service applications using IntelliJ IDEA, I’ve created a small tutorial, demonstrating how to create a simple Web Service and client application in literally few clicks. The tutorial shows how to create, deploy and use Web Service based on Apache Axis and JaxWS frameworks, with appropriate server and run configurations.
You can get it in PDF format here.

Technorati tags: , , ,

External Annotations

Friday, February 8th, 2008

If you had worked with IntelliJ IDEA for a while, you’re most likely aware of @Nullable, @NotNull annotations which allow you to formally specify method contracts and validate whether these contracts are met, and @NonNls annotation which is helpful when you want to exclude strings from the internationalization process.

However, there’re several cases when direct annotating code is not advisable: for example, project is shared between team members that use different IDEs, or you work with library classes. That does not mean you can’t make use of these annotations, though — with IntelliJ IDEA you can store annotations outside of the source code.

Let’s have a look at how it works. First, we need to open the Settings dialog (Ctrl + Alt + S) and go to Code Style (F), then check the option Use external annotations at the Code Generation tab. Now, add the annotations.jar library to either module or project. You can find it under INTELLIJ_IDEA_HOME/lib folder.

Adding annotations.jar
After that, open your current inspection profile and make sure Constant conditions& exceptions inspection is enabled and Suggest @Nullable annotation for methods that may possibly return null option is selected.

At this moment we can enjoy externally annotating methods, fields, parameters, etc. For example, we work on a module that contains a method that might return null.

Method that might return null

Let’s add annotation — just click the light bulb. IntelliJ IDEA asks whether we want to add annotation in code directly, or store it externally. Select the second option and specify the external annotation root for the current module.

Note: You only select the location for external annotations once, so each next external annotation within this module will be stored in the same folder. Alternatively, you can specify annotations root at any time: open Project Settings dialog and go to the Modules page, then select the needed module and open its Paths tab. There you can find External annotations area, where you can manage external annotations attached to the module.

Now, this method is annotated without placing anything to the source code directly. You can press Ctrl + Q to view the attached annotation.

Viewing external annotation

With external annotations you can even annotate methods within JDK classes.

Annotating JDK classes

Just like when you add external annotation on the module level, you can specify the storage location right when you add the annotation, or using Project Settings dialog. In the latter case, open Project Settings dialog, go to JDKs and specify the path in the Annotations tab.

Technorati tags: , ,

Creating Flex Applications with IntelliJ IDEA

Tuesday, February 5th, 2008

We’ve got great news for those of you who were waiting for an easier way to create rich Internet applications with Adobe Flex using IntelliJ IDEA.

Many advanced features are supported by the upcoming version 7.0.3 that is already available throught the Early Access Program (EAP):

  • Smart code completion for MXML and AS files, with cross-resolution of code symbols between them, even inside of mx:Script blocks and attribute values
  • Automatic code formatting, highlighting and styling
  • On-the-fly code validation with instant quick-fixes
  • Code insections to hunt perfomance bottlenecks, bad code practicies and other problems
  • Rich set refactorings

We’ve composed a comprehensive tutorial, for you to quickly start over.

To get your hands on IntelliJ IDEA Flex experience, you only need:

Technorati tags: , ,

Winners of IntelliJ IDEAL Plug-in Contest Announced

Friday, February 1st, 2008

Yesterday the results of JetBrains’ annual contest for the best plug-in to IntelliJ IDEA were announced. 7 plug-ins were selected by the jury composed of IntelliJ IDEA development team members. Their respective authors will take away great cash and software prizes. The names of the winners are listed on the dedicated Plug-ins Site. There you can even see a small photo-report from the conclusive meeting of the jury :-)

We would like to congratulate the winners, express our appreciation to the co-sponsors for the generous prizes, and encourage new participants to take part in the next year’s contest.

Great challenge and great benefits!