Undo "Mark Directory As | Library Files"
已回答
Hello,
say I want to mark a directory as "Project Sources and Headers" but fail and click "Library Files" instead (i.e. right click on some directory in the project tree | Mark Directory As | Library Files".
How do I revert this miss-click? The option "Mark Directory As" is now gone from the directory's context menu. Is there another place where I can undo my mistake?
Thanks,
Daniel
请先登录再写评论。
Hello!
In general case there should be an option "Unmark Root":
What folder have you marked? Was it Excluded before? Is it a subfolder?
Hi,
it's a subfolder inside an excluded folder, so it was excluded before. After I've marked the subfolder as "Library Files", the whole "Mark Directory as" menu entry disappeared. It's still there for other excluded subfolders, just not for the one I've marked as Library Files.
This is the context menu of the "Library Files" folder: https://i.imgur.com/G7zSXwJ.png
Edit: For reference, this is how the context menu looks for other subfolders: https://i.imgur.com/Tl9TR2L.png
Thanks,
Daniel
How have you excluded the folder in which the "lib" folder is located?
On my side I can reproduce the situation only with the subfolder of the automatically excluded folder, namely the folder which is specified as Generation path in File | Settings | Build, Execution, Deployment | CMake. I can't reproduce the situation if I simply mark a folder as excluded - I can mark its subfolder as library files and unmark it successfully in this case.
Hi,
it's inside an automatically excluded folder (build directory, it's code that I fetch during the build process). Is it unsupported in this case?
Thanks,
Daniel
Thanks for the information!
I've created the issue in our tracker: https://youtrack.jetbrains.com/issue/CPP-13500. Feel free to comment or upvote, follow it to get updates.
For now as a workaround you can "unmark" directory manually. To do that, open <project>/.idea/misc.xml file and remove the corresponding lines from it: