use of com.devonfw.cobigen.eclipse.wizard.common.model.stubs.OffWorkspaceResourceTreeNode in project cobigen by devonfw.
the class SelectFileContentProvider method filter.
/**
* Filters the {@link TreeViewer} contents by the given paths
*
* @param paths to be filtered
* @param offScopeResourceTree resource tree for workspace external files
*/
public void filter(Set<String> paths, List<OffWorkspaceResourceTreeNode> offScopeResourceTree) {
this.filteredPaths = new HashSet<>(paths);
this._cachedChildren.clear();
this._cachedPackageFragmentRoots.clear();
HierarchicalTreeOperator.resetCache();
this.offScopeResourceTree = offScopeResourceTree;
this._cachedProvidedResources.clear();
Deque<OffWorkspaceResourceTreeNode> worklist = Lists.newLinkedList(offScopeResourceTree);
while (!worklist.isEmpty()) {
OffWorkspaceResourceTreeNode next = worklist.pop();
if (next.hasChildren()) {
worklist.addAll(next.getChildren());
} else {
this._cachedProvidedResources.put(next.getAbsolutePathStr(), next);
}
}
}
Aggregations