crazyproger / Tabdir

IntelliJ IDEA plugin for adding path chunks to file tabs
32 stars 12 forks source link

Exceptions in PyCharm 2023.1.2 #31

Open aliktab opened 1 year ago

aliktab commented 1 year ago

java.lang.Throwable: Control-flow exceptions (e.g. this class com.intellij.openapi.progress.JobCanceledException) should never be logged. Instead, these should have been rethrown if caught. at com.intellij.openapi.diagnostic.Logger.ensureNotControlFlow(Logger.java:302) at com.intellij.idea.IdeaLogger.doLogError(IdeaLogger.java:151) at com.intellij.idea.IdeaLogger.error(IdeaLogger.java:142) at com.intellij.openapi.diagnostic.Logger.error(Logger.java:236) at ru.crazycoder.plugins.tabdir.SameFilenameTitleProvider.getEditorTabTitleInternal(SameFilenameTitleProvider.java:77) at ru.crazycoder.plugins.tabdir.SameFilenameTitleProvider.getEditorTabTitle(SameFilenameTitleProvider.java:59) at com.intellij.openapi.fileEditor.impl.EditorTabPresentationUtil.getCustomEditorTabTitle(EditorTabPresentationUtil.kt:22) at com.intellij.openapi.fileEditor.impl.EditorTabPresentationUtil.getEditorTabTitle(EditorTabPresentationUtil.kt:14) at com.intellij.openapi.fileEditor.impl.EditorsSplitters$updateFileName$title$1.invoke(EditorsSplitters.kt:487) at com.intellij.openapi.fileEditor.impl.EditorsSplitters$updateFileName$title$1.invoke(EditorsSplitters.kt:486) at com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:108) at com.intellij.openapi.application.rw.InternalReadAction.access$insideReadAction(InternalReadAction.kt:15) at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$1.invoke(InternalReadAction.kt:92) at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$1.invoke(InternalReadAction.kt:91) at com.intellij.openapi.progress.CancellationKt.withCurrentJob$lambda$0(cancellation.kt:17) at com.intellij.openapi.progress.Cancellation.withCurrentJob(Cancellation.java:60) at com.intellij.openapi.progress.CancellationKt.withCurrentJob(cancellation.kt:17) at com.intellij.openapi.progress.CancellationKt.executeWithJobAndCompleteIt(cancellation.kt:126) at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal$lambda$1$lambda$0(cancellableReadAction.kt:49) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1102) at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal$lambda$1(cancellableReadAction.kt:47) at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:129) at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:45) at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable(InternalReadAction.kt:91) at com.intellij.openapi.application.rw.InternalReadAction.access$tryReadCancellable(InternalReadAction.kt:15) at com.intellij.openapi.application.rw.InternalReadAction$tryReadAction$2.invoke(InternalReadAction.kt:77) at com.intellij.openapi.application.rw.InternalReadAction$tryReadAction$2.invoke(InternalReadAction.kt:72) at com.intellij.openapi.progress.CancellationKt.withCurrentJob$lambda$0(cancellation.kt:17) at com.intellij.openapi.progress.Cancellation.withCurrentJob(Cancellation.java:60) at com.intellij.openapi.progress.CancellationKt.withCurrentJob(cancellation.kt:17) at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:193) at com.intellij.openapi.application.rw.InternalReadAction.tryReadAction(InternalReadAction.kt:72) at com.intellij.openapi.application.rw.InternalReadAction.readLoop(InternalReadAction.kt:64) at com.intellij.openapi.application.rw.InternalReadAction.access$readLoop(InternalReadAction.kt:15) at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invokeSuspend(InternalReadAction.kt:43) at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invoke(InternalReadAction.kt) at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invoke(InternalReadAction.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89) at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169) at kotlinx.coroutines.BuildersKt.withContext(Unknown Source) at com.intellij.openapi.application.rw.InternalReadAction.runReadAction(InternalReadAction.kt:39) at com.intellij.openapi.application.rw.PlatformReadActionSupport.executeReadAction(PlatformReadActionSupport.kt:29) at com.intellij.openapi.application.ReadActionSupport.executeReadAction$default(ReadActionSupport.kt:15) at com.intellij.openapi.application.CoroutinesKt.constrainedReadAction(coroutines.kt:55) at com.intellij.openapi.application.CoroutinesKt.readAction(coroutines.kt:22) at com.intellij.openapi.fileEditor.impl.EditorsSplitters.updateFileName$intellij_platform_ide_impl(EditorsSplitters.kt:486) at com.intellij.openapi.fileEditor.impl.EditorsSplitters$updateFileName$1.invokeSuspend(EditorsSplitters.kt) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) Caused by: com.intellij.openapi.progress.JobCanceledException: java.util.concurrent.CancellationException: com.intellij.openapi.application.ReadAction$CannotReadException at com.intellij.openapi.progress.Cancellation.checkCancelled(Cancellation.java:44) at com.intellij.openapi.progress.impl.CoreProgressManager.doCheckCanceled(CoreProgressManager.java:133) at com.intellij.openapi.progress.ProgressManager.checkCanceled(ProgressManager.java:227) at com.intellij.util.indexing.events.VfsEventsMerger.processChanges(VfsEventsMerger.java:91) at com.intellij.util.indexing.events.ChangedFilesCollector.processFilesInReadAction(ChangedFilesCollector.java:265) at com.intellij.util.indexing.events.ChangedFilesCollector.processFilesToUpdateInReadAction(ChangedFilesCollector.java:224) at com.intellij.util.indexing.FileBasedIndexScanUtil.ensureUpToDate(FileBasedIndexScanUtil.java:51) at com.intellij.util.indexing.FileBasedIndexScanUtil.processFilesContainingAnyKey(FileBasedIndexScanUtil.java:237) at com.intellij.util.indexing.FileBasedIndexScanUtil.getContainingFiles(FileBasedIndexScanUtil.java:63) at com.intellij.util.indexing.FileBasedIndexImpl.getContainingFiles(FileBasedIndexImpl.java:1167) at ru.crazycoder.plugins.tabdir.SameFilenameTitleProvider.titleWithDiffs(SameFilenameTitleProvider.java:123) at ru.crazycoder.plugins.tabdir.SameFilenameTitleProvider.getEditorTabTitleInternal(SameFilenameTitleProvider.java:74) ... 49 more Caused by: java.util.concurrent.CancellationException: com.intellij.openapi.application.ReadAction$CannotReadException at com.intellij.openapi.application.rw.CancellableReadActionKt.cancelReadJob(cancellableReadAction.kt:61) at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.cancelActionsToBeCancelledBeforeWrite(ProgressIndicatorUtilService.java:46) at com.intellij.openapi.progress.util.ProgressIndicatorUtilService$1.beforeWriteActionStart(ProgressIndicatorUtilService.java:32) at jdk.internal.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:120) at com.intellij.util.EventDispatcher.lambda$createMulticaster$1(EventDispatcher.java:85) at jdk.proxy1/jdk.proxy1.$Proxy57.beforeWriteActionStart(Unknown Source) at com.intellij.openapi.application.impl.ApplicationImpl.fireBeforeWriteActionStart(ApplicationImpl.java:1346) at com.intellij.openapi.application.impl.ApplicationImpl.startWrite(ApplicationImpl.java:1151) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:956) at com.intellij.psi.impl.PsiDocumentManagerBase.finishCommit(PsiDocumentManagerBase.java:353) at com.intellij.psi.impl.DocumentCommitThread.lambda$commitUnderProgress$2(DocumentCommitThread.java:141) at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$safeTransferToEdt$6(NonBlockingReadActionImpl.java:633) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209) at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21) at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831) at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:456) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:122) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:788) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:758) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:667) at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$7(IdeEventQueue.kt:571) at com.intellij.openapi.application.impl.ApplicationImpl.withoutImplicitRead(ApplicationImpl.java:1446) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:571) at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:995) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:995) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385) 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) Caused by: com.intellij.openapi.application.ReadAction$CannotReadException ... 52 more

vlascik commented 5 months ago

There is now a fork of this addon at https://plugins.jetbrains.com/plugin/24528-tabdir-redux , should be approved in 2 days. The repo is at https://github.com/vlascik/Tabdir.

This exception should be fixed there.

I also added an option to use Regex replacements on tab titles and "empty path replacement" for situations where folder shortening ends up in an empty string.

Users will have to uninstall this version before installing a new one.