publicstatic void write(int[] data, int startBit, int bitSize, int value) {
int unit = getUnit(startBit);
int startBitInUnit = startBit & BIT_INDEX_MASK;
<caret>startBitInUnit + bitSize > UNIT_SIZE
}
Surround with (Ctrl-Alt-T) -> "if(expr) {...} else {...}"
---------------------------------------
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.SingleRootFileViewProvider.beforeDocumentChanged(SingleRootFileViewProvider.java:42)
at com.intellij.psi.impl.PsiDocumentManagerImpl.beforeDocumentChange(PsiDocumentManagerImpl.java:108)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:73)
at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:21)
at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:52)
at $Proxy14.beforeDocumentChange(Unknown Source)
at com.intellij.openapi.editor.impl.DocumentImpl.a(DocumentImpl.java:129)
at com.intellij.openapi.editor.impl.DocumentImpl.access$200(DocumentImpl.java:57)
at com.intellij.openapi.editor.impl.DocumentImpl$4.beforeChangedUpdate(DocumentImpl.java:0)
at com.intellij.openapi.editor.impl.CharArray.remove(CharArray.java:43)
at com.intellij.openapi.editor.impl.DocumentImpl.deleteString(DocumentImpl.java:59)
at com.intellij.codeInsight.generation.surroundWith.JavaWithIfElseExpressionSurrounder.surroundExpression(JavaWithIfElseExpressionSurrounder.java:16)
at com.intellij.codeInsight.generation.surroundWith.JavaExpressionSurrounder.surroundElements(JavaExpressionSurrounder.java:4)
at com.intellij.codeInsight.generation.surroundWith.SurroundWithHandler.doSurround(SurroundWithHandler.java:47)
at com.intellij.codeInsight.generation.surroundWith.PopupActionChooser$InvokeSurrounderAction$1$1.run(PopupActionChooser.java:0)
at com.intellij.openapi.application.impl.ApplicationImpl$13.compute(ApplicationImpl.java:1)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.postponeFormattingInside(PostprocessReformattingAspect.java:160)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:86)
at com.intellij.codeInsight.generation.surroundWith.PopupActionChooser$InvokeSurrounderAction$1.run(PopupActionChooser.java:0)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:129)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:36)
at com.intellij.codeInsight.generation.surroundWith.PopupActionChooser$InvokeSurrounderAction.actionPerformed(PopupActionChooser.java:11)
at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java:2)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:151)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:13)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:18)
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)
Description
publicstatic void write(int[] data, int startBit, int bitSize, int value) {
int unit = getUnit(startBit);
int startBitInUnit = startBit & BIT_INDEX_MASK;
<caret>startBitInUnit + bitSize > UNIT_SIZE
}
Surround with (Ctrl-Alt-T) -> "if(expr) {...} else {...}"
---------------------------------------
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.SingleRootFileViewProvider.beforeDocumentChanged(SingleRootFileViewProvider.java:42)
at com.intellij.psi.impl.PsiDocumentManagerImpl.beforeDocumentChange(PsiDocumentManagerImpl.java:108)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:73)
at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:21)
at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:52)
at $Proxy14.beforeDocumentChange(Unknown Source)
at com.intellij.openapi.editor.impl.DocumentImpl.a(DocumentImpl.java:129)
at com.intellij.openapi.editor.impl.DocumentImpl.access$200(DocumentImpl.java:57)
at com.intellij.openapi.editor.impl.DocumentImpl$4.beforeChangedUpdate(DocumentImpl.java:0)
at com.intellij.openapi.editor.impl.CharArray.remove(CharArray.java:43)
at com.intellij.openapi.editor.impl.DocumentImpl.deleteString(DocumentImpl.java:59)
at com.intellij.codeInsight.generation.surroundWith.JavaWithIfElseExpressionSurrounder.surroundExpression(JavaWithIfElseExpressionSurrounder.java:16)
at com.intellij.codeInsight.generation.surroundWith.JavaExpressionSurrounder.surroundElements(JavaExpressionSurrounder.java:4)
at com.intellij.codeInsight.generation.surroundWith.SurroundWithHandler.doSurround(SurroundWithHandler.java:47)
at com.intellij.codeInsight.generation.surroundWith.PopupActionChooser$InvokeSurrounderAction$1$1.run(PopupActionChooser.java:0)
at com.intellij.openapi.application.impl.ApplicationImpl$13.compute(ApplicationImpl.java:1)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.postponeFormattingInside(PostprocessReformattingAspect.java:160)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:86)
at com.intellij.codeInsight.generation.surroundWith.PopupActionChooser$InvokeSurrounderAction$1.run(PopupActionChooser.java:0)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:129)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:36)
at com.intellij.codeInsight.generation.surroundWith.PopupActionChooser$InvokeSurrounderAction.actionPerformed(PopupActionChooser.java:11)
at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java:2)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:151)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:13)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:18)
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)