Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still highLighting even if tabs lose focus #51

Open
Chris-Nend opened this issue Mar 21, 2024 · 5 comments
Open

Still highLighting even if tabs lose focus #51

Chris-Nend opened this issue Mar 21, 2024 · 5 comments
Assignees
Labels

Comments

@Chris-Nend
Copy link

Chris-Nend commented Mar 21, 2024

image

    It's not always happen but the bug exactly exists;
@Chris-Nend
Copy link
Author

In Idea 2023.3.5

@tobszarny tobszarny added the bug label Mar 21, 2024
@tobszarny tobszarny self-assigned this Mar 21, 2024
@Smith334
Copy link

Got the same issue when using IntelliJ IDEA 2024.1

@radimnov
Copy link

IDEA 2023.3.4
Active Tab Highlighter 2.0.1

java.lang.RuntimeException: Cannot invoke (class=TabFileEditorListenerImpl, method=selectionChanged, topic=FileEditorManagerListener)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:677)
	at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:423)
	at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:402)
	at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
	at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:461)
	at jdk.proxy2/jdk.proxy2.$Proxy45.selectionChanged(Unknown Source)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.fireSelectionChanged(FileEditorManagerImpl.kt:1754)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.access$fireSelectionChanged(FileEditorManagerImpl.kt:126)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$1$1$1.invoke(FileEditorManagerImpl.kt:240)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$1$1$1.invoke(FileEditorManagerImpl.kt:238)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:321)
	at com.intellij.openapi.progress.CoroutinesKt.access$blockingContextInner(coroutines.kt:1)
	at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invokeSuspend(coroutines.kt:198)
	at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
	at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:197)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$1$1.invokeSuspend(FileEditorManagerImpl.kt:238)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at com.intellij.openapi.application.impl.DispatchedRunnable.run(DispatchedRunnable.kt:43)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:843)
	at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:463)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:75)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:67)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1436)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:124)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:44)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
	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:761)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:695)
	at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$12(IdeEventQueue.kt:589)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithoutImplicitRead(RwLockHolder.kt:44)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:589)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:72)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:355)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:354)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:793)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:354)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:349)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1014)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1014)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:349)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:848)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:391)
	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: java.lang.RuntimeException: java.lang.RuntimeException: Cannot invoke (class=TabFileEditorListenerImpl, method=highlight, topic=TabFileEditorListener)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:562)
	at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:591)
	at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:689)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
	at com.tobszarny.intellij.plugin.activetabhighlighter.editor.TabFileEditorListenerImpl.handleSelectionChange(TabFileEditorListenerImpl.java:91)
	at com.tobszarny.intellij.plugin.activetabhighlighter.editor.TabFileEditorListenerImpl.selectionChanged(TabFileEditorListenerImpl.java:82)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:700)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:660)
	... 61 more
Caused by: java.lang.RuntimeException: Cannot invoke (class=TabFileEditorListenerImpl, method=highlight, topic=TabFileEditorListener)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:677)
	at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:423)
	at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:402)
	at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
	at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:461)
	at jdk.proxy17/jdk.proxy17.$Proxy266.highlight(Unknown Source)
	at com.tobszarny.intellij.plugin.activetabhighlighter.editor.TabFileEditorListenerImpl.lambda$handleSelectionChange$1(TabFileEditorListenerImpl.java:92)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Access is allowed from Event Dispatch Thread (EDT) only; see https://jb.gg/ij-platform-threading for details
Current thread: Thread[JobScheduler FJ pool 3/11,4,main] 1563385916 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 776266782
	at com.intellij.util.concurrency.ThreadingAssertions.createThreadAccessException(ThreadingAssertions.java:149)
	at com.intellij.util.concurrency.ThreadingAssertions.throwThreadAccessException(ThreadingAssertions.java:143)
	at com.intellij.util.concurrency.ThreadingAssertions.assertEventDispatchThread(ThreadingAssertions.java:65)
	at com.intellij.openapi.editor.impl.view.EditorView.assertIsDispatchThread(EditorView.java:703)
	at com.intellij.openapi.editor.impl.view.EditorView.getPreferredSize(EditorView.java:291)
	at com.intellij.openapi.editor.impl.EditorImpl.lambda$getPreferredSize$54(EditorImpl.java:2243)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:909)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:65)
	at com.intellij.openapi.editor.impl.EditorImpl.getPreferredSize(EditorImpl.java:2240)
	at com.intellij.openapi.editor.impl.EditorComponentImpl.getPreferredScrollableViewportSize(EditorComponentImpl.java:297)
	at com.intellij.ui.components.JBViewport.getPreferredScrollableViewportSize(JBViewport.java:522)
	at com.intellij.ui.components.JBViewport$1.preferredLayoutSize(JBViewport.java:65)
	at java.desktop/java.awt.Container.lambda$preferredSize$4(Container.java:1826)
	at java.desktop/sun.awt.SunToolkit.performWithTreeLock(SunToolkit.java:2161)
	at java.desktop/java.awt.Container.preferredSize(Container.java:1824)
	at java.desktop/java.awt.Container.getPreferredSize(Container.java:1810)
	at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1723)
	at com.intellij.ui.components.JBScrollPane$Layout.preferredLayoutSize(JBScrollPane.java:821)
	at java.desktop/java.awt.Container.lambda$preferredSize$4(Container.java:1826)
	at java.desktop/sun.awt.SunToolkit.performWithTreeLock(SunToolkit.java:2161)
	at java.desktop/java.awt.Container.preferredSize(Container.java:1824)
	at java.desktop/java.awt.Container.getPreferredSize(Container.java:1810)
	at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1723)
	at com.intellij.openapi.editor.impl.EditorImpl$PanelWithFloatingToolbar.getPreferredSize(EditorImpl.java:5550)
	at java.desktop/java.awt.BorderLayout.preferredLayoutSize(BorderLayout.java:724)
	at java.desktop/java.awt.Container.lambda$preferredSize$4(Container.java:1826)
	at java.desktop/sun.awt.SunToolkit.performWithTreeLock(SunToolkit.java:2161)
	at java.desktop/java.awt.Container.preferredSize(Container.java:1824)
	at java.desktop/java.awt.Container.getPreferredSize(Container.java:1810)
	at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1723)
	at java.desktop/java.awt.GridBagLayout.GetLayoutInfo(GridBagLayout.java:1111)
	at java.desktop/java.awt.GridBagLayout.getLayoutInfo(GridBagLayout.java:906)
	at java.desktop/java.awt.GridBagLayout.ArrangeGrid(GridBagLayout.java:2074)
	at java.desktop/java.awt.GridBagLayout.arrangeGrid(GridBagLayout.java:2034)
	at java.desktop/java.awt.GridBagLayout.layoutContainer(GridBagLayout.java:802)
	at java.desktop/java.awt.Container.layout(Container.java:1541)
	at java.desktop/java.awt.Container.doLayout(Container.java:1530)
	at java.desktop/java.awt.Container.validateTree(Container.java:1725)
	at java.desktop/java.awt.Container.validateTree(Container.java:1734)
	at java.desktop/java.awt.Container.validateTree(Container.java:1734)
	at java.desktop/java.awt.Container.validateTree(Container.java:1734)
	at java.desktop/java.awt.Container.validateTree(Container.java:1734)
	at java.desktop/java.awt.Container.lambda$validate$3(Container.java:1659)
	at java.desktop/sun.awt.SunToolkit.performWithTreeLock(SunToolkit.java:2161)
	at java.desktop/java.awt.Container.validate(Container.java:1648)
	at com.intellij.ui.tabs.impl.JBTabsImpl.revalidateAndRepaint(JBTabsImpl.kt:1550)
	at com.intellij.openapi.fileEditor.impl.EditorTabs.revalidateAndRepaint(EditorTabbedContainer.kt:745)
	at com.intellij.ui.tabs.impl.JBTabsImpl.revalidateAndRepaint(JBTabsImpl.kt:1538)
	at com.intellij.ui.tabs.impl.JBTabsImpl.propertyChange(JBTabsImpl.kt:1457)
	at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268)
	at com.intellij.ui.tabs.TabInfo.setTabColor(TabInfo.java:385)
	at com.tobszarny.intellij.plugin.activetabhighlighter.editor.TabUpdateService.setTabColor(TabUpdateService.java:67)
	at com.tobszarny.intellij.plugin.activetabhighlighter.editor.TabUpdateService.highlight(TabUpdateService.java:118)
	at com.tobszarny.intellij.plugin.activetabhighlighter.editor.TabUpdateService.highlightSafe(TabUpdateService.java:105)
	at com.tobszarny.intellij.plugin.activetabhighlighter.editor.TabFileEditorListenerImpl.lambda$highlight$5(TabFileEditorListenerImpl.java:117)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.helpComplete(ForkJoinPool.java:1223)
	at java.base/java.util.concurrent.ForkJoinPool.helpComplete(ForkJoinPool.java:1915)
	at java.base/java.util.concurrent.ForkJoinTask.awaitDone(ForkJoinTask.java:433)
	at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:687)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
	at com.tobszarny.intellij.plugin.activetabhighlighter.editor.TabFileEditorListenerImpl.highlight(TabFileEditorListenerImpl.java:116)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:700)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:660)
	... 17 more

@deoomen
Copy link

deoomen commented Nov 20, 2024

2024.2.4 still occuring

@radimnov
Copy link

This plugin is no longer relevant.
Go to Settings > Editor > Color Scheme > General > Editor > Tabs > Selected Tab / Selected Tab inactive and then set the background color to your liking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants