JetBrains at JavaOne

May 5th, 2008

Just a quick note before we run from the office to pack our bags —

If you’re keen on meeting some of the people responsible for IntelliJ IDEA and TeamCity, come visit us at the JetBrains booth at JavaOne — booth #1312.

Hope to see you there!

You might also get an invitation for the JetBrains party to be held Thursday evening ;-)

Dave

Posted by Dave Booth

JetBrains Development Academy To Serve the Community

April 30th, 2008

You might have already heard about the brand new JetBrains Development Academy. Launched in April 2008, the Academy fosters a community of experts and evangelists to champion best development practices and promote software innovation worldwide.


The JetBrains Development Academy serves as a connection point for developers who strive to adopt top methodologies and use JetBrains products to help them achieve that goal. It plans to provide support for Java and .NET user groups, support educational institutions, conduct in-place presentations, publish articles on the Academy’s website, and help users learn about popular and innovative technologies. These benefits will be provided courtesy of the Academy members, who are recognized experts representing various areas of software development.


The Academy website also features a Q&A section, where you can ask questions, get answers and gain valuable insight into the technologies, products and best practices relevant in today’s world of software development.

Posted by Ann Oreshnikova

Type Renderers

April 21st, 2008

While developing any application, you most probably debug it, and I bet my bottom dollar, making this process a little bit easier and faster would not be out of place.
In this post, I’d like to tell you about one of the IntelliJ IDEA features — type renderers. They provide you the ability to customize how objects are displayed in the debugger, offering “logic-oriented” presentation of data vs. structure-oriented as it is by default, and thus improving the readability of the Debug tool window. Let’s see how it works.

To define your own type renderers, open Settings (Ctrl+Alt+S) dialog, click Debugger and select Type Renderers tab. This tab lists all the renderers you’ve defined and allows you to turn them on and off at any time using the check box next to their name. The order of the list is important. It determines which renderer is used, if more than one renderer is applicable to an object instance.

Now let’s add a new renderer. To do so click the plus button, then specify renderer name, the object class to which it applies, and which expressions to use while rendering.

Defining Type Renderer

In our example, we’ve created an expression that displays the user’s full name by accessing the first and last name properties of the object.

Also we’ve defined the appearance of the expanded node. Normally, expanding a node in the debugger lists the object’s member variables. Nevertheless, you can override that behavior. Here we’ve selected to reflect only three of the object’s properties and have used descriptive names rather than the member variable’s name.

Note: There is also a possibility to use a single expression to calculate information to be presented for the node. When expanding the node, the specified expression is evaluated and applicable renderer is picked for the resulting value. The chosen renderer is then applied to get the nodes that will be attached as children to the node that was originally rendered. We can also specify a Boolean expression to test if the node can be expanded. If it is true the renderer displays the expandable nodes for the defined objects. Otherwise, no nodes are displayed.

These expressions are helpful when you want to limit the amount of information displayed or to be more precise in how the information is presented, for example.

Rendered View

When defining expressions, feel free to use IntelliJ IDEA’s code-completion features to help you. All method calls and member variable access is relative to the object you’re rendering. Use this to refer to the instance, to which the renderer is applied.

Note: Using “heavy” expressions in renderers may slow down data rendering in views. Much as method calls should be used with caution because of possible side-effects.

One more trick: you can easily switch between applicable renderers for particular object in already built data tree with the View As option in the context menu of the Variables or Watches tab of the Debugger, even if your custom type renderer is disabled.

P.S. Type renderers are available since IntelliJ IDEA version 5.0.

Technorati tags: , ,
Posted by Maria Khalusova

Weapon of Choice for AJAX Developers

April 18th, 2008

We’re glad to announce the extended partnership with Bindows, the creators of world’s #1 AJAX framework.

With Bindows Plugin for IntellIJ JDEA you get all of its famous, smart, productivity-enhancing features, ready and available for pleasant AJAX development:

  • All sorts of coding assistance
  • Inspections, code analysis and quick-fixes
  • Numerous refactorings
  • Live templates and code generation
  • Assisted WYSIWYG GUI building
  • Automated running and deployment
  • and more.

Another good news is that when you buy a Bindows license, you become eligible to Free 6 month IntelliJ IDEA evaluation license, plus 20% off the regular IntelliJ IDEA price when you upgrade after it expires.

Watch the Bindows Plugin demo to get more familiar with the plugin and its features.

Posted by Egor Malyshev

Announcing New Release of JetGroovy Plugin

April 15th, 2008

We’re glad to announce the general availability of the new release of JetGroovy Plugin for IntelliJ IDEA.

Version 1.5 brings yet more of IntelliJ IDEA´s smart, advanced features to Groovy and Grails developers:

  • Multiple new Groovy-aware refactorings
  • Extended Groovy coding assistance with support for dynamic properties and methods
  • Groovy-ready debugger that handles mixed Java and Groovy code
  • Smart GroovyDoc browser
  • Support for automatic testing with JUnit/TestNG
  • Improved Grails coding assistance with support for JavaScript and custom tags
  • Complete support for Grails plugins

To learn more about JetGroovy, visit the Groovy and Grails feature page.

JetGroovy supports all of IntelliJ IDEA 7.0 releases, including 7.0.2 and 7.0.3. You can download the plugin from http://plugins.intellij.net/plugin/?id=1524 or via the IntelliJ IDEA Plug-in Manager.

Technorati tags: , , , ,
Posted by Egor Malyshev

Basics of Java EE and Web Development with IntelliJ IDEA

April 14th, 2008

IntelliJ IDEA provides excellent facilities for Java EE and Web development that let you easily create wide variety of applications.

To get you started with Java EE and Web development in IntelliJ IDEA, we’ve created a short and simple tutorial, showing how to create a basic Java EE application with servlets.

You can download the tutorial in PDF format and get IntelliJ IDEA a try right away. You are welcome to leave any comments, questions and suggestions in this post for discussion.

Posted by Egor Malyshev

Migrating to EJB 3 with IntelliJ IDEA is Easy

April 4th, 2008

IntelliJ IDEA has the full-blown support for Enterprise Java Beans (EJB). Supporting EJB specifications from 1.x to 3.0 and leveraging it through all of its productivity-boosting features, from coding assistance to refactoring, IntelliJ IDEA stands for the weapon of choice for developing EJB applications.

Today we’re going to see how easy it is to migrate from earlier EJB versions to the latest 3.0. For the purposes of this demonstration we have a sample project, containing a 2.1 CMP Entity Bean and a Session Bean used to access CMP bean fields.

To migrate these beans to EJB 3.0:

  1. Switch Project View to Java EE: Structure
  2. Expand the EJB Facets node
  3. Right-click EJB (in MigrationTest) and select Apply EJB 3.0 Style from the shortcut menu.

    Invoking the EJB Migration Dialog

First we’re going to change the environment access settings for the beans and resort from using the ejb-jar.xml descriptor and use the annotations instead. For that:
  1. Make sure the settings are selected according to the screenshot

    EJB Migration Dialog
  2. Click Refactor
IntelliJ IDEA automatically upgrades the code. Have a look at the screenshot below and see the difference. Note that code before migration is displayed on the left side.



IntelliJ IDEA also automatically removes descriptors that were replaced with annotations from ejb-jar.xml file.

Now, replace the CMP Entity Bean with JPA Persistence unit. For that:
  1. Invoke the migration dialog as described above
  2. Select the Replace Entity Beans with CMP to Persistence Unit
  3. Click Refactor

IntelliJ IDEA automatically creates the required JPA code and converts the existing Entity Bean. Notice that it has been removed from the project and matching JPA Persistence Unit has been created.



After that we have to manually rewrite the session bean code according to JPA specification so that it would use the Persistence Unit instead of the Entity Bean to complete migration.
Technorati tags: , ,
Posted by Egor Malyshev

IntelliJ IDEA 7.0.3: Maven Integration Improvements

April 3rd, 2008

Each new IntelliJ IDEA version brings lots of different enhancements. Maven integration is not exception to the rule, and I’d like to draw your attention to some Maven integration improvements in IntelliJ IDEA version 7.0.3, that I personally consider worth mentioning.

  • Automatic synchronization with Maven structure on startup. Now, when importing Maven projects to IntelliJ IDEA, you can specify, whether you want IntelliJ IDEA to sync with the projects on startup or not (unlike it was done in IntelliJ IDEA 7.0.2 that used temporary modules for this purpose).

    AutoSync
  • Automatic detection of facets. While importing your Maven project to IntelliJ IDEA 7.0.3, the following facets are detected automatically: Java EE, EJB, GWT, and Web. All dependencies and deployment settings are recognized and stored. If you change some facet’s build setting, or add own deployment descriptors, IntelliJ IDEA will preserve them, so they won’t be lost when synchronizing with Maven projects.
  • Selecting build profiles. If you import a Maven project to IntelliJ IDEA 7.0.3, you can specify profiles to be taken into account, thus selecting module structure and dependencies.
  • Detecting errors. If you try to import Maven project from a pom.xml file, that is somehow corrupted, IntelliJ IDEA will warn you about erroneous descriptor file.

    Building Model Error

See the release notes for other improvements and fixes, and download the free 30-day trial version.

Technorati tags: , ,
Posted by Maria Khalusova

Opening Maven Projects is Easy as Pie

March 24th, 2008

Maven integration in a Java IDE might not be a surprise for you, but let me show you just one thing, that makes IntelliJ IDEA Maven support prominent and noteworthy.

If you have any Maven project, you do not need to perform routine steps while importing it to IntelliJ IDEA and you do not need to be anxious about dependencies and artifacts in it, nor would you need to worry about technologies used in project. Just open the project as you do with usual IntelliJ IDEA projects, sit back and relax. IntelliJ IDEA will automatically recognize everything.

Here is an example. To open our Maven project, we just go to File | Open Project (Alt + F + O) and specify the path to pom.xml (the Maven project descriptor file).

Select Path dialog

IntelliJ IDEA creates a project based on the Maven Project descriptor file.
When done, all maven goals can be found in the Maven projects tool window. We can simply run/debug arbitrary Maven goals; execute them before/after make or run/debug, or by invoking an assigned keyboard shortcut. Select any Maven goal in the tree and right-click it to view options.

Run Maven Goal

Now, let’s view our project structure. Go to Settings (Ctrl + Alt + S) | Project Structure and click Modules. As you can see, IntelliJ IDEA recognized modules and web facets. Moreover, all dependencies and deployment settings were detected and stored.

Facet

That’s all, nothing but a single click and you can enjoy complete support for Maven builder, including smart coding assistance for editing Maven pom.xml, intelligent code completion, inspections and quick-fixes, refactorings and other IntelliJ IDEA productivity-boosting features, which we are going to cover in the next posts.

Technorati tags: , ,
Posted by Maria Khalusova

Opening EAP for IntelliJ IDEA 8.0

March 21st, 2008

We’re glad to announce the availability of IntelliJ IDEA 8.0 first EAP.

Some of the IntelliJ IDEA 8.0 features are now available for the first preview:

  • Flex debugger
  • Improved Flex code editor, with new inspections
  • JavaScript debugger
  • JBoss seam support, with coding assistance and dedicated visual tools
  • Support for various SQL dialects, with coding assistance and injection
  • Numerous other enhancements and new features

Download the fresh build and give a try right now.
For the complete list of the new features and improvements, check Release Notes


Enjoy! And develop with pleasure! :-)

Technorati tags: , ,
Posted by Egor Malyshev