Package org.python.pydev.core.structure

Examples of org.python.pydev.core.structure.TreeNode


        } else if (element instanceof IWorkingSet) {
            parent = ResourcesPlugin.getWorkspace().getRoot();

        } else if (element instanceof TreeNode) {
            TreeNode treeNode = (TreeNode) element;
            return treeNode.getParent();
        }

        if (parent == null) {
            parent = super.getParent(element);
        }
View Full Code Here


                }
            }
            //Keep on going to try to find a parent that'll adapt to IResource...

        } else if (next instanceof TreeNode) {
            TreeNode treeNode = (TreeNode) next;
            while (true) {
                if (treeNode instanceof InterpreterInfoTreeNodeRoot) {
                    IStructuredSelection sel = findMatchInTreeNodeRoot(f, commonViewer,
                            (InterpreterInfoTreeNodeRoot) treeNode, infosSearched);
                    if (sel != null) {
                        return sel;
                    }
                    return null;
                }
                Object parent = treeNode.getParent();
                if (parent instanceof TreeNode) {
                    treeNode = (TreeNode) parent;
                } else {
                    break;
                }
View Full Code Here

            IWorkingSet workingSet = (IWorkingSet) parent;
            currentElements.clear();
            currentElements.addAll(Arrays.asList(workingSet.getElements()));

        } else if (parent instanceof TreeNode) {
            TreeNode treeNode = (TreeNode) parent;
            currentElements.addAll(treeNode.getChildren());

        } else if (parent instanceof IProject) {
            IProject project = (IProject) parent;
            fillChildrenForProject(currentElements, project, getResourceInPythonModel(project));
        }
View Full Code Here

            IStructuredSelection externalFileSelectionInTree = pythonLinkHelper
                    .findExternalFileSelection((File) pydevZipFileStorage.zipFile);
            if (externalFileSelectionInTree != null && !externalFileSelectionInTree.isEmpty()) {
                Object firstElement = externalFileSelectionInTree.getFirstElement();
                if (firstElement instanceof TreeNode) {
                    TreeNode treeNode = (TreeNode) firstElement;
                    //Ok, got to the zip file, let's try to find the path below it...
                    String zipPath = pydevZipFileStorage.zipPath;
                    List<String> split = StringUtils.split(zipPath, '/');
                    for (String string : split) {
                        List<TreeNode> children = treeNode.getChildren();
                        for (TreeNode<LabelAndImage> child : children) {
                            if (string.equals(child.getData().label)) {
                                treeNode = child;
                                break; //Goes on to the next substring...
                            }
View Full Code Here

                IResource resource = (IResource) adapted;
                return resource.getName();
            }

        } else if (element instanceof TreeNode) {
            TreeNode treeNode = (TreeNode) element;
            Object data = treeNode.getData();
            if (data instanceof LabelAndImage) {
                return ((LabelAndImage) data).label;
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of org.python.pydev.core.structure.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.