Is it possible to align member variables like this?

Hi,

Is it possible to align a sequence of member variable declarations like this:


private JButton    importButton;
private JButton    measureSimilarityButton;
private JSplitPane corpusSplitPane;
private JTextArea  outputTextArea;





In other words, to put enough padding between the type and the member variable so that member variables all start from the same column? Let's suppose there are not any comments, etc. between the lines (only white space characters are there).

Thanks in advance,
Behrang

6 comments
Comment actions Permalink

Please search the plugin list. IIRC, there existed a plugin supporting this
layout.

Tom

0
Comment actions Permalink

I think the Tabifier Plugin does this but installing it throws this exception:

Bad version number in .class file [Plugin: Tabifier]: Bad version number in .class file [Plugin: Tabifier]
com.intellij.diagnostic.PluginException: Bad version number in .class file [Plugin: Tabifier]
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:70)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:10)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$100(ComponentManagerImpl.java:66)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:73)
at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:107)
at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:7)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:135)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:41)
at com.intellij.idea.MainImpl$3.run(MainImpl.java:1)
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:35)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:99)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:217)
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:119)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:115)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:91)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:78)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:41)
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:13)
... 18 more



 


-Behrang

0
Comment actions Permalink

Do you run IDEA with JRE 1.5.*? Does running with JRE 1.6.* help?

For me IDEA starts with Tabifier (JDK 1.6.0_10), and though it throws some exception, some formatting is performed.

Alexander.

0
Comment actions Permalink

ache wrote:

Do you run IDEA with JRE 1.5.*? Does running with JRE 1.6.* help?


For me IDEA starts with Tabifier (JDK 1.6.0_10), and though it throws some exception, some formatting is performed.


Alexander.

Yes, I am running it with JRE 1.5. Is it recommended to use JRE 1.6 on OS X 10.5?

-Behi

0
Comment actions Permalink

Ah, I see. I didn't know you are on Mac and I have no much experience with that OS. AFAIK, on Mac Java 6 is available for 64-bit CPUs only, and the problem is that IDEA takes more memory with it (http://www.jetbrains.net/devnet/message/5225480#5225480). So, I cannot say it is recommended, but should work somehow.

Alexander.

0
Comment actions Permalink

I run IntelliJ on a Mac with Java 6 and I don't have any problems. I do see increase memory usage as mentioned but that doesn't bother me. I have the heap size set at 512 megs for IntelliJ.

You can always email the author of the tabifier plugin and see if they will compile their plugin under 1.5 so it will work if you are running IntelliJ with Java 1.5 (if you don't want to use 1.6 on the Mac).

0

Please sign in to leave a comment.