Search in sources :

Example 1 with NodeComparator

use of org.eclipse.che.ide.ext.java.client.search.node.NodeComparator in project che by eclipse.

the class TypeNode method getChildrenImpl.

/** {@inheritDoc} */
@Override
public Promise<List<Node>> getChildrenImpl() {
    return createFromAsyncRequest(callback -> {
        List<Node> child = new ArrayList<>();
        createTypeChildren(child, type, isFromSuper);
        if (type.isPrimary()) {
            for (Type type : compilationUnit.getSuperTypes()) {
                createTypeChildren(child, type, true);
            }
        }
        Collections.sort(child, new NodeComparator());
        callback.onSuccess(child);
    });
}
Also used : Type(org.eclipse.che.ide.ext.java.shared.dto.model.Type) NodeComparator(org.eclipse.che.ide.ext.java.client.search.node.NodeComparator) Node(org.eclipse.che.ide.api.data.tree.Node) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 Node (org.eclipse.che.ide.api.data.tree.Node)1 NodeComparator (org.eclipse.che.ide.ext.java.client.search.node.NodeComparator)1 Type (org.eclipse.che.ide.ext.java.shared.dto.model.Type)1