IDEA 2017.1 Custom scope not working
Answered
I've created a very simple custom scope (pattern "file[myproject]:src/client//*"). However, every time I try to pick it from the scope dropdown, the scope resets back to the "Project Files" scope. Basically, I can't actually apply my custom scope to the project tree. I've tried local and shared scope, but the results are the same.
I'm trying to figure out if this is a bug or if I'm doing something wrong (though this is a dead-simple custom scope, so I'm not sure what I could be doing "wrong" here). Has anyone run into this?
Please sign in to leave a comment.
Can't reproduce in IDEA 2016.3.2, custom scope with the pattern like in your example works fine in the project view:
Please specify your IDE version and share a sample project that would reproduce this problem.
As I mentioned in the initial post, I'm using the latest 2017.1 EAP release:
IntelliJ IDEA 2017.1 EAP
Build #IU-171.2014.21, built on December 29, 2016
IntelliJ IDEA EAP User
Expiration date: January 28, 2017
JRE: 1.8.0_112-release-b621 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
I've determined that the problem is related to "Autoscroll From Source". If you have "Autoscroll From Source" enabled, any time the current editor file changes to another file (open, close, etc.), the scope resets back to "Project Files".
So, if I have no files open, I can switch to my custom scope. But if I have any files already open, I can't even switch to the custom scope. And if I start with no files open, switch to the custom scope, and then open a file, the scope always switches back to "Project Files" and at that point you can't switch back to the custom scope again.
If I turn off "Autoscroll From Source", the custom scope seems to work fine. So it looks like some problem between custom scope and "Autoscroll From Source".
I have a simple project that demonstrates this, but it should be easy enough to confirm. Let me know if you need my project, or if I should go ahead and create an issue in the tracker.
Thanks,
Brian
Thanks for the details, please report a bug at https://youtrack.jetbrains.com/issues/IDEA.
Same issue here, found this post after searching on Google. I tried disabling Autoscroll From Source and noted that the scopes behaved fine after that, although I am finding that scopes are really treated very poorly in IJ.
OP, please post the link to any ticket you open so I can go vote for attention on that as well.
IntelliJ IDEA 2016.3.4, Build #IU-163.12024.16
If you have the same problem, please report the issue at https://youtrack.jetbrains.com/issues/IDEA and provide the exact steps to reproduce it, thank you.
I have found that Brian already opened a ticket: https://youtrack.jetbrains.com/issue/IDEA-166413