I'm developing an Eclipse Plug-in that is working with custom working sets. Those working sets can contain projects from the workspace but also external projects which are selected by the user through a wizard.
After selecting a folder, my plugin returns a java.io.File with the path of the folder. Now I'd like to add this folder as a resource to my custom working set. Right now adding elements to working-sets works by adding instances of IAdaptable to a List<IAdaptable>, which is then given to the IWorkingSetManager, so casting/converting the File to something like IResource or IFolder should work. So my question is, how do I make my java.io.File IAdaptable?