Showing posts with label intellij. Show all posts
Showing posts with label intellij. Show all posts

Monday, January 28, 2008

Memory Settings for IntelliJ

By default IntelliJ is setup to use a maximum of 192 MB of heap. The JVM memory settings are as follows:

-Xms16m -Xmx192m -XX:MaxPermSize=92m

I have found this to be almost always too low, systematically resulting in OutOfMemoryError. So every time I install a new version of IntelliJ, the first thing I do it to change this setting with:

-Xms16m -Xmx392m -XX:MaxPermSize=92m

If you are on a Mac, you can do this by editing the following file* and searching for -Xms in the file:

/Applications/Selena-7670.app/Contents/Info.plist

* Replace Selena-7670 with the name of your the IntelliJ executable, which, if you are using regular releases instead of EAP builds, will look more like IntelliJ IDEA 7.0.

Friday, January 25, 2008

Reformat XML with XML Spy

If you wouldn't think of IntelliJ when looking for an XML editor, think again: IntelliJ is a great XML editor. As a matter of fact, it has been my XML editor of choice many year now.

But I have to admit: IntelliJ isn't perfect; in particular, it is very slow at reformatting XML on large files. Say you have a document that weighs a few MB and you want to reformat it to make it more readable. This happens to me frequently when dealing with XML generated by Microsoft Word, which likes to put pretty much everything on a single line. Going through a few MB of XML all in one single line not what I would describe as an enjoyable experience. So here is the trick:

  1. Open your large XML file in XML Spy, reformat it, and save it.
  2. Open the newly formatted file in IntelliJ (or your favorite editor).
XML Spy is able to reformat large XML files in a breeze. So refreshing!

Wednesday, December 12, 2007

IntelliJ: Showing Unversioned Files

Q: With IntelliJ, how do you know what are the files you have on your disk, but that are not checked in your Subversion repository?

A: Simple, go the menu Windows, Tool Windows, Changes. In the Changes window, make sure you are looking at the Local tab. There you will have the list of the files you have on disk, but that are not checked in. You can see this as a flat list, or organized by directory, as shown in this screenshot.

Monday, December 03, 2007

URIs Validation in IntelliJ

IntelliJ checks that URI in your XML files are valid. This is a nice feature, except in those cases where you know a URI is valid, but IntelliJ think it isn't and reports an error. For instance, IntelliJ wouldn't know about URIs such as oxf:/apps/myapp/myfile.xml we are using in Orbeon Forms.

Starting with 7.0.2, you can tell IntelliJ to ignore specific URIs you know to be valid:

A preview of 7.0.2 was released just a few days ago, and you can download it from their EAP site. If you are on 7.0.1, you will also get a good number of bug fixes.

Monday, November 12, 2007

Can't switch betweens files in IntelliJ with Leopard

I still haven't upgraded to Leopard. Call this prudence. So far the reports I have read have been mostly positive. Many were disappointed to see that Leopard didn't ship with Java 6, but it looks at least like Java 5 is running pretty well on Leopard.

With one exception: in some cases (all cases?), you can't switch between multiple files you have open in IntelliJ. This unfortunately is a major issue. One workaround is not to use the Mac OS X look & feel. I am not sure if this is a complete blocker for an upgrade to Leopard, but I will sure wait a little longer and see what happens with this one.

Update Nov 13, 2007: Great news: Dmitry mentioned in a comment that this issue should now be fixed in the 7.0.2 EAP build. Thank you Dmitry. For sure, those IntelliJ guys aren't sleeping!

Thursday, October 18, 2007

IntelliJ Plugins

JetBrain released IntelliJ 7. I upgraded, and in the process had to reinstall some of the plugins I have been using in the past. Here are the plugins that I find the most useful:

  • Auto-Format Text - Adds to IntelliJ the ability to reformat text. This is particularly useful when editing Javadoc comments or files with free text paragraphs (like text files or XML document). (Sorry for the shameless plug: I wrote this one years ago, and still find it very useful.)
  • DragNDrop - This plugin will allow a user to drag and drop files into the main pane of IntelliJ.
  • Axis TCP Monitor - Monitor your HTTP connections and check exactly what is going through the wire.
  • TabSwitch - Lets you switch between buffers with ctrl-tab, in the same way you would switch between applications with alt-tab.

Saturday, April 10, 2004

Features we need in Eclipse


  • Ability to define shortcuts to activate views, e.g. the Navigator view

  • Ability to define shortcut for contextual menu (right click) actions, including actions contributed by plugins

  • Highlight occurence of a given text in file (IntelliJ's "Highlight usages in file"). For instance here the word "XML" is highlighted this way in IntelliJ:



  • Completely remove the toolbar - who needs a toolbar? ;)

  • Option to show the complete full path of currently edited file in Eclipse window title

  • Editor: copy and cut work as if the current line was selected when nothing is selected

  • Editor: action to duplicate selection

  • Automatic "save all" when swtiching to another application

  • Mouse wheel does not scroll window under cursor but active window

  • IntelliJ's live templates

  • Every time the Search dialog is opened, it seems to go to the same tab (XPath search, as I have XML Buddy installed). I would like it to go the last tab I used. (Could this problem be caused by XML Buddy?)

  • All the log4j plugins I got a chance to try seems to be broken under M8. What's the deal?



Issues or questions with solutions:


  • The shape of the caret is, well, original (see on the right). Solution: This is because the editor is in "smart insert" mode.