Skip to main content

Fast-open IntelliJ plugin updated

Posted by kohsuke on March 20, 2008 at 10:44 PM PDT

I upgraded to IntelliJ IDEA 7.0.3 recently, and so I took some time to enhance my plugins to scratch my itches.

The "major" improvement is in the fast-open IntelliJ plugin. Being a CLI guy who hates using mouse (and since I work on so many projects), the main idea of this plugin was how to open projects in IDE efficiently.

In the earlier version, I was doing this by clipboard. First I run a shell script to send the directory/file name into clipboard, then I go to IDE and type Alt+F,F to open it. While this works nicely and indeed a tremendous time-saver over the conventional "open project" dialog, it's still a two-step process.

In the new version, the plugin listens to a TCP port and just by sending directory/file name to this port, IDEA will open the project. So I now only need to run a shell script and boom, IDEA is ready to work!

I also enhanced the plugin so that it can properly open pom.xml. The plugin can be installed from IDEA's plugin center.

Related Topics >>

Comments

@spullara: Yeah, 'open [project name].ipr' works but only if you don't yet have IJ open. If you already have an instance of IJ open and you type 'open [project name].ipr' you'll get an error message saying 'Only one instance of IJ can be run at a time'. From the sound of it, I believe Kohsuke's plugin provides the capability to quickly open projects from the command line within a single instance already running.

On the Mac you can just 'open [project name].ipr' ... I'd be surprised if you can't 'start' it on windows.

Ouch. I'll see if I can recompile.

Sounds like a nice plugin. I'm getting this error after installation though:

I'm using IJ 7.0.3 on Mac OS X 10.5.2 with JDK 1.6 dp 9

Bad version number in .class file [Plugin: Fast Project Open plugin] com.intellij.diagnostic.PluginException: Bad version number in .class file [Plugin: Fast Project Open plugin] at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:2) at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:50) at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$100(ComponentManagerImpl.java:29) at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:90) at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:162) at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:5) at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:235) at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:24) at com.intellij.idea.MainImpl$3.run(MainImpl.java:3) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:131) at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:132) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:136) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:675) at java.lang.ClassLoader.defineClass(ClassLoader.java:520) at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:132) at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:128) at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:104) at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:75) at com.intellij.ide.plugins.cl.PluginClassLoader._loadClass(PluginClassLoader.java:42) at com.intellij.util.lang.UrlClassLoader.loadClass(UrlClassLoader.java:80) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:75) ... 18 more

Glad to hear it worked for you.

Works after the recompile, thanks for the compatibility fix. This is a really slick plugin, kohsuke, a huge time saver for me. Thanks for the contribution! -james

I rebuilt all the plugins in Mac OS X (for whatever reasons, on Linux IDEA doesn't allow me to select JDK5 for builds) and published them.