Examples of ItemPointer


Examples of org.python.pydev.editor.model.ItemPointer

        } else if (nodesSelected.size() > 0) {
            PythonNode node = nodesSelected.iterator().next();
            ParsedItem actualObject = node.getActualObject();
            ASTEntryWithChildren astThis = actualObject.getAstThis();
            if (astThis != null) {
                new PyOpenAction().run(new ItemPointer(node.getPythonFile().getActualObject(), NodeUtils
                        .getNameTokFromNode(astThis.node)));
            }

        } else if (pythonPathZipFilesSelected.size() > 0) {
            openFiles(pythonPathZipFilesSelected.toArray(new PythonpathZipChildTreeNode[pythonPathZipFilesSelected
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

    }

    protected void openFiles(PythonpathZipChildTreeNode[] pythonPathZipFilesSelected) {
        PyOpenAction pyOpenAction = new PyOpenAction();
        for (PythonpathZipChildTreeNode n : pythonPathZipFilesSelected) {
            pyOpenAction.run(new ItemPointer(n.zipStructure.file, new Location(), new Location(), null, n.zipPath));
        }
    }
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

    }

    protected void openFiles(PythonpathTreeNode[] pythonPathFilesSelected) {
        PyOpenAction pyOpenAction = new PyOpenAction();
        for (PythonpathTreeNode n : pythonPathFilesSelected) {
            pyOpenAction.run(new ItemPointer(n.file));
        }
    }
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

     */
    protected void openFiles(List<IFile> filesSelected) {
        for (IFile f : filesSelected) {
            //If a file is opened here, set it as having the Pydev editor as the default editor.
            IDE.setDefaultEditor(f, PyEdit.EDITOR_ID);
            new PyOpenAction().run(new ItemPointer(f));
        }
    }
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

     * @param pointers: OUT: list where the pointers will be added
     * @param definitions the definitions that will be gotten as pointers
     */
    public static void getAsPointers(List<ItemPointer> pointers, IDefinition[] definitions) {
        for (IDefinition definition : definitions) {
            ItemPointer itemPointer = createItemPointer(definition);
            pointers.add(itemPointer);
        }
    }
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

    public static ItemPointer createItemPointer(IDefinition definition) {
        File file = definition.getModule().getFile();
        int line = definition.getLine();
        int col = definition.getCol();

        ItemPointer itemPointer = new ItemPointer(file, new Location(line - 1, col - 1),
                new Location(line - 1, col - 1), (Definition) definition, definition.getModule().getZipFilePath());
        return itemPointer;
    }
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

                    temp.append("</pydev_hint_bold>");
                    temp.append(PyInformationPresenter.LINE_DELIM);
                }

                if (def.module != null && def.value != null) {
                    ItemPointer pointer = PyRefactoringFindDefinition.createItemPointer(def);
                    String asPortableString = pointer.asPortableString();
                    if (asPortableString != null) {
                        //may happen if file is not in the pythonpath
                        temp.replaceAll(
                                "<pydev_hint_bold>",
                                com.aptana.shared_core.string.StringUtils.format("<pydev_link pointer=\"%s\">",
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

    }

    public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
        //Upon creation, opens the new editor and creates the class.
        PyOpenAction openAction = new PyOpenAction();
        openAction.run(new ItemPointer(module));
        PyEdit pyEdit = (PyEdit) openAction.editor;
        TddRefactorCompletion completion = new TddRefactorCompletion(fReplacementString, fImage, fDisplayString,
                fContextInformation, fAdditionalProposalInfo, 0, pyEdit, locationStrategy, parametersAfterCall,
                pyCreateAction, ps);
        completion.apply(pyEdit.getEditorSourceViewer(), '\n', 0, 0);
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

            return;
        }

        if (where.length > 0) {
            if (where.length == 1) {
                ItemPointer itemPointer = where[0];
                doOpen(itemPointer, pyEdit, shell);
            } else {
                //the user has to choose which is the correct definition...
                final Display disp = shell.getDisplay();
                disp.syncExec(new Runnable() {

                    public void run() {
                        ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, new ILabelProvider() {

                            public Image getImage(Object element) {
                                return PyCodeCompletionImages.getImageForType(IToken.TYPE_PACKAGE);
                            }

                            public String getText(Object element) {
                                ItemPointer pointer = (ItemPointer) element;
                                File f = (File) (pointer).file;
                                int line = pointer.start.line;
                                return f.getName() + "  (" + f.getParent() + ") - line:" + line;
                            }
View Full Code Here

Examples of org.python.pydev.editor.model.ItemPointer

            }
        }

        //Upon creation, opens the new editor and creates the class.
        PyOpenAction openAction = new PyOpenAction();
        openAction.run(new ItemPointer(file));

        PyEdit pyEdit = (PyEdit) openAction.editor;
        TddRefactorCompletion completion = new TddRefactorCompletion(fReplacementString, fImage, fDisplayString,
                fContextInformation, fAdditionalProposalInfo, 0, pyEdit, PyCreateClass.LOCATION_STRATEGY_END,
                parametersAfterCall, pyCreateAction, ps);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.