How to reprotect file that doesn't belong to the project ? Follow Stéphane Este-Gracias Created August 06, 2016 11:16 When editing a file that doesn't belong to the project, I can edit it anyway. How to put back this file protected ?
Ah, I see:) Close the project, open file .idea/workspace.xml, find the
component there, remove your file from the list
After all years, this still is a problem in 2019.1.2 Pro version
Please open <IDE config dir>/workspace folder, locate the .xml file that corresponds to your project and search it for "CHANGED_PATHS"
External files opened explicitly via File | Open are always writeable (see the discussion in https://youtrack.jetbrains.com/issue/IDEA-125379);
THank you for your answer.
My question was not so clear. I will rephrase it.
When I click on a method that is not part of the project, the file is opening.
If I try to edit this file, a pop-up appears "Non-Project files Protection".
If I select "I want to edit this file anyway", I don't know how to put back the protection on that file.
I have similar prolbem: once I choose some thing like "edit anyway" in "Non-Project files Protection" dialog, and now I can edit non-project files even after restart IDE/restart computer/reinstall IDEA/deleting IDE settings folder/deleting .idea project folder. It doesn't matter how to open such non-project files: by click/cmd+shift+O/go to definition.
I have no idea how to reenable non-project file protection.
IntelliJ IDEA 2016.3
Build #IU-163.7743.44, built on November 18, 2016
Licensed to Yandex LLC
JRE: 1.8.0_112-release-408-b2 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
don't you see the last comment in this thread? https://intellij-support.jetbrains.com/hc/en-us/community/posts/207779865/comments/208647969
I see changed files in CHANGED_PATHS, can remove them. But them or other still can be modified without "non-project file protection" dialog, even after IDE restart (
Please add resolution to https://www.jetbrains.com/help/pycharm/2018.1/non-project-files-access-dialog.html
I'm on PyCharm 2019.2.3 and I have this problem, but CHANGED_PATHS is nowhere in my workspace.xml or any other file in my .idea directory.
Thanks for clarifying that Elena. I was looking in my projects .idea directory as per previous comments.
The settings layout has changed recently, some information that used to be stored in `.idea/workspace.xml`, like the windows size and positions, etc. is now stored globally in IDE configuration directory
Elena Pogorelova could you let me know where this file is located on MacOS?
@Will sorry, could you clarify what file you have in mind?