开发者

Scan an eclipse project from an eclipse plugin

开发者 https://www.devze.com 2023-02-09 14:16 出处:网络
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???开发者_如何学JAVA

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???

开发者_如何学JAVA

Is 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消