2

I have a Salesforce project in Eclipse and I would like to exclude all of the metadata files when I perform a resource search (Ctrl + Shift + R).

In the source folder are class files sitting next to metadata files. Given a class name, the metadata file will always be the same but end in "-meta.xml".

Excluding folders from search is trivially easy either using working sets or marking folders as derived and excluding derived resources.

However, the files I want to hide are sitting next to file I do not want to hide. I am not going to click thousands of individual files in order to mark the files derived.

I also found that using resource filters will hide the metadata files completely, making the Force.com plugin freak out and it can no longer deploy code to the server.

Is there an easy way to hide files matching a name filter from the "open resource" dialog while not hiding those files in project explorer short of individually marking each one derived?

Community
  • 1
  • 1
  • Very useful. If no solution or workaround found then log this as feature request in http://bugs.eclipse.org/ – Chandrayya G K Mar 12 '14 at 06:30
  • The accepted answer is a viable workaround *in this scenario*. I believe that in the general case it could be useful to have more complex criteria. I will write up a feature request when I get time. –  Mar 13 '14 at 17:14

1 Answers1

1

I know just one workaround which requires manual interaction each time during resource search, but it's pretty simple and may be useful

enter image description here

but by adding (*s or *cls) + space you can filter apex classes

enter image description here

Pavel Slepiankou
  • 3,516
  • 2
  • 25
  • 30
  • So simple I overlooked it. This works and requires a trivial amount of effort, so I am accepting this answer. However, in the big picture it would be useful to be able to omit file patterns from the dialog. For Salesforce metadata, the undesired pattern is appended to the file name. It could be possible in other scenarios to want to omit files based on more complex criteria. So I may open a feature request in Eclipse. –  Mar 13 '14 at 17:12