Scan an eclipse project from an eclipse plugin
I'd like to write a plugin for eclipse that performs some operations on an eclipse project.
My question is: how can I scan/obtain the project file list from an eclipse plugin???
开发者_如何学JAVAIs there something like findfirst / findnext?
Any pointer in the right direction will be appreciated.
Ciao and thanks.
Iterating over your workspace's projects can be done through org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot().getProjects()
After that, finding the files you want can be done through a number of ways, easiest would be through IProjet.members(...)
Since the workspace, projects and folders all implement IResource, you can use of the org.eclipse.core.resources.IResource.accept() methods to iterate over the contents.
加载中,请稍侯......
精彩评论