Please consider editing your post and mark it as obsolete instead. Do you want to delete post?
Hiding Specific Files
Permanently deleted user
Created
Hello, I have a scenerio where I want certain files to be hidden from the user but otherwise behave like normal files. Is it possible to do? I'm new tointellij plugin development.
Hidden from the user where exactly? If you just want to hide them from the project view, use the TreeStructureProvider extension point to modify the project view tree structure.
I want to hide the files from the project view only. From what I understand, you get the TreeStructureProvider by using Extensions.getExtensions(TreeStructureProvider.EP_NAME,e.getProject()); but where do I go from there? how do I modify the files to not show?
You don't get the TreeStructureProvider, you implement it. The modify() method receives a list of tree nodes, and you can remove from this list the nodes which have the type PsiFileNode and for which getVirtualFile().getName() matches the name of the files that you want to hide.
Hidden from the user where exactly? If you just want to hide them from the project view, use the TreeStructureProvider extension point to modify the project view tree structure.
Thanks for your reply,
I want to hide the files from the project view only. From what I understand, you get the TreeStructureProvider by using Extensions.getExtensions(TreeStructureProvider.EP_NAME,e.getProject());
but where do I go from there? how do I modify the files to not show?
You don't get the TreeStructureProvider, you implement it. The modify() method receives a list of tree nodes, and you can remove from this list the nodes which have the type PsiFileNode and for which getVirtualFile().getName() matches the name of the files that you want to hide.
What do I do with the implemented
TreeStructureProvider? How do I attach it to the project view? Sorry if this doesn't make sense, I am not familiar with Intellij's architecture.You may want to consider reading some documentation; specifically the section on extensions and extension points here: https://confluence.jetbrains.com/display/IDEADEV/IntelliJ+IDEA+Plugin+Structure
Ok, I was looking for documentation but I couldn't find them. Thanks.