How to prevent "Select Opened File" icon not to change to "Open Files" project selection view?

已回答

Hi, whenever I use "Select Opened File" icon, it locates the file in the Project tree panel on left, however, it always switch to the "Open Files" view under Project, even if I am already in another view mode such as "Project Files". How do I prevent this happening? It's annoying to keep having to switching it back.

Thanks,

PS: I am using latest version:

IntelliJ IDEA 2023.1 (Ultimate Edition)
Build #IU-231.8109.175, built on March 28, 2023


Runtime version: 17.0.6+10-b829.5 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4
Metal Rendering is ON
Registry:
    debugger.new.tool.window.layout=true
    ide.experimental.ui=true


Kotlin: 231-1.8.20-IJ8109.175

4

I was not able to reproduce this issue.

  1. Please try disabling all non-bundled plugins and restarting IDE
  2. If that did not help, please reproduce the issue, notice the time it occurred (with seconds) and share the log (`Help | Collect logs and diagnostic data`) with us via https://uploads.jetbrains.com/
0

Hi, I had the same problem

Check what's in Project tool window

Always select an open file is not selected

After that, the same button will appear <3

 
0

@Inqardwastaken, please reproduce the issue, notice the time it occurred (with seconds) and share the log (`Help | Collect logs and diagnostic data`) with us via https://uploads.jetbrains.com/

0

Noticed the same issue, a restart of PHP Storm helped.

0

Philipp Roensch, please collect the logs (`Help | Collect logs and diagnostic data`) if you would see this issue ever again.

0

Nadia Tarashkevich I was able to reproduce this with WebStorm recently.

This was working fine not that long ago, then it just started happening and I can't get it to stop. Here is the link to my upload:

Upload id: 2023_10_10_vT71nUZhNpuBdjzbyAJfd4 (file: webstorm-logs-20231010-16240412654237673132028359.zip)

0

Sorry I didn't get an exact time, but towards the end of that log near 4:23 PM ET (-0400) on Oct 10, 2023 was when I noticed the issue.

 

0

Sorry, see nothing suspicious in the provided log. I suspect there's some corner case in certain scenarios, but so far we could not reproduce this behavior on our side.

Starting from 2023.2.2 additional logging can be added to track selection in Project view, please share fresh IDE log with corresponding options enabled:

1. Go to IDE main menu Help | Diagnostic tools | Debug log settings…
2. Add 

com.intellij.ide.projectView.impl.SelectInProjectViewImpl
com.intellij.ui.tree.BgtTreeWalker

lines there.
3. Reproduce the issue again.
4. Go to Help | Diagnostic tools | Debug log settings again and remove the line added at step 2 (to avoid log spamming)
5. Share generated idea.log with us. You can locate it via main menu Help | Show log in…
 

It would help us a lot if you could additionally provide a screen recording demonstrating how the scope in Project view changes after clicking the Select Opened File button. Thank you! 

0

I had the same issue with one of my projects. I removed such behavior only after full deletion of .idea folder from the working directory  and recreation of the project. Yes, that will remove all configs done for the project, however, that worth it, because the issue was really annoying.

1

I am reproducing this issue right after upgrading from 2024.1 to 2025.1.1.1.

Two bugs:

The bug described above only happens with files in the project that are not in a module. I have a project with a /java directory and the rest of the project is not in a module. I think the IJ upgrade “lost” my root module for this one project. Any file not under /java has this buggy behavior where “Select file in Project View” takes you to the “Open Files” view.

WORKAROUND: Add your root directory as a module so every file is in a module.

Second bug:

On upgrade, I think my root project disappeared/got swallowed up because my root project and the java module had the same name. I suspect this because when I went to work around the first bug and recreate my root module, I wasn't able to. (e.g myproject/java/pom.xml as an artifactId that is also “myproject”).

0

@Brian Pan

Those are new issues. I am going to file it into our tracker. Please confirm that the description below is accurate or correct it:

Issue 1 Steps to reproduce 

1. In the Project View tool window, go to “Project files” view
 

2. Go to a file outside the source root in Editor

3. Click “Select opened file” button

Expected result

Opened file selected in “Project files” view

In fact result

Opened file selected in “Project” view

 

Issue 2 Steps to reproduce

1. Have a project with the name “HelloWorld” with the module name “HelloWorld”

2. Upgrade IDE 2024.1 → 2025.1

Expected result

Project modules remain the same

In fact result

Project module “HelloWorld” lost

 

1

Nadia Tarashkevich For Issue 1, the actual result is: Opened file selected in “Open Files” view.

Everything else looks good. Thank you!

0

I filed issues IJPL-188275 and IJPL-188273 

I was not able to reproduce these issues, so I am looking forward to your responses in the clarification comments.

0

How did i workaround the bug 1

 

1. Leave only one opened window of phpstorm

2. “Always select an open file is not selected” as in this comment https://intellij-support.jetbrains.com/hc/en-us/community/posts/10971827679506/comments/11353955223698

So make it unselected

3. Select "Project files" mode

4. Close php storm and wait few secs

5. Open it again and be sure that it opened in “Project files” mode (not opened files mode). So default mode is Project files.

6. Close it again.

7. After it open and this button worked fine for me

0

请先登录再写评论。