use of org.eclipse.che.ide.resources.tree.ResourceNode in project che by eclipse.
the class SelectPathViewImpl method acceptButtonClicked.
private void acceptButtonClicked() {
List<Node> nodes = tree.getSelectionModel().getSelectedNodes();
if (nodes.isEmpty()) {
return;
}
Node selectedNode = nodes.get(0);
if (selectedNode instanceof ResourceNode) {
delegate.setSelectedPath(((ResourceNode) selectedNode).getData().getLocation().toString());
}
hide();
}
use of org.eclipse.che.ide.resources.tree.ResourceNode in project che by eclipse.
the class LibraryNodeProvider method intercept.
@Override
public Promise<List<Node>> intercept(Node parent, List<Node> children) {
if (parent instanceof ResourceNode) {
final Resource resource = ((ResourceNode) parent).getData();
if (resource.getResourceType() != PROJECT) {
return promises.resolve(children);
}
final Project project = (Project) resource;
if (isJavaProject(project) && isDisplayLibraries(project)) {
final List<Node> intercepted = newArrayList(children);
intercepted.add(nodeFactory.newLibrariesNode(project.getLocation(), settingsProvider.getSettings()));
return promises.resolve(intercepted);
}
}
return promises.resolve(children);
}
Aggregations