Archive for April, 2006

The Ajax Experience 2006: Ajax with pleasure!

Thursday, April 27th, 2006

Meet JetBrains at the Ajax Experience 2006, the international event for Ajax community that will take place in May 10-12th at the Westin St. Francis Hotel in San Francisco, California.
“Ajax with pleasure” presentation will be made by Mike Aizatsky, the team leader of the Web and Enterprise Development Department of IntelliJ IDEA. The presentation will demonstrate Web development functionality (JavaScript, HTML, CSS, etc.) that is already available in the IntelliJ IDEA 5.1. It will also cover features planned for the 6.0 release.
Mike will also make live IntelliJ IDEA demonstrations at the demo table, during the two conference days.
Those who want to know about Ajax support in IntelliJ IDEA right now or don’t have an opportunity to attend, may take a look at the IntelliJ IDEA’s Ajax demo.

A good Live Template for Swing developers

Monday, April 24th, 2006

A nice Live Template for Swing developers was posted at publicobject.com. The template can save you a lot of time when prototyping Swing code.
If you want to find more live templates examples, take a look at the Defining a Live Template for Null-Check post and its comments.

Technorati tags: , ,

Configuring IntelliJ IDEA VM options

Friday, April 21st, 2006

The default VM options for IntelliJ IDEA may be not optimal when your project contains more than 10000 classes and developers often try to change the default options to minimize IntelliJ IDEA hangtime. But sometimes the changes make things even worse.
So, how to configure IntelliJ IDEA VM options optimally? That’s not so easy question to answer, since the configuration strongly depends on the project being developed.
However, it is a well-known fact that JetBrains “eats its own dog food” and uses IntelliJ IDEA for development of new IntelliJ IDEA versions. Therefore, we can recommend some settings that our developers use and explain the general memory policy.

1. -Xms = 32m (64m)
2. -Xmx = 256m

Please note that very big Xmx and Xms values are not so good. In this case, GarbageCollector has to work with a big part of memory at a time and causes considerable hang-ups. On the other hand, too small values can lead to the OutOfMemory exception. The specified values provide enough memory and at the same time the GarbageCollector works often but rather fast.
One more important thing is to pay attention to the memory indicator at the bottom-right corner of IntelliJ IDEA. If it shows that the memory in use is almost equal to the total memory available (let’s say 195m out of 220m), we recommend you to increase Xmx on 50m or so.

3. -XX:MaxPermSize=92m

This is a default value, and in most cases you don’t need to change it. You may increase it only if you get “OutOfMemoryError” in “PermGen space”.

4. -server

Some people find IntelliJ IDEA more responsive with this option. But it is not guaranteed.

5.   We don’t recommend to use the following options at all, since they are not very stable:
    -XX:+UseParallelGC
    -XX:+UseAdaptiveSizePolicy
    -XX:-UseConcMarkSweepGC


Technorati tags: ,

IntelliJ IDEA in Action - discount offer extended

Thursday, April 20th, 2006

Manning Publications has announced that they will extend the introductory discount offer on “IntelliJ IDEA in Action” until May 31, 2006. For information about the special discount, visit the IntelliJ IDEA Developer Center.

To purchase the book at the special discount price, go to www.manning.com. During the checkout process be sure to enter this special discount code: JBIJ35.

If you’ve already read about the book but are still wondering “Is it reallyfor me?” you might check out this post on Romain Guy’s blog: “IntelliJ IDEA is Great!”

BTW- if you recently found broken links on our site, the book publisher has been reorganizing their site and due to time zone differences, there was some delay in us getting the new URLS. These are now linked on our site. We apologize for any problems you may have encountered trying to read about or purchase “IntelliJ IDEA in Action”, and we invite you to try again with the new links.

Technorati tags: ,

IntelliJ IDEA Open Source Licensing Program: A Year On

Monday, April 17th, 2006

About a year ago, JetBrains started a licensing program for Open Source projects. In short, developers of active and vital Open Source projects can request and get free IntelliJ IDEA licenses.
Today more than 300 Open Source projects received these licences. Among these projects there are a lot of Apache participants including members of Ant project, Geronimo, Tomcat, Tapestry, Maven and Struts projects. Other open-source projects receiving licenses include BeanShell, CruiseControl, JBoss Portal and AOP Aspect Libraries, JPublish, Jython, Open Symphony, and Spring Framework.
Almost everyday a new project enters this program. One of the participants, Glazed Lists, has published a set of screencasts that show how to use Glazed Lists API. Guess which IDE was used? Right, IntelliJ IDEA. Although the screencasts use only about 10% of IntelliJ IDEA features, they are impressive enough to make new Open Source projects enter this program.
So, if you are one of the Open Source developers, join now and develop with pleasure!

Technorati tags: ,

Analyzing Code Dependencies (part II)

Sunday, April 16th, 2006

When you have cleaned up unnecessary dependencies, you certainly don’t want them to appear again. But if you work in a team, this is very probable to happen. So, how to avoid illegal dependencies?
Of course, you can periodically analyze and clean up the code as it is described in Analyzing Code Dependencies (part I). But there is a simpler way.
For example, you need to separate UI and business layers of your application. Consider that you have the following simple project.

project_structure

In our example, the dependencies from the com.sample.businesslogic package to com.sample.ui are illegal. To specify this rule, you need to take several steps.
First, analyze dependencies for the package, and click Edit Rules in the Dependency Viewer tool window.

edit_dependency_rules

Then add a new rule to the dependency validator.

dependency_validator

Here ui and business are custom scopes. In this example, ui is defined by the following pattern:

src[testProject]:com.sample.ui.* || lib:javax.swing..*



The business scope simply includes the corresponding package:

src[testProject]:com.sample.businesslogic..*



When this rule is applied all illegal dependencies in the dependency viewer become red.

illegal_dependencies

From the viewer you can navigate to the location of the illegal dependencies. But of course it would be much better to be notified that the dependency is illegal right when you create it.
For this purpose, IntelliJ IDEA provides the “Illegal package dependencies” code inspection. When switched on, it highlights illegal dependencies in the editor.

illegal_dependencies_in_editor

Now you can easily avoid illegal dependencies by sharing project settings between the members of your team.

Note   This tip&trick was originally posted at www.javalobby.org.


Technorati tags: ,

IntelliJ IDEA congratulates Codegeist Competition winners

Friday, April 14th, 2006

Atlassian has published the results of Codegeist Competition for which JetBrains is a sponsor. In total, thirty-one new JIRA and Confluence plugins were submitted.
All winners get free IntelliJ IDEA licences. Also all participants get 40% discount coupons for IntelliJ IDEA personal licences, thanks to Alex Tkachman, our marketing director.
Our congratulations to everyone who entered the competition, and thank for all that great plugins!

Struts Assistant Plugin

Wednesday, April 12th, 2006

Those who want to work with Struts from IntelliJ IDEA can try Struts Assistant plugin. It not only adds Web flow diagrams, structure tree and property tables to IntelliJ IDEA, but also provides well-known productivity features such as completion, navigation, highlighting, and even refactorings for Struts, Tiles, and Validator files.

You can find more information about plugin it http://www.intellij.org/twiki/bin/view/Main/StrutsAssistant.



Technorati tags: ,

Analyzing Code Dependencies (part I)

Monday, April 10th, 2006

If you have a large project with several modules using a set of libraries, any operation that requires an essential structural change can be a disaster. For example, you may decide to stop using one of the libraries, or extract API, or simply extract a new module. In any of these cases, you need to analyze dependencies within your project. Well, it’s easy to say.
Let’s consider the case when you need to extract a new module and make it dependant only on API. It means that first you need to search through code and find references to resources not included into API. It may take hours of dull work.
IntelliJ IDEA’s solution is the dependency analyzer that can show you all the module dependencies in one convenient window. Furthermore, this analyzer can find not only dependencies between modules, but also between packages. It can even find dependencies of a certain class.
On the screenshot below, you can see how IntelliJ IDEA shows dependencies of a package.

dependencies

On the left panel you can see the classes of the analyzed package (com.intellij.sisyphus.ea.util), while the right panel shows all the libraries and classes on which this package depends.
But that’s only half of the way. You need not only the information about dependencies, but also the exact code that actually “establishes” this dependency (references to the class from the package, usages of the library classes, etc.)
To find all the usages of a certain package, class, or library within the analyzed code, just click the item in the right panel. For example, the following screenshot shows all the usages of the com.intellij.sisyphus.ea.lexer classes within the com.intellij.sisyphus.ea.util package.

dependencies and usages

Now having all the information about dependencies, you can process them according to your needs.

Note   This tip&trick was originally posted at www.javalobby.org.


Technorati tags: ,

IntelliJ IDEA 5.1.1 Released

Friday, April 7th, 2006

IntelliJ IDEA version 5.1.1 is now available for download at http://www.jetbrains.com/idea/download/.
This release fixes a number of bugs and addresses some performance and cosmetics issues. For more information, see online Release Notes.
The update is a free maintenance release for licensed users of IntelliJ IDEA 5.0 and 5.1.

Technorati tags: ,