Feel free to suggest a proper patch which would handle this wildcard matching.
List<VirtualFile> vfsRoots = new ArrayList<VirtualFile>();
for (String root : roots)
{
int wc = root.lastIndexOf("*"); // is it wildcard
if (wc >= 0)
{
final String wcString = root.substring(wc + 1);
VirtualFile start;
if (wc > 0) // some more path before
{
start = VFS.getChild(root.substring(0, wc));
}
else
{
start = VFS.getRootVirtualFile();
}
try
{
List<VirtualFile> children = start.getChildren(new VirtualFileFilter()
{
public boolean accepts(VirtualFile file)
{
String name = file.getName();
return name.endsWith(wcString);
}
});
vfsRoots.addAll(children);
}
catch (IOException e)
{
throw new RuntimeException("Error creating VFS files for " + root, e);
}
}
else
{
try
{
URI uri = new URI(root);
vfsRoots.add(VFS.getChild(uri));
}
catch (URISyntaxException e)
{
throw new RuntimeException("Error creating VFS file for " + root, e);
}
}
}
this.vfsRoots = vfsRoots.toArray(new VirtualFile[vfsRoots.size()]);
This would do it for wildcard.