Rearranger 4.0.2 exception

Dave, please let me know, whether you need more information (e.g. layout
definition).

Tom


adjustSpacing: illegal syntax (mismatched braces); PsiElement for brace
is null
java.lang.RuntimeException: adjustSpacing: illegal syntax (mismatched
braces); PsiElement for brace is null
at com.wrq.rearranger.rearrangement.Spacer.adjustSpacing(Spacer.java:415)
at com.wrq.rearranger.rearrangement.Spacer.adjustSpacing(Spacer.java:358)
at com.wrq.rearranger.rearrangement.Spacer.access$000(Spacer.java:26)
at com.wrq.rearranger.rearrangement.Spacer$1.visitClass(Spacer.java:116)
at
com.intellij.psi.JavaElementVisitor.visitTypeParameter(JavaElementVisitor.java:362)
at
com.intellij.psi.impl.source.tree.java.PsiTypeParameterImpl.accept(PsiTypeParameterImpl.java:58)
at
com.intellij.psi.impl.source.TreeWrapperPsiElement.acceptChildren(TreeWrapperPsiElement.java:87)
at
com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:21)
at
com.intellij.psi.JavaElementVisitor.visitTypeParameterList(JavaElementVisitor.java:274)
at
com.intellij.psi.impl.source.tree.java.PsiTypeParameterListImpl.accept(PsiTypeParameterListImpl.java:37)
at
com.intellij.psi.impl.source.TreeWrapperPsiElement.acceptChildren(TreeWrapperPsiElement.java:87)
at
com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:21)
at
com.intellij.psi.JavaElementVisitor.visitClass(JavaElementVisitor.java:54)
at com.wrq.rearranger.rearrangement.Spacer$1.visitClass(Spacer.java:114)
at com.intellij.psi.impl.source.PsiClassImpl.accept(PsiClassImpl.java:380)
at
com.intellij.psi.impl.source.TreeWrapperPsiElement.acceptChildren(TreeWrapperPsiElement.java:87)
at
com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:21)
at
com.intellij.psi.JavaElementVisitor.visitFile(JavaElementVisitor.java:130)
at com.wrq.rearranger.rearrangement.Spacer$1.visitFile(Spacer.java:83)
at
com.intellij.psi.JavaElementVisitor.visitJavaFile(JavaElementVisitor.java:338)
at
com.intellij.psi.impl.source.PsiJavaFileBaseImpl.accept(PsiJavaFileBaseImpl.java:138)
at com.wrq.rearranger.rearrangement.Spacer.respace(Spacer.java:273)
at
com.wrq.rearranger.RearrangerActionHandler.rearrangeDocument(RearrangerActionHandler.java:194)
at
com.wrq.rearranger.RearrangerActionHandler$rearrangerTask.run(RearrangerActionHandler.java:226)
at
com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:3)
at
com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:32)
at
com.wrq.rearranger.RearrangerActionHandler.runWriteActionRearrangement(RearrangerActionHandler.java:144)
at
com.wrq.rearranger.RearrangerActionHandler$1.run(RearrangerActionHandler.java:104)
at
com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:244)
at
com.wrq.rearranger.RearrangerActionHandler.execute(RearrangerActionHandler.java:97)
at
com.intellij.openapi.editor.actionSystem.EditorAction$1.run(EditorAction.java:40)
at
com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:100)
at
com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:32)
at
com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:46)
at
com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:31)
at
com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.a(IdeKeyEventDispatcher.java:16)
at
com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.b(IdeKeyEventDispatcher.java:82)
at
com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:4)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:87)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:93)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

3 comments
Comment actions Permalink

Hi Tom,

If you could email me the source that caused this exception, I could find it much easier. I also need to know your spacing settings.

I think that somewhere there is a strange combination of open and close brace characters, perhaps on the same line as another brace character or a comment.

-Dave

0
Comment actions Permalink

Hi Dave,

I could sent you my settings, but I don't have any clue any more which
source file caused this problem. If it happens again, I will send you both.

Tom

0
Comment actions Permalink

OK, sounds good. Perhaps I will add a snippet of source to the exception description so it won't be necessary in the future.

0

Please sign in to leave a comment.