Reputation: 33
I'd like to parse specific files and present the parsed data in a table view in my Eclipse plugin. To get a hold on the files to parse, I'd like to make a query on all projects, something like IProject.find("pom.xml")
I've read about resources in the Plugin developer guide and I am able to work my way down to these files through Workspace > Projects > members > etc. but is there no Search-Service (something similar to what the Search dialog uses) I can include to get a collection of all files of a certain name ?
Upvotes: 0
Views: 280
Reputation: 111142
The File Search page uses org.eclipse.search.ui.text.TextSearchQueryProvider
(for which there is very little documentation) but this is intended to be used with the NewSearchUI
Search View interface.
Other than that there is no generic search code. You can use the accept
methods of IResource
to traverse resources (projects, folders and files). You will have to write you own code to search individual files.
Upvotes: 1