fig icon indicating copy to clipboard operation
fig copied to clipboard

Integration with IntelliJ causes issues with tooltip popup on hovers not working

Open edeandrea opened this issue 3 years ago • 9 comments

Checks

  • [X] I have searched github.com/withfig/fig/issues and there are no duplicates of my issue
  • [X] I have run fig doctor in the affected terminal session
  • [X] I have run fig restart and replicated the issue again

Operating system

macOS 13.2.1 (22D68)

Expected behaviour

This issue has to do with integration with IntelliJ. When the fig IntelliJ plugin is enabled, the tooltip popup hovers no longer work. It also prevents the user from turning off the support for screen readers.

I filed an issue with IntelliJ originally (https://intellij-support.jetbrains.com/hc/en-us/requests/4795714) and they found that once I disabled the Fig plugin, everything started working again as expected.

I would expect Fig not to interfere with my IDE.

Actual behaviour

Fig seems to interfere with my IDE.

Steps to reproduce

No response

Environment

fig-details:
  - 2.14.2
hardware-info:
  - model: 
  - model-id: 
  - chip-id: Apple M1 Pro
  - cores: 10
  - mem: 32.00 GB
os-info:
  - macOS 13.2.1 (22D68)
environment:
  - shell: /bin/zsh
  - terminal: terminal
  - cwd: /Users/edeandre
  - exe-path: /Users/edeandre/.fig/bin/fig
  - install-method: unknown
  - env-vars:
    - FIGTERM_SESSION_ID: 8df30bbb-895b-4cf6-b279-c890e37c3b00
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.14.2
    - PATH: /Users/edeandre/.jbang/bin:/Users/edeandre/.rd/bin:/Users/edeandre/.sdkman/candidates/java/current/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki:/Users/edeandre/tools/bin:/Users/edeandre/.fig/bin:/Users/edeandre/.local/bin
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - __CFBundleIdentifier: com.apple.Terminal
    - FIG_PID: 41024
    - FIG_SET_PARENT: 8df30bbb-895b-4cf6-b279-c890e37c3b00

edeandrea avatar Feb 20 '23 18:02 edeandrea

Just as a follow-up, the IntelliJ engineer who handled my case mentioned that the Fig plugin was the only third-party enabled plugin, and from their experience, some of the UI problems could be caused by third-party plugins.

They also found in the logs I provided to them that the following error repeated several times:

2023-02-20 08:28:13,646 [  37880] SEVERE - #c.i.o.a.TransactionGuardImpl - Write-unsafe context! Model changes are allowed from write-safe contexts only. Please ensure you're using invokeLater/invokeAndWait with a correct modality state (not "any"). See TransactionGuard documentation for details.
  current modality=ModalityState:{[Saving Application 1427973158: running=true; canceled=false]}
java.lang.Throwable: Write-unsafe context! Model changes are allowed from write-safe contexts only. Please ensure you're using invokeLater/invokeAndWait with a correct modality state (not "any"). See TransactionGuard documentation for details.
  current modality=ModalityState:{[Saving Application 1427973158: running=true; canceled=false]}
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
    at com.intellij.openapi.application.TransactionGuardImpl.assertWriteActionAllowed(TransactionGuardImpl.java:135)
    at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl.execute(RefreshQueueImpl.java:56)
    at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.launch(RefreshSessionImpl.java:114)
    at com.intellij.openapi.vfs.newvfs.RefreshQueue.refresh(RefreshQueue.java:41)
    at com.intellij.openapi.vfs.newvfs.RefreshQueue.refresh(RefreshQueue.java:27)
    at com.intellij.openapi.vfs.newvfs.NewVirtualFile.refresh(NewVirtualFile.java:56)
    at com.intellij.openapi.vfs.VirtualFile.refresh(VirtualFile.java:675)
    at com.intellij.ide.actions.EditCustomSettingsAction.openInEditor(EditCustomSettingsAction.kt:80)
    at com.intellij.ide.actions.EditCustomSettingsAction.actionPerformed(EditCustomSettingsAction.kt:55)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:327)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:306)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:350)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:306)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$performAction$5(ActionMenuItem.java:296)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:226)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction(ActionMenuItem.java:289)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$new$1(ActionMenuItem.java:78)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$new$2(ActionMenuItem.java:78)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
    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:749)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:756)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
    at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:838)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480)
    at com.intellij.ide.IdeEventQueue.pumpEventsForHierarchy(IdeEventQueue.java:956)
    at com.intellij.openapi.progress.util.ProgressWindow.lambda$startBlocking$4(ProgressWindow.java:215)
    at com.intellij.openapi.application.impl.ApplicationImpl.runUnlockingIntendedWrite(ApplicationImpl.java:864)
    at com.intellij.openapi.progress.util.ProgressWindow.lambda$startBlocking$5(ProgressWindow.java:210)
    at com.intellij.openapi.progress.util.ProgressWindow.executeInModalContext(ProgressWindow.java:191)
    at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:208)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$execFromEDT$6(ProgressRunner.java:329)
    at java.base/java.util.concurrent.CompletableFuture.uniAcceptNow(CompletableFuture.java:757)
    at java.base/java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:735)
    at java.base/java.util.concurrent.CompletableFuture.thenAccept(CompletableFuture.java:2182)
    at com.intellij.openapi.progress.impl.ProgressRunner.execFromEDT(ProgressRunner.java:326)
    at com.intellij.openapi.progress.impl.ProgressRunner.submit(ProgressRunner.java:267)
    at com.intellij.openapi.progress.impl.ProgressRunner.submitAndGet(ProgressRunner.java:193)
    at com.intellij.openapi.application.impl.ApplicationImpl.runProcessWithProgressSynchronously(ApplicationImpl.java:420)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:524)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:85)
    at com.intellij.openapi.progress.impl.CoreProgressManager.run(CoreProgressManager.java:367)
    at com.intellij.configurationStore.SaveAndSyncHandlerImpl.saveSettingsUnderModalProgress(SaveAndSyncHandlerImpl.kt:226)
    at com.intellij.openapi.application.impl.ApplicationImpl.doExit(ApplicationImpl.java:599)
    at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:570)
    at com.intellij.openapi.application.impl.ApplicationImpl.restart(ApplicationImpl.java:554)
    at com.intellij.openapi.application.impl.ApplicationImpl.restart(ApplicationImpl.java:529)
    at com.intellij.openapi.application.impl.ApplicationImpl.restart(ApplicationImpl.java:513)
    at com.intellij.openapi.application.impl.ApplicationImpl.restart(ApplicationImpl.java:508)
    at io.fig.jetbrains.FigService.<init>(FigService.java:39)
    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 com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:49)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:996)
    at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:43)
    at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:39)
    at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:154)
    at com.intellij.serviceContainer.BaseComponentAdapter.createInstance$lambda$1(BaseComponentAdapter.kt:133)
    at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:99)
    at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:132)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:92)
    at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:673)
    at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:629)
    at io.fig.jetbrains.FigWindowListener.toolWindowsRegistered(FigWindowListener.java:21)
    at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:655)
    at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:625)
    at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:395)
    at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:374)
    at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
    at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:433)
    at jdk.proxy1/jdk.proxy1.$Proxy97.toolWindowsRegistered(Unknown Source)
    at com.intellij.toolWindow.ToolWindowSetInitializer.createAndLayoutToolWindows$registerToolWindows(ToolWindowSetInitializer.kt:145)
    at com.intellij.toolWindow.ToolWindowSetInitializer.createAndLayoutToolWindows(ToolWindowSetInitializer.kt:160)
    at com.intellij.toolWindow.ToolWindowSetInitializer.access$createAndLayoutToolWindows(ToolWindowSetInitializer.kt:46)
    at com.intellij.toolWindow.ToolWindowSetInitializer$initUi$3.invokeSuspend(ToolWindowSetInitializer.kt:106)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:194)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:838)
    at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:454)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:74)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:114)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:36)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
    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:749)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:756)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
    at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:838)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480)
    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)
2023-02-20 08:28:13,649 [  37883] SEVERE - #c.i.o.a.TransactionGuardImpl - IntelliJ IDEA 2022.3.2  Build #IU-223.8617.56
2023-02-20 08:28:13,649 [  37883] SEVERE - #c.i.o.a.TransactionGuardImpl - JDK: 17.0.5; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2023-02-20 08:28:13,649 [  37883] SEVERE - #c.i.o.a.TransactionGuardImpl - OS: Mac OS X
2023-02-20 08:28:13,649 [  37883] SEVERE - #c.i.o.a.TransactionGuardImpl - Plugin to blame: Fig version: 2.0.0

edeandrea avatar Feb 20 '23 18:02 edeandrea

I was having a similar problem. When the Fig plugin was on I couldn't disable "Support screen readers" option in Rider. Have opened a ticket in JetBrains for that.

kyurkchyan avatar Feb 23 '23 06:02 kyurkchyan

I have the same issue with PhpStorm

DRaichev avatar Apr 03 '23 11:04 DRaichev

Same here on Webstorm. Also came here via this ticket:

  • https://youtrack.jetbrains.com/issue/IDEA-313820/Support-screen-readers-option-turns-on-after-restart-with-Fig-plugin-installed

Props to whoever discovered this.

Having that pref enabled disables Tab-completion for HTML tags, which is really annoying.

davestewart avatar Apr 03 '23 11:04 davestewart

Same here on PyCharm 2023.1. I had to disable the Fig plugin and turn off Support screen readers to restore functionality

eshwen avatar Apr 28 '23 13:04 eshwen

Fig requires support for screen readers to be turned enabled in JetBrains IDEs in order to determine location of the cursor.

Unfortunately, it seems like some functionality in JetBrains is not supported when the IDE is used with supported for screen readers. Hopefully, this can be fixed upstream.

mschrage avatar May 02 '23 00:05 mschrage

Unfortunately, it seems like some functionality in JetBrains is not supported when the IDE is used with supported for screen readers. Hopefully, this can be fixed upstream.

Hi @mschrage

Thanks for the reply 🙂

When you say "hopefully" is anything in place to make that happen?

davestewart avatar May 02 '23 07:05 davestewart

There doesn't seem to be an option to not install the IDEA plugin. Would be nice to have while this is being worked on.

CyborgPatrick avatar May 31 '23 15:05 CyborgPatrick

Same issue on Android Studio.

5peak2me avatar Aug 01 '23 08:08 5peak2me