I am trying to develop a small plugin for Eclipse to create multiple Java files in multiple folders (packages) as a starting point for a new module of larger software.
I tried using the object IFileas follows:
final IFile file = container.getFile(new Path(myFileName));
...
file.create(stream, true, monitor);
This works as long as all folders on the file path exist. But it does not create the missing folders (new packages), but it throws a "resource does not exist" exception.
I could not find a way to do this using objects IResourceor IWorkspace.
source
share