wmyywm / eclipse-code-formatter-intellij-plugin

Automatically exported from code.google.com/p/eclipse-code-formatter-intellij-plugin
0 stars 0 forks source link

Some exception #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Document is locked by write PSI operations. Use 
PsiDocumentManager.doPostponedOperationsAndUnblockDocument() to commit PSI 
changes to the document.: Document is locked by write PSI operations. Use 
PsiDocumentManager.doPostponedOperationsAndUnblockDocument() to commit PSI 
changes to the document.
java.lang.RuntimeException: Document is locked by write PSI operations. Use 
PsiDocumentManager.doPostponedOperationsAndUnblockDocument() to commit PSI 
changes to the document.
    at com.intellij.psi.impl.source.PostprocessReformattingAspect.beforeDocumentChanged(PostprocessReformattingAspect.java:263)
    at com.intellij.psi.impl.PsiDocumentManagerImpl.beforeDocumentChange(PsiDocumentManagerImpl.java:634)
    at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:89)
    at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:34)
    at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:65)
    at $Proxy18.beforeDocumentChange(Unknown Source)
    at com.intellij.openapi.editor.impl.DocumentImpl.b(DocumentImpl.java:546)
    at com.intellij.openapi.editor.impl.DocumentImpl.a(DocumentImpl.java:520)
    at com.intellij.openapi.editor.impl.DocumentImpl.access$200(DocumentImpl.java:53)
    at com.intellij.openapi.editor.impl.DocumentImpl$MyCharArray.beforeChangedUpdate(DocumentImpl.java:836)
    at com.intellij.openapi.editor.impl.CharArray.replace(CharArray.java:187)
    at com.intellij.openapi.editor.impl.DocumentImpl.a(DocumentImpl.java:421)
    at com.intellij.openapi.editor.impl.DocumentImpl.access$000(DocumentImpl.java:53)
    at com.intellij.openapi.editor.impl.DocumentImpl$3.run(DocumentImpl.java:753)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:110)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:93)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:81)
    at com.intellij.openapi.editor.impl.DocumentImpl.setText(DocumentImpl.java:760)
    at krasa.formatter.plugin.EclipseCodeFormatter.formatWhenEditorIsOpen(EclipseCodeFormatter.java:96)
    at krasa.formatter.plugin.EclipseCodeFormatter.formatWithEclipse(EclipseCodeFormatter.java:65)
    at krasa.formatter.plugin.EclipseCodeFormatter.format(EclipseCodeFormatter.java:50)
    at krasa.formatter.plugin.EclipseCodeStyleManager.formatWithEclipse(EclipseCodeStyleManager.java:110)
    at krasa.formatter.plugin.EclipseCodeStyleManager.reformatText(EclipseCodeStyleManager.java:76)
    at com.intellij.codeInsight.template.impl.TemplateState.a(TemplateState.java:1035)
    at com.intellij.codeInsight.template.impl.TemplateState.access$2100(TemplateState.java:70)
    at com.intellij.codeInsight.template.impl.TemplateState$5.run(TemplateState.java:380)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:898)
    at com.intellij.codeInsight.template.impl.TemplateState.doReformat(TemplateState.java:385)
    at com.intellij.codeInsight.template.impl.TemplateState.nextTab(TemplateState.java:764)
    at com.intellij.codeInsight.template.impl.actions.NextVariableAction$Handler.executeWriteAction(NextVariableAction.java:47)
    at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:52)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:898)
    at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.execute(EditorWriteActionHandler.java:36)
    at com.intellij.openapi.editor.actionSystem.EditorAction$1.run(EditorAction.java:79)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:117)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:90)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:65)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$3.performAction(IdeKeyEventDispatcher.java:545)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:593)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.d(IdeKeyEventDispatcher.java:461)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:209)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
    at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:420)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:378)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Original issue reported on code.google.com by vojta.kr...@gmail.com on 9 Mar 2012 at 10:04

GoogleCodeExporter commented 9 years ago
Have this error too when calling live template "iter"...

Original comment by matth...@berla.net on 4 Apr 2012 at 11:55

GoogleCodeExporter commented 9 years ago
that is strange, i saw this error sometimes while project opening, but live 
templates works ok...

do you have this error every time?

Original comment by vojta.kr...@gmail.com on 4 Apr 2012 at 11:57

GoogleCodeExporter commented 9 years ago
The error pops up when calling a live template from a file which has syntax 
errors.

Original comment by matth...@berla.net on 4 Apr 2012 at 12:58

GoogleCodeExporter commented 9 years ago
i reproduced it, thanks.

Original comment by vojta.kr...@gmail.com on 4 Apr 2012 at 12:59

GoogleCodeExporter commented 9 years ago
actually, i reproduced that error before that, but dunno how.
when i try file with syntax error, it works normally, could you maybe send me 
that file?

Original comment by vojta.kr...@gmail.com on 4 Apr 2012 at 1:05

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
import java.util.ArrayList;

public class asd {

    public asd() {
        sad
        safafasd
    }

    public void test() {
        ArrayList<String> strings = new ArrayList<String>();
        // calling iter here produces the error
        for (String string : strings) {

        }
    }

}

Original comment by matth...@berla.net on 4 Apr 2012 at 1:11

GoogleCodeExporter commented 9 years ago
good, thanks.

Original comment by vojta.kr...@gmail.com on 4 Apr 2012 at 1:16

GoogleCodeExporter commented 9 years ago
no prob. btw, great plugin.

Original comment by matth...@berla.net on 4 Apr 2012 at 1:21

GoogleCodeExporter commented 9 years ago
fixed in 1.8, hopefully without side effets :]

Original comment by vojta.kr...@gmail.com on 4 Apr 2012 at 9:46

GoogleCodeExporter commented 9 years ago

Original comment by vojta.kr...@gmail.com on 4 Apr 2012 at 9:46