Hiding Specific Files

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 to intellij plugin development.

0
6 comments

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.

0
Avatar
Permanently deleted user

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?

0

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.

0
Avatar
Permanently deleted user

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.
0

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

0
Avatar
Permanently deleted user

Ok, I was looking for documentation but I couldn't find them. Thanks.

0

Please sign in to leave a comment.