Looks like the new Spaces feature in Leopard doesn’t work with some Java apps, including IntelliJ. Specifically, you can drag the window to various spaces, but when you click on the icon in the dock, the screen doesn’t automatically navigate to the correct space.
My guess is that this has to do with the way IntelliJ creates the Swing-based windows it displays. Spaces probably is keying in on some hidden window and so it doesn’t know where it should take you.
On the other hand, most apps properly support spaces just fine, even when multiple windows are open in different spaces. For example, Safari windows in two different spaces will simply cause spaces to alternate between the two windows every time you click on the Safari icon in the doc.
Here’s to hoping Jetbrains fixes this soon…