Skip to content

JetBrains: Open files on double click

Warren Gifford requested to merge dv/jetbrains-open-files-on-double-click into main

Created by: vdavid

Fixes https://github.com/sourcegraph/sourcegraph/issues/38477

  • JS side: Had to pass the “onOpen” callback to each search result type to trigger it on double click
  • Java side: while my JS solution worked in the standalone version right away, it didn't work in the IDE. The error messages pointed at the editor opening event not being in the EDT (event dispatch thread). Then I realized the "open" event didn't work for ⌥⏎ either! 😮 Not sure what happened, but it seemed reasonable to make the call with invokeLater so I did, and this made it work right away. Normally, I'd have investigated the causes further, but it really makes sense to me that we should use invokeLater here, so I didn't go down this rabbit hole.

Test plan

  • 1-min Loom – as mentioned in the video, I didn't demo all result types, just two, but based on the code structure, I'm pretty confident that it works for all of them.

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading