Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.TreeNode


    treeViewer.setContentProvider(new TreeNodeContentProvider());
    ArrayList<String> l = new ArrayList<String>();
    l.add("a");
    l.add("b");
    l.add("c");
    TreeNode x = new TreeNode("raiz");
    x.setChildren(new TreeNode[]{new TreeNode("dos")});
    treeViewer.setInput(x);
   
    return treeViewer;
    }
View Full Code Here


   
    //hijos clase
    int i=0;
    for(EReferenceType refType : lClasses)
      {
      TreeNode[] childs=new TreeNode[]{new TreeNode("Static Fields"), new TreeNode("Static Methods"),new TreeNode("Objects")};
      roots[1].getChildren()[i++].setChildren(childs);
     
      childs[0].setChildren(toTreeNode(dataQuerier.getStaticFields(0l, event.getNanosFromStart(), refType)));
      childs[1].setChildren(toTreeNode(dataQuerier.getStaticMethods(0l, event.getNanosFromStart(), refType)));
      List<EObjectReference> lObjects = dataQuerier.getObjects(0l, event.getNanosFromStart(), refType);
      childs[2].setChildren(toTreeNode(lObjects));
     
      //hijos objetos
      int j=0;
      for(EObjectReference objRef : lObjects)
        {
        TreeNode[] objChilds=new TreeNode[]{new TreeNode("Object Fields"), new TreeNode("Object Methods")};
        childs[2].getChildren()[j++].setChildren(objChilds);
       
        objChilds[0].setChildren(toTreeNode(dataQuerier.getObjectFields(0l, event.getNanosFromStart(), objRef)));
        objChilds[1].setChildren(toTreeNode(dataQuerier.getObjectMethods(0l, event.getNanosFromStart(), objRef)));
        }
View Full Code Here

    {
    TreeNode[] ret=new TreeNode[list.size()];
   
    int i=0;
    for(Object obj : list)
      ret[i++]=new TreeNode(obj);
   
    return ret;
    }
View Full Code Here

  protected TreeNode loadEndpointSummary() {
    ContainerMarshaler marshaller = new XmlContainerMarshaller();
    RouteContainer routeContainer = marshaller.loadRoutes(xmlFileUnderTest);
    EndpointSummary summary = new EndpointSummary(routeContainer);

    TreeNode root = new TreeNode("Endpoints");
    TreeNode inputs = new TreeNode("Inputs");
    TreeNode outputs = new TreeNode("Outputs");
    inputs.setParent(root);
    outputs.setParent(root);
    root.setChildren(new TreeNode[] { inputs, outputs });

    setChildren(inputs, summary.getInputEndpoints(), true);
    setChildren(outputs, summary.getOutputEndpoints(), false);
View Full Code Here

    // lets eagerly update the widgets in case we don't view this page
    if (xmlFileUnderTest == null || fInputEndpointsTree == null) {
      return;
    }

    TreeNode root = loadEndpointSummary();
    fInputEndpointsTree.setContentProvider(new TreeNodeContentProvider());
    fInputEndpointsTree.setInput(new TreeNode[] { root });
    fInputEndpointsTree.setLabelProvider(new EndpointsLabelProvider());
    selectAllEndpoints();
    fInputEndpointsTree.expandAll();
View Full Code Here

  private void setChildren(TreeNode node, Map<String, Endpoint> endpointMap, boolean input) {
    Set<String> uris = endpointMap.keySet();
    TreeNode[] children = new TreeNode[uris.size()];
    int idx = 0;
    for (String uri : uris) {
      TreeNode child = new EndpointTreeNode(uri, input);
      child.setParent(node);
      children[idx++] = child;
    }
    node.setChildren(children);
  }
View Full Code Here

    @Override
    public void updateLabel(ViewerLabel label, TreePath elementPath) {
      Object last = elementPath.getLastSegment();
      String text = null;
      if (last instanceof TreeNode) {
        TreeNode node = (TreeNode) last;
        text = node.getValue().toString();
      } else {
        text = last.toString();
      }
      label.setText(text);
    }
View Full Code Here

            if (other.value != null)
                return false;
        } else if (!value.equals(other.getValue())) {
            return false;
        } else {
            final TreeNode parent = getParent();
            while (parent != null) {
                if (!parent.equals(other.getParent())) {
                    return false;
                }
        break;
            }
        }
View Full Code Here

            return memberName;

        } else if (packageTreeNode instanceof ComponentFolderNode) {
            return packageTreeNode.getName();
        } else if (packageTreeNode instanceof CustomObjectComponentNode) {
            TreeNode parentTreeNode = packageTreeNode.getParent();

            if (parentTreeNode instanceof CustomObjectFolderNode) {
                return ((PackageTreeNode) packageTreeNode.getParent().getParent()).getName() + Constants.DOT
                        + packageTreeNode.getName();
            } else if (parentTreeNode instanceof CustomObjectTypeNode) {
View Full Code Here

        }
        PackageManifestDocumentUtils.addMemberNode(typeNode, memberName);
    }

    private void addCustomObjectComponentNode(CustomObjectComponentNode customObjectComponentNode) {
        TreeNode parentTreeNode = customObjectComponentNode.getParent();

        if (parentTreeNode instanceof CustomObjectFolderNode) {
            Node typeNode = addParentNode(((CustomObjectFolderNode) parentTreeNode).getValue().toString());
            String memberName =
                    ((PackageTreeNode) customObjectComponentNode.getParent().getParent()).getName() + Constants.DOT
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.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.