smallcloudai / refact-intellij

Refact AI: Open-source AI Code assistant with autocompletion, chat, refactoring and more for IntelliJ JetBrains IDEs
https://refact.ai
BSD 3-Clause "New" or "Revised" License
37 stars 13 forks source link

[JB plugin] Internal error: UnsupportedOperationException (ImaginaryEditor) #102

Open BMomani opened 9 months ago

BMomani commented 9 months ago

An internal error happened in the IDE plugin.

Message: (no message)

Stack trace

java.lang.UnsupportedOperationException
    at com.intellij.openapi.editor.impl.ImaginaryEditor.notImplemented(ImaginaryEditor.java:65)
    at com.intellij.uml.editors.DiagramTextEditorAdapter.addFocusListener(DiagramTextEditorAdapter.java:358)
    at com.smallcloud.refactai.modes.ModeProvider$Companion$getOrCreateModeProvider$1$1.invoke(ModeProvider.kt:169)
    at com.smallcloud.refactai.modes.ModeProvider$Companion$getOrCreateModeProvider$1$1.invoke(ModeProvider.kt:168)
    at com.smallcloud.refactai.modes.ModeProvider$sam$com_intellij_util_Consumer$0.consume(ModeProvider.kt)
    at com.intellij.util.ObjectUtils.consumeIfCast(ObjectUtils.java:162)
    at com.smallcloud.refactai.modes.ModeProvider$Companion.getOrCreateModeProvider(ModeProvider.kt:168)
    at com.smallcloud.refactai.listeners.ForceCompletionActionPromoter.promote(ForceCompletionActionPromoter.kt:16)
    at com.intellij.openapi.actionSystem.impl.UtilsKt.rearrangeByPromotersImpl(Utils.kt:933)
    at com.intellij.openapi.actionSystem.impl.UtilsKt$rearrangeByPromoters$2$1$1$1.invoke(Utils.kt:908)
    at com.intellij.openapi.actionSystem.impl.UtilsKt$rearrangeByPromoters$2$1$1$1.invoke(Utils.kt:906)
    at com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:108)
    at com.intellij.openapi.application.rw.InternalReadAction.access$insideReadAction(InternalReadAction.kt:16)
    at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$2.invoke(InternalReadAction.kt:95)
    at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$2.invoke(InternalReadAction.kt:94)
    at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke$lambda$1$lambda$0(cancellableReadAction.kt:38)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1075)
    at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke$lambda$1(cancellableReadAction.kt:36)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:73)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128)
    at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke(cancellableReadAction.kt:34)
    at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:321)
    at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:310)
    at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:31)
    at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable(InternalReadAction.kt:94)
    at com.intellij.openapi.application.rw.InternalReadAction.tryReadAction(InternalReadAction.kt:78)
    at com.intellij.openapi.application.rw.InternalReadAction.readLoop(InternalReadAction.kt:65)
    at com.intellij.openapi.application.rw.InternalReadAction.access$readLoop(InternalReadAction.kt:16)
    at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invokeSuspend(InternalReadAction.kt:36)
    at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invoke(InternalReadAction.kt)
    at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invoke(InternalReadAction.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
    at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
    at com.intellij.openapi.application.rw.InternalReadAction.runReadAction(InternalReadAction.kt:35)
    at com.intellij.openapi.application.rw.PlatformReadWriteActionSupport.executeReadAction(PlatformReadWriteActionSupport.kt:38)
    at com.intellij.openapi.application.ReadWriteActionSupport.executeReadAction$default(ReadWriteActionSupport.kt:15)
    at com.intellij.openapi.application.CoroutinesKt.constrainedReadActionUndispatched(coroutines.kt:82)
    at com.intellij.openapi.application.CoroutinesKt.readActionUndispatched(coroutines.kt:69)
    at com.intellij.openapi.actionSystem.impl.UtilsKt$rearrangeByPromoters$2$1$1.invokeSuspend(Utils.kt:1121)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

Environment

Additional information

BMomani commented 9 months ago

I think similar to https://github.com/smallcloudai/refact-intellij/issues/74