alibaba-cloud-toolkit / cosy

阿里云智能编码插件品牌升级为通义灵码,欢迎查看通义灵码帮助手册,同时也期待你在 IDE 客户端中将插件升级,我在通义灵码等你,一起开启智能编码之旅。
https://tongyi.aliyun.com/lingma
435 stars 28 forks source link

ERROR #195

Closed KukaNo996 closed 11 months ago

KukaNo996 commented 11 months ago

Describe the bug(描述您遇到的问题) 插件抛出异常 To Reproduce(复现步骤) 连续调用SpringApplication方法 Screenshots(截图) java.lang.Throwable: Assertion failed: Undoable actions allowed inside commands only (see com.intellij.openapi.command.CommandProcessor.executeCommand()) at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:465) at com.intellij.openapi.command.impl.UndoManagerImpl.undoableActionPerformed(UndoManagerImpl.java:335) at com.intellij.openapi.command.impl.DocumentUndoProvider.registerUndoableAction(DocumentUndoProvider.java:117) at com.intellij.openapi.command.impl.DocumentUndoProvider.handleDocumentChanged(DocumentUndoProvider.java:88) at com.intellij.openapi.command.impl.DocumentUndoProvider.documentChanged(DocumentUndoProvider.java:73) at com.intellij.openapi.editor.impl.event.EditorEventMulticasterImpl$1.lambda$documentChanged$1(EditorEventMulticasterImpl.java:46) at com.intellij.openapi.extensions.impl.ExtensionProcessingHelper.forEachExtensionSafe(ExtensionProcessingHelper.kt:32) at com.intellij.openapi.extensions.ExtensionPointName.forEachExtensionSafe(ExtensionPointName.kt:49) at com.intellij.openapi.editor.impl.event.EditorEventMulticasterImpl$1.documentChanged(EditorEventMulticasterImpl.java:46) at com.intellij.openapi.editor.impl.DocumentImpl.lambda$changedUpdate$1(DocumentImpl.java:913) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeNonCancelableSection$3(CoreProgressManager.java:222) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$computeInNonCancelableSection$4(CoreProgressManager.java:230) at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:64) at com.intellij.openapi.progress.impl.CoreProgressManager.computeInNonCancelableSection(CoreProgressManager.java:230) at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:221) at com.intellij.openapi.editor.impl.DocumentImpl.changedUpdate(DocumentImpl.java:910) at com.intellij.openapi.editor.impl.DocumentImpl.updateText(DocumentImpl.java:814) at com.intellij.openapi.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:654) at com.intellij.openapi.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:591) at com.alibabacloud.intellij.cosy.completion.CosyCompletionContributor.replaceDollarZeroAndMoveCaret(CosyCompletionContributor.java:351) at com.alibabacloud.intellij.cosy.completion.CosyCompletionContributor$1.handleInsert(CosyCompletionContributor.java:285) at com.intellij.codeInsight.lookup.LookupElementBuilder.handleInsert(LookupElementBuilder.java:336) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$insertItem$15(CodeCompletionHandlerBase.java:714) at com.intellij.util.indexing.FileBasedIndex.lambda$ignoreDumbMode$0(FileBasedIndex.java:213) at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:110) at com.intellij.util.indexing.FileBasedIndexEx.ignoreDumbMode(FileBasedIndexEx.java:721) at com.intellij.util.indexing.FileBasedIndex.ignoreDumbMode(FileBasedIndex.java:212) at com.intellij.util.indexing.DumbModeAccessType.ignoreDumbMode(DumbModeAccessType.java:43) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$insertItem$16(CodeCompletionHandlerBase.java:713) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:992) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.insertItem(CodeCompletionHandlerBase.java:697) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.doInsertItemForSingleCaret(CodeCompletionHandlerBase.java:641) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$doInsertItem$13(CodeCompletionHandlerBase.java:613) at com.intellij.openapi.editor.impl.CaretModelImpl.lambda$runForEachCaret$3(CaretModelImpl.java:310) at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:419) at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:319) at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:296) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.doInsertItem(CodeCompletionHandlerBase.java:605) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.insertItemHonorBlockSelection(CodeCompletionHandlerBase.java:564) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lookupItemSelected(CodeCompletionHandlerBase.java:510) at com.intellij.codeInsight.completion.CompletionProgressIndicator.itemSelected(CompletionProgressIndicator.java:180) at com.intellij.codeInsight.completion.BaseCompletionLookupArranger.itemSelected(BaseCompletionLookupArranger.java:229) at com.intellij.codeInsight.lookup.impl.LookupImpl.fireItemSelected(LookupImpl.java:959) at com.intellij.codeInsight.lookup.impl.LookupImpl.finishLookupInWritableFile(LookupImpl.java:588) at com.intellij.codeInsight.lookup.impl.LookupImpl.lambda$finishLookup$8(LookupImpl.java:546) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:210) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:150) at com.intellij.codeInsight.lookup.impl.LookupImpl.finishLookup(LookupImpl.java:546) at com.intellij.codeInsight.lookup.impl.LookupImpl.finishLookup(LookupImpl.java:531) at com.intellij.codeInsight.lookup.impl.actions.ChooseItemAction$Handler.doExecute(ChooseItemAction.java:57) at com.intellij.openapi.editor.actionSystem.DynamicEditorActionHandler.doExecute(DynamicEditorActionHandler.java:63) at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$4(EditorActionHandler.java:199) at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:89) at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:198) at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:93) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174) at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:102) at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:77) at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:339) at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:47) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$myActionProcessor$1.performAction(IdeKeyEventDispatcher.kt:502) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner$lambda$5$lambda$4(IdeKeyEventDispatcher.kt:865) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner$lambda$5(IdeKeyEventDispatcher.kt:865) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:362) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner(IdeKeyEventDispatcher.kt:863) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.access$doPerformActionInner(IdeKeyEventDispatcher.kt:1) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction$intellij_platform_ide_impl(IdeKeyEventDispatcher.kt:587) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.kt:513) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.kt:454) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.kt:447) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.kt:309) at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.kt:617) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:587) at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:992) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:992) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

System(本地系统)

Contact Info(如愿意请留下联系方式,需求上线后,我们将第一时间联系您)

zxdxjtu commented 11 months ago

请问你的文件是可编辑的吗,其他项目或其他文件有同样问题吗?这个步骤是补全结果替换一些占位符的时候报了文件不可编辑的错

KukaNo996 commented 11 months ago

文件是可编辑的,在2023.1版本上不存在这个问题,在类似以下结构方法调用时必然触发: new SpringApplicationBuilder() .main(SpringBootFeaturesApplication.class) .sources(SpringBootFeaturesApplication.class) .bannerMode(Banner.Mode.CONSOLE) .run(args); 另外,当发生此错误时,引号补全会失效

zxdxjtu commented 11 months ago

抱歉,新版本IDEA 232存在不兼容的问题,我们先把新版本回退了,我们尽快修复。如果想要正常使用的话,目前暂时只能把IDEA退回到231版本

KukaNo996 commented 11 months ago

抱歉,新版本IDEA 232存在不兼容的问题,我们先把新版本回退了,我们尽快修复。如果想要正常使用的话,目前暂时只能把IDEA退回到231版本

Ok,谢谢

liulhdarks commented 11 months ago

http://toolkit.aliyun.com/idea/cosy-intellij-0.10.6-beta.zip
@KukaNo996 可以试一下这个插件包,看看还有不有问题

KukaNo996 commented 11 months ago

http://toolkit.aliyun.com/idea/cosy-intellij-0.10.6-beta.zip @KukaNo996 可以试一下这个插件包,看看还有不有问题

可以正常使用,感谢