Package org.python.pydev.editor.model

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


                link = new FileLink(files[0], null, -1, -1, num);
            else {
                // files outside of the workspace
                File realFile = new File(fileName);
                if (!onlyCreateLinksForExistingFiles || realFile.exists()) {
                    ItemPointer p = new ItemPointer(realFile, new Location(num - 1, 0), null);
                    link = new ConsoleLink(p);
                }
            }
            if (link != null) {
                linkContainer.addLink(link, lineOffset + fileStart, lineLength - fileStart);
View Full Code Here


    @Override
    protected void openFiles(PythonpathZipChildTreeNode[] pythonPathFilesSelected) {
        for (PythonpathZipChildTreeNode n : pythonPathFilesSelected) {
            try {
                if (PythonPathHelper.isValidSourceFile(n.zipPath)) {
                    new PyOpenAction().run(new ItemPointer(n.zipStructure.file, new Location(), new Location(), null,
                            n.zipPath));
                } else {
                    IEditorRegistry editorReg = PlatformUI.getWorkbench().getEditorRegistry();
                    IEditorDescriptor defaultEditor = editorReg.getDefaultEditor(n.zipPath);
                    PydevZipFileStorage storage = new PydevZipFileStorage(n.zipStructure.file, n.zipPath);
View Full Code Here

    }

    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

    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

            if (result != null && result.length > 0) {
                @SuppressWarnings("unchecked")
                TreeNode<OutlineEntry> n = (TreeNode<OutlineEntry>) result[0];
                OutlineEntry outlineEntry = n.data;
                if (outlineEntry.model == null) {
                    Location location = new Location(NodeUtils.getNameLineDefinition(outlineEntry.node) - 1,
                            NodeUtils.getNameColDefinition(outlineEntry.node) - 1);
                    new PyOpenAction().showInEditor(pyEdit, location, location);
                } else {
                    PyOpenAction pyOpenAction = new PyOpenAction();
                    IModule m = outlineEntry.model.module;
View Full Code Here

TOP

Related Classes of org.python.pydev.editor.model.Location

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.