Scan an eclipse project from an eclipse plugin

I would like to write a plugin for eclipse that performs some operations on an eclipse project.

My question is: how can I scan / get a list of project files from the eclipse plugin ???

Is there something like findfirst / findnext?

Any pointer in the right direction will be appreciated.

Qiao and thanks.

+3
source share
2 answers

Iterating over your workspace projects can be done using org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot().getProjects()

After that, the search for the necessary files can be carried out in several ways, most simply through IProjet.members(...)

+4
source

Since workspaces, projects, and folders implement everything IResource, you can use methods org.eclipse.core.resources.IResource.accept()to iterate through the content.

0

Source: https://habr.com/ru/post/1791235/


All Articles