File pattern to exclude some files

Is there a way to configure a file pattern to exclude some files from the project tab. For example I would like to exclude AspectJ files with a specfic names.

Comment actions Permalink

Note: Without loosing the power of AspectJ withing the editor. So I only want to exclude them from the view and not from the compile in the editor.

Comment actions Permalink

Yes. You could create an exclude scope (File Settings | Project Settings | Scopes). For example, to exclude all files with 'Foo' in the name, create a scope pattern of: !src:*Foo*

For specific types of files, just use the file extension in the pattern. See the help page for more information.

Then in the project tool window, in the "View as" drop down, select that scope. You will see the project in a "project hierarchy" (i.e. modules > packages > subpackages) rather than a file system hierarchy. But you will not see the files in that scope. As an FYI, you can also apply scopes to search in path and search & replace in path via the "Custom" selection in the "Scope" section. To me, that is where scopes are the most useful and powerful.

Comment actions Permalink

Hi Mark,

I used this pattern !file:*.aj to exclude the AspectJ files.
That did the trick.

Thank you very much.


Please sign in to leave a comment.