use of org.netbeans.api.java.source.TreePathHandle in project netbeans-mmd-plugin by raydac.
the class AbstractPlugin method findFileObjectInLookup.
private Collection<? extends FileObject> findFileObjectInLookup(final Lookup lookup) {
final Collection<? extends FileObject> files = lookup.lookupAll(FileObject.class);
final Collection<? extends NonRecursiveFolder> folders = lookup.lookupAll(NonRecursiveFolder.class);
final Set<FileObject> result = new HashSet<FileObject>();
for (final NonRecursiveFolder f : folders) {
result.add(f.getFolder());
}
result.addAll(files);
final Collection<? extends TreePathHandle> treePaths = lookup.lookupAll(TreePathHandle.class);
for (final TreePathHandle h : treePaths) {
result.add(h.getFileObject());
}
return result;
}
Aggregations