Is there a way to get the directory of a project in Eclipse? We are writing a plugin that will allow the user to select files, and then run some processes on those files. I would ideally like to be able to get all the files with a certain extension, but that is not necessary.
sure:
ResourcesPlugin.getWorkspace().getRoot().getProjects()
will get you a list of all the projects in the workspace. you can easily iterate to find the one you want. At that point, you can look for certain files by extensions, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With