I would like to write a plugin that just adds resource filter to the .project file that is created/imported. I know the following way to add a resource filter.
IProject.createFilter(IResourceFilterDescription.EXCLUDE_ALL | IResourceFilterDescription.FOLDERS | IResourceFilterDescription.INHERITABLE, new FileInfoMatcherDescription("org.eclipse.ui.ide.multiFilter", theFilter), IResource.BACKGROUND_REFRESH, monitor);
I’m wondering what is the right extension point where I can hook this code. I couldn’t find a generic place which would work to all kinds of projects (not just java projects).
My intention is to filter out lots of unwanted files coming from a proprietary source control system.
You can use IResourceChangeListener. You can find more info here.
If you are using JDT, you can also use
the listener must implement
org.eclipse.jdt.core.IElementChangedListener.