"Select opened file" button does not work

已回答

Hello,

I have quite big project with many maven submodules. My "Select opened file" just does not work. I tap it and nothing is happening. In logs I see:

2022-08-16 10:02:43,513 [ 576562]   INFO - #c.i.i.a.RevealFileAction - Exit code 1

IntelliJ IDEA 2022.2 (Ultimate Edition)

I cannot attach more logs because company policy. How can I find out what is going on?

2

At first, I'd recommend disabling custom plugins. What OS is in use? Is it possible to attach Help | About? It should not contain sensitive info. 

0

Custom plugins are disabled. OS is windows. Here is my About:

IntelliJ IDEA 2022.2 (Ultimate Edition)
Build #IU-222.3345.118, built on July 22, 2022
Licensed to 
Subscription is active until April 23, 2023.
Runtime version: 17.0.3+7-b469.32 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry:
    maven.spy.events.debug=true

Non-Bundled Plugins:
    Pythonid (222.3345.131)

Kotlin: 222-1.7.10-release-334-IJ3345.118

0

Nothing strange here.

Could you record a screencast demonstrating the issue? The whole IDE window. 

If I see nothing suspicious here too, I'll ask to configure debug logging, capture it and share with me 

0

Also doesn't work for me with the newest IntelliJ ultimate. working though JetBrains gateway which is running on Windows 10. Backend running on Linux SUSE. Tried this both in the traditional interface and the new beta UI - both do not work

0

Hello,

Could you please attach screenshot with file location?

0

Here is the screenshot - when clicking the "Select opened file" button nothing happens. I also didn't see anything in the log which is related to this

0

Do you know where this file is located? Is it a part of your source code or part of some library?

0

Yes, the file is part of the source code and this was working for me on the previous version of IntelliJ when I was working w/o the gateway. Maybe it is not related to the gateway but rather to the new version - the gateway downloads the latest version

here is the file location:

0

Yes, there are some known issues related to this problem, like https://youtrack.jetbrains.com/issue/GTW-2519 and https://youtrack.jetbrains.com/issue/CWM-1851

Unfortunately, I don't have ETA right now. Please subscribe for updates in the issues above.

0

Thank you. Those mentioned issues are for libraries. The issue happens for me also for source files in the project. Is this related to the same issue?

0

Yes, it relates to the same issue. I was told by the developers team, select opened file for src works, but unstably and when you face it, a restart of the Client should help for now. If the Client restart doesn't help, it may be another issue, and we will need logs from both sides. You can privately submit logs visible for the JetBrains team only on this page:  https://uploads.jetbrains.com

0

Thanks for the details. Restarted both the gateway and the backend but this still does not work for all source files (consistently) - tried several of them. I've uploaded the logs. Upload ID is 2022_12_27_kLdS36Hc3nLEDeZymZjtC9

0

Thank you for waiting. Unfortunately, your issue with a permanently non-working state is not reproducible on my side. Can you retest the same behaviour with the old UI enabled? 

0

I came here after experiencing the same issue - the "Target" button (Select Opened File) stopped working.

It was working earlier, but then I pulled in some files from another branch, using Cherry-pick Selected Changes from the Git log browser. After that, Select Opened File stopped working.

I did a restart and noticed that it seemed to take a while to index the directories... Once it was finished, the Target button worked again.

I checked and can reproduce the problem if I cherry-pick files from Git. Looks like it screws up the file system mapping. Reload from disk doesn't fix it - Restart does.

0

@Owen could you try closing the project and the IDE, then backup the .idea folder and .iml files in the project folder?
After that re-import the project into IntelliJ.

If that doesn't help, could you provide us your project folder and IDE log file - to try and reproduce the issue on our end?
You can zip and upload them securely. Then just paste the upload ID here, for our reference.

0

My computer got crashed a while back, and after installing everything from scratch this didn't reproduce. Its working now both on the classic UI and new UI. Thanks for looking into it

0

This is certainly related to indexing.
You can re-import and re-index but after a while files stop being selected in the project view if you edit them.
The feature "Always select opened file" stops working for some reason. Sometimes you can get it back to work disabling and re-enabling the feature but more often than not it's the end of the line.  Re-indexing a few million lines of code in hundreds of maven modules is also not so much fun so in the end you just live with it.  I filed a bug report a few years ago but this is one of these things that are just fundamentally broken in Idea.  It was disheartening to see that there were a few dozen bugs related to this all without a resolution.  It's painful because on these large projects (case in point https://github.com/apache/hop) it's wonderful to know in which module you're working in the project view.

0

For me button does work, but I have assigned a shortcut for "Open Selected File", and the shortcut doesn't work. It was broked with one of the Summer/Fall updates...

1

For me the button worked but I specified a shortcut for "Open selected file" and that shortcut doesn't work. Before, when I used Ubuntu it worked with Hotkey, but not when I used it on both Window 10 or Window 11. Could this cause of the problem be with OS?

 
 
0

I had this issue and was able to fix it with File > Invalidate caches > [check "Clear file system cache and Local History] > Invalidate and Restart

 

hope it helps someone

3

Dear all, starting from 2023.2.2 additional logging has been implemented to track the Project view selection events. If you still see “Select opened file” button or “Always select opened file” setting not navigating to the selected file in Project view in 2023.2.2 or 2023.3 EAP, please perform the following steps:

1. Go to Help | Diagnostic tools | Debug log settings… in the IDE main menu.
2. Add the following lines there:
com.intellij.ide.projectView.impl.SelectInProjectViewImpl
com.intellij.ui.tree.BgtTreeWalker

3. Reproduce the issue.
4. Go to Help | Diagnostic tools | Debug log settings… again and remove the lines added at step 2 to avoid log spamming.
5. Locate the idea.log via Help | Show log in <file explorer> and attach the log to IDEA-277127 or upload it using our upload service and let us know the upload ID in a comment here. 

Do Hoangnam9x Xp Vit Blr I've tried assigning a custom shortcut to “Select Opened file” and it works for me in IDEA 2023.2.2 on Windows 11. If the issue is still actual for you, please specify what shortcut exactly you've mapped to “Select Opened file” action and attach a screenshot of IDE Settings | Keymap window where this assignment can be seen. Thank you!

0

Upload ID: 2023_11_01_xyoFKeoFmgfDhmw1a649Wd

0

 Hello Ankit,

Is it reproducible with custom plugins disabled ("Loaded custom plugins: Import from Postman Collections (1.0.4), GitHub Copilot (1.3.3.3572), Terraform and HCL (232.8660.88)")? Is it reproducible with new sample project?

0

I saw this issue in JetBrains WebStorm 2021.2.4 (Build #WS-212.5712.44) on Windows. I gave up on fixing the issue in my project, and decided to just delete the project directory and create a new one, but I found that I was unable to delete one particular subdirectory which had been generated automatically by a test script. After some investigation I discovered that the reason it couldn't be deleted was that the directory's filename ended with a space. (This was because the directory name was the test's name, and the test name also ended in a space, due to a typo.) This is extremely unusual on Windows and it flummoxes even Windows' own command line tools. (Solution: Remove a folder with space at the end! - Microsoft Community.)

After recreating the project, I am not able to consistently recreate the issue with “Select opened file”. So there might be some other step which actually causes the indexing to break. But this might at least be worth ruling out as a potential source of the issue.

0

I followed the instructions from Ekaterina and as soon as I changed the debug log settings it started working again. Mysterious.

0

I have the same issue on IntelliJ 2023.2.5 Build #IU-232.10227.8 on Mac OS. When I am in the project view and the “Project” is selected it works BUT if I select the “Project Files” in the drop-down I get the issue where the open file is not selected. 

1

I also encounter this Issue on IntelliJ 2023.2.5, Windows 11. I have gradle multimodule project and the issue occurs in just one of the submodules. In other submodules the selection is correct. IDEA can`t select files from the src folder of that submodule but for example the build.gradle file, which is in the root folder of the submodule, is selected correctly. 

I add that the problem occurs in just Project view, in Project Files view it is ok.

0

Is it reproducible if you open module as a single project?

0

I created a new project with just that problematic module. I modified gradle build so that the module could be loaded by IntelliJ (although there was compilation errors because of missing other modules). In this situation the button “Select Opened File” worked correctly.  

Structure of the project is this:

 

settings.gradle file contains:

includeBuild('../DirectoryB/module4')

include(':module1')
include(':module2')
include(':module3')
include(':module5')
include(':module6')

project(":module5").projectDir = file('../DirectoryB/module5')
project(":module6").projectDir = file('../DirectoryB/module6')
0

EDIT: Small mistake. It is on Windows 10, not 11.

0

请先登录再写评论。