Package org.auraframework.components.ui

Examples of org.auraframework.components.ui.TreeNode


@Model
public class SearchFilterTreeTestModel {

    @AuraEnabled
    public List<TreeNode> getTree() {
        TreeNode serverRoot = new TreeNode(null, "serverRoot");
        serverRoot.addChild(new TreeNode("#child", "serverChild"));
        return Lists.newArrayList(serverRoot);
    }
View Full Code Here


            String namespace = desc.getNamespace();
            if (configAdapter.isDocumentedNamespace(namespace)) {
                try {
                    E def = desc.getDef();
                    if (hasAccess(def)) {
                        TreeNode namespaceTreeNode = namespaceTreeNodes.get(desc.getNamespace());
                        if (namespaceTreeNode == null) {
                            namespaceTreeNode = new TreeNode(null, namespace);
                            namespaceTreeNodes.put(namespace, namespaceTreeNode);
                            ret.add(namespaceTreeNode);
                        }

                        String href = String.format("#reference?descriptor=%s%s%s", namespace, sep, desc.getName());

                        href += "&defType=" + desc.getDefType().name().toLowerCase();

                        // Preload the def
                        try {
                            desc.getDef();
                        } catch (Throwable t) {
                            // ignore problems, we were only trying to preload
                        }

                        namespaceTreeNode.addChild(new TreeNode(href, desc.getName()));
                    }
                } catch (Exception x) {
                    // Skip any invalid def
                    // System.out.printf("\n*** ReferenceTreeModel.makeTreeNodes() failed to load component '%s': %s\n",
                    // desc, x.toString());
View Full Code Here

    @AuraEnabled
    public List<TreeNode> getTree() throws QuickFixException {
        if (tree == null) {
            tree = Lists.newArrayList();

            tree.add(new TreeNode("#reference", "Overview"));
            tree.add(new TreeNode(null, "Applications", makeTreeNodes("markup", ApplicationDef.class), false));
            tree.add(new TreeNode(null, "Components", makeTreeNodes("markup", ComponentDef.class), false));
            tree.add(new TreeNode(null, "Interfaces", makeTreeNodes("markup", InterfaceDef.class), false));
            tree.add(new TreeNode(null, "Events", makeTreeNodes("markup", EventDef.class), false));
            tree.add(new TreeNode(null, "Libraries", makeTreeNodes("markup", LibraryDef.class), false));

            if (isRunningInPrivilegedNamespace()) {
                tree.add(new TreeNode(null, "Tests", makeTreeNodes("js", TestSuiteDef.class), false));
            }

            tree.add(new TreeNode(null, "JavaScript API", new ApiContentsModel().getNodes(), false));

            /*
             * Javadoc not publicly accessible tree.add(new TreeNode( "http://javadoc.auraframework.org/", "Java API"));
             */
        }
View Full Code Here

        if (theSymbols != null) {
            for (Map<String, Object> symbol : theSymbols.values()) {
                String type = (String) symbol.get("kind");
                String name = (String) symbol.get("name");
                if ("class".equalsIgnoreCase(type)) {
                    nodes.add(new TreeNode("#reference?topic=api:" + name, name));
                } else {
                    types.add(type);
                }

            }
View Full Code Here

TOP

Related Classes of org.auraframework.components.ui.TreeNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.