Search in sources :

Example 1 with EmptyModuleForZip

use of org.python.pydev.ast.codecompletion.revisited.modules.EmptyModuleForZip in project Pydev by fabioz.

the class ModulesManager method getModule.

/**
 * This method returns the module that corresponds to the path passed as a parameter.
 *
 * @param name the name of the module we're looking for  (e.g.: mod1.mod2)
 * @param dontSearchInit is used in a negative form because initially it was isLookingForRelative, but
 * it actually defines if we should look in __init__ modules too, so, the name matches the old signature.
 *
 * NOTE: isLookingForRelative description was: when looking for relative imports, we don't check for __init__
 * @return the module represented by this name
 */
protected IModule getModule(boolean acceptCompiledModule, String name, IPythonNature nature, boolean dontSearchInit, IModuleRequestState moduleRequest) {
    synchronized (lockTemporaryModules) {
        SortedMap<Integer, IModule> map = temporaryModules.get(name);
        if (map != null && map.size() > 0) {
            if (DEBUG_TEMPORARY_MODULES) {
                System.out.println("Returning temporary module: " + name);
            }
            return map.get(map.lastKey());
        }
    }
    AbstractModule n = null;
    ModulesKey keyForCacheAccess = new ModulesKey(null, null);
    if (!dontSearchInit) {
        if (n == null) {
            keyForCacheAccess.name = (String) StringUtils.join(".", new String[] { name, "__init__" }, null);
            n = cache.getObj(keyForCacheAccess, this);
            if (n != null) {
                name = keyForCacheAccess.name;
            }
        }
    }
    if (n == null) {
        keyForCacheAccess.name = name;
        n = cache.getObj(keyForCacheAccess, this);
    }
    if (n instanceof SourceModule) {
        // ok, module exists, let's check if it is synched with the filesystem version...
        SourceModule s = (SourceModule) n;
        if (!s.isSynched()) {
            // change it for an empty and proceed as usual.
            n = (AbstractModule) addModule(createModulesKey(s.getName(), s.getFile()));
        }
    }
    if (n instanceof EmptyModule) {
        EmptyModule e = (EmptyModule) n;
        if (e.f != null) {
            if (!e.f.exists()) {
                // if the file does not exist anymore, just remove it.
                keyForCacheAccess.name = name;
                keyForCacheAccess.file = e.f;
                doRemoveSingleModule(keyForCacheAccess);
                n = null;
            } else {
                // file exists
                n = checkOverride(name, nature, n);
                if (n instanceof EmptyModule) {
                    // ok, handle case where the file is actually from a zip file...
                    if (e instanceof EmptyModuleForZip) {
                        EmptyModuleForZip emptyModuleForZip = (EmptyModuleForZip) e;
                        if (emptyModuleForZip.pathInZip.endsWith(".class") || !emptyModuleForZip.isFile) {
                            // handle java class... (if it's a class or a folder in a jar)
                            try {
                                if (createModuleFromJar != null) {
                                    n = createModuleFromJar.call(emptyModuleForZip, nature);
                                    n = decorateModule(n, nature);
                                } else {
                                    n = null;
                                }
                            } catch (Throwable e1) {
                                Log.log("Unable to create module from jar (note: JDT is required for Jython development): " + emptyModuleForZip + " project: " + (nature != null ? nature.getProject() : "null"), e1);
                                n = null;
                            }
                        } else if (FileTypesPreferences.isValidDll(emptyModuleForZip.pathInZip)) {
                            // .pyd
                            n = new CompiledModule(name, this, nature);
                            n = decorateModule(n, nature);
                        } else if (PythonPathHelper.isValidSourceFile(emptyModuleForZip.pathInZip)) {
                            // handle python file from zip... we have to create it getting the contents from the zip file
                            try {
                                IDocument doc = FileUtilsFileBuffer.getDocFromZip(emptyModuleForZip.f, emptyModuleForZip.pathInZip);
                                // NOTE: The nature (and so the grammar to be used) must be defined by this modules
                                // manager (and not by the initial caller)!!
                                n = AbstractModule.createModuleFromDoc(name, emptyModuleForZip.f, doc, this.getNature(), false);
                                SourceModule zipModule = (SourceModule) n;
                                zipModule.zipFilePath = emptyModuleForZip.pathInZip;
                                n = decorateModule(n, nature);
                            } catch (Exception exc1) {
                                Log.log(exc1);
                                n = null;
                            }
                        }
                    } else if (e instanceof EmptyModuleForFolder) {
                        try {
                            n = new InitFromDirModule(name, e.f, new Module(new stmtType[0]), null, this.getNature());
                            n = decorateModule(n, nature);
                        } catch (Exception e1) {
                            Log.log(e1);
                            n = null;
                        }
                    } else {
                        // regular case... just go on and create it.
                        try {
                            // NOTE: The nature (and so the grammar to be used) must be defined by this modules
                            // manager (and not by the initial caller)!!
                            n = AbstractModule.createModule(name, e.f, this.getNature(), true);
                            n = decorateModule(n, nature);
                        } catch (IOException exc) {
                            keyForCacheAccess.name = name;
                            keyForCacheAccess.file = e.f;
                            doRemoveSingleModule(keyForCacheAccess);
                            n = null;
                        } catch (MisconfigurationException exc) {
                            Log.log(exc);
                            n = null;
                        }
                    }
                }
            }
        } else {
            // ok, it does not have a file associated, so, we treat it as a builtin (this can happen in java jars)
            n = checkOverride(name, nature, n);
            if (n instanceof EmptyModule) {
                if (acceptCompiledModule) {
                    n = new CompiledModule(name, this, nature);
                    n = decorateModule(n, nature);
                } else {
                    return null;
                }
            }
        }
        if (n != null) {
            doAddSingleModule(createModulesKey(name, e.f), n);
        } else {
            Log.log(("The module " + name + " could not be found nor created!"));
        }
    }
    if (n instanceof EmptyModule) {
        throw new RuntimeException("Should not be an empty module anymore: " + n);
    }
    if (n instanceof SourceModule) {
        SourceModule sourceModule = (SourceModule) n;
        // now, here's a catch... it may be a bootstrap module...
        if (sourceModule.isBootstrapModule()) {
            // if it's a bootstrap module, we must replace it for the related compiled module.
            n = new CompiledModule(name, this, nature);
            n = decorateModule(n, nature);
        }
    }
    return n;
}
Also used : SourceModule(org.python.pydev.ast.codecompletion.revisited.modules.SourceModule) IModule(org.python.pydev.core.IModule) InitFromDirModule(org.python.pydev.ast.codecompletion.revisited.modules.InitFromDirModule) org.python.pydev.parser.jython.ast.stmtType(org.python.pydev.parser.jython.ast.stmtType) MisconfigurationException(org.python.pydev.core.MisconfigurationException) EmptyModuleForZip(org.python.pydev.ast.codecompletion.revisited.modules.EmptyModuleForZip) IOException(java.io.IOException) IOException(java.io.IOException) MisconfigurationException(org.python.pydev.core.MisconfigurationException) AbstractModule(org.python.pydev.ast.codecompletion.revisited.modules.AbstractModule) EmptyModuleForFolder(org.python.pydev.ast.codecompletion.revisited.modules.EmptyModuleForFolder) ModulesKey(org.python.pydev.core.ModulesKey) CompiledModule(org.python.pydev.ast.codecompletion.revisited.modules.CompiledModule) AbstractModule(org.python.pydev.ast.codecompletion.revisited.modules.AbstractModule) IModule(org.python.pydev.core.IModule) Module(org.python.pydev.parser.jython.ast.Module) InitFromDirModule(org.python.pydev.ast.codecompletion.revisited.modules.InitFromDirModule) SourceModule(org.python.pydev.ast.codecompletion.revisited.modules.SourceModule) CompiledModule(org.python.pydev.ast.codecompletion.revisited.modules.CompiledModule) EmptyModule(org.python.pydev.ast.codecompletion.revisited.modules.EmptyModule) EmptyModule(org.python.pydev.ast.codecompletion.revisited.modules.EmptyModule) IDocument(org.eclipse.jface.text.IDocument)

Example 2 with EmptyModuleForZip

use of org.python.pydev.ast.codecompletion.revisited.modules.EmptyModuleForZip in project Pydev by fabioz.

the class PydevPlugin method start.

@SuppressWarnings({ "rawtypes", "restriction" })
@Override
public void start(BundleContext context) throws Exception {
    this.isAlive = true;
    super.start(context);
    // Setup extensions in dependencies
    // Setup extensions in dependencies
    // Setup extensions in dependencies
    // Setup extensions in dependencies (could actually be done as extension points, but done like this for
    // ease of implementation right now).
    AbstractTemplateCodeCompletion.getTemplateContextType = () -> TemplateHelper.getContextTypeRegistry().getContextType(PyContextType.PY_COMPLETIONS_CONTEXT_TYPE);
    CompletionProposalFactory.set(new DefaultCompletionProposalFactory());
    ProjectModulesManager.createJavaProjectModulesManagerIfPossible = (IProject project) -> JavaProjectModulesManagerCreator.createJavaProjectModulesManagerIfPossible(project);
    ModulesManager.createModuleFromJar = (EmptyModuleForZip emptyModuleForZip, IPythonNature nature) -> JythonModulesManagerUtils.createModuleFromJar(emptyModuleForZip, nature);
    CorePlugin.pydevStatelocation = Platform.getStateLocation(getBundle()).toFile();
    PyLintPreferences.createPyLintStream = ((IAdaptable projectAdaptable) -> {
        if (PyLintPreferences.useConsole(projectAdaptable)) {
            IOConsoleOutputStream console = MessageConsoles.getConsoleOutputStream("PyLint", UIConstants.PY_LINT_ICON);
            return ((string) -> {
                console.write(string);
            });
        } else {
            return null;
        }
    });
    Flake8Preferences.createFlake8Stream = ((IAdaptable projectAdaptable) -> {
        if (Flake8Preferences.useFlake8Console(projectAdaptable)) {
            IOConsoleOutputStream console = MessageConsoles.getConsoleOutputStream("Flake8", UIConstants.FLAKE8_ICON);
            return ((string) -> {
                console.write(string);
            });
        } else {
            return null;
        }
    });
    MypyPreferences.createMypyStream = ((IAdaptable projectAdaptable) -> {
        if (MypyPreferences.useMypyConsole(projectAdaptable)) {
            IOConsoleOutputStream console = MessageConsoles.getConsoleOutputStream("Mypy", UIConstants.MYPY_ICON);
            return ((string) -> {
                console.write(string);
            });
        } else {
            return null;
        }
    });
    JavaVmLocationFinder.callbackJavaJars = () -> {
        try {
            IVMInstall defaultVMInstall = JavaRuntime.getDefaultVMInstall();
            LibraryLocation[] libraryLocations = JavaRuntime.getLibraryLocations(defaultVMInstall);
            ArrayList<File> jars = new ArrayList<File>();
            for (LibraryLocation location : libraryLocations) {
                jars.add(location.getSystemLibraryPath().toFile());
            }
            return jars;
        } catch (Throwable e) {
            JythonModulesManagerUtils.tryRethrowAsJDTNotAvailableException(e);
            throw new RuntimeException("Should never get here", e);
        }
    };
    JavaVmLocationFinder.callbackJavaExecutable = () -> {
        try {
            IVMInstall defaultVMInstall = JavaRuntime.getDefaultVMInstall();
            File installLocation = defaultVMInstall.getInstallLocation();
            return StandardVMType.findJavaExecutable(installLocation);
        } catch (Throwable e) {
            JythonModulesManagerUtils.tryRethrowAsJDTNotAvailableException(e);
            throw new RuntimeException("Should never get here", e);
        }
    };
    PyLinkedModeCompletionProposal.goToLinkedModeHandler = (PyLinkedModeCompletionProposal proposal, ITextViewer viewer, int offset, IDocument doc, int exitPos, int iPar, List<Integer> offsetsAndLens) -> {
        LinkedModeModel model = new LinkedModeModel();
        for (int i = 0; i < offsetsAndLens.size(); i++) {
            Integer offs = offsetsAndLens.get(i);
            i++;
            Integer len = offsetsAndLens.get(i);
            if (i == 1) {
                proposal.firstParameterLen = len;
            }
            int location = offset + iPar + offs + 1;
            LinkedPositionGroup group = new LinkedPositionGroup();
            ProposalPosition proposalPosition = new ProposalPosition(doc, location, len, 0, new ICompletionProposal[0]);
            group.addPosition(proposalPosition);
            model.addGroup(group);
        }
        model.forceInstall();
        final LinkedModeUI ui = new EditorLinkedModeUI(model, viewer);
        // set it to request the ctx info from the completion processor
        ui.setDoContextInfo(true);
        ui.setExitPosition(viewer, exitPos, 0, Integer.MAX_VALUE);
        Runnable r = new Runnable() {

            @Override
            public void run() {
                ui.enter();
            }
        };
        RunInUiThread.async(r);
    };
    /**
     * Given a passed tree, selects the elements on the tree (and returns the selected elements in a flat list).
     */
    SyncSystemModulesManager.selectElementsInDialog = (final DataAndImageTreeNode root, List<TreeNode> initialSelection) -> {
        List<TreeNode> selectElements = SelectNDialog.selectElements(root, new TreeNodeLabelProvider() {

            @Override
            public org.eclipse.swt.graphics.Image getImage(Object element) {
                DataAndImageTreeNode n = (DataAndImageTreeNode) element;
                return ImageCache.asImage(n.image);
            }

            @Override
            public String getText(Object element) {
                TreeNode n = (TreeNode) element;
                Object data = n.getData();
                if (data == null) {
                    return "null";
                }
                if (data instanceof IInterpreterInfo) {
                    IInterpreterInfo iInterpreterInfo = (IInterpreterInfo) data;
                    return iInterpreterInfo.getNameForUI();
                }
                return data.toString();
            }
        }, "System PYTHONPATH changes detected", "Please check which interpreters and paths should be updated.", true, initialSelection);
        return selectElements;
    };
    InterpreterInfo.selectLibraries = new IPythonSelectLibraries() {

        @Override
        public List<String> select(List<String> selection, List<String> toAsk) throws CancelException {
            // true == OK, false == CANCELLED
            boolean result = true;
            PythonSelectionLibrariesDialog runnable = new PythonSelectionLibrariesDialog(selection, toAsk, true);
            try {
                RunInUiThread.sync(runnable);
            } catch (NoClassDefFoundError e) {
            } catch (UnsatisfiedLinkError e) {
            // this means that we're running unit-tests, so, we don't have to do anything about it
            // as 'l' is already ok.
            }
            result = runnable.getOkResult();
            if (result == false) {
                // Canceled by the user
                throw new CancelException();
            }
            return runnable.getSelection();
        }
    };
    org.python.pydev.shared_core.log.ToLogFile.afterOnToLogFile = (final String buffer) -> {
        final Runnable r = new Runnable() {

            @Override
            public void run() {
                synchronized (org.python.pydev.shared_core.log.ToLogFile.lock) {
                    try {
                        // Print to console view (must be in UI thread).
                        IOConsoleOutputStream c = org.python.pydev.shared_ui.log.ToLogFile.getConsoleOutputStream();
                        c.write(buffer.toString());
                        c.write(System.lineSeparator());
                    } catch (Throwable e) {
                        Log.log(e);
                    }
                }
            }
        };
        RunInUiThread.async(r, true);
        return null;
    };
    AbstractInterpreterManager.configWhenInterpreterNotAvailable = (manager) -> {
        // If we got here, the interpreter is not properly configured, let's try to auto-configure it
        if (PyDialogHelpers.getAskAgainInterpreter(manager)) {
            configureInterpreterJob.addInterpreter(manager);
            configureInterpreterJob.schedule(50);
        }
        return null;
    };
    AbstractInterpreterManager.errorCreatingInterpreterInfo = (title, reason) -> {
        try {
            final Display disp = Display.getDefault();
            disp.asyncExec(new Runnable() {

                @Override
                public void run() {
                    ErrorDialog.openError(null, title, "Unable to get information on interpreter!", new Status(Status.ERROR, PydevPlugin.getPluginID(), 0, reason, null));
                }
            });
        } catch (Throwable e) {
        // ignore error communication error
        }
        return null;
    };
    try {
        resourceBundle = ResourceBundle.getBundle("org.python.pydev.PyDevPluginResources");
    } catch (MissingResourceException x) {
        resourceBundle = null;
    }
    final IEclipsePreferences preferences = PydevPrefs.getEclipsePreferences();
    // set them temporarily
    // setPythonInterpreterManager(new StubInterpreterManager(true));
    // setJythonInterpreterManager(new StubInterpreterManager(false));
    // changed: the interpreter manager is always set in the initialization (initialization
    // has some problems if that's not done).
    InterpreterManagersAPI.setPythonInterpreterManager(new PythonInterpreterManager(preferences));
    InterpreterManagersAPI.setJythonInterpreterManager(new JythonInterpreterManager(preferences));
    InterpreterManagersAPI.setIronpythonInterpreterManager(new IronpythonInterpreterManager(preferences));
    // This is usually fast, but in lower end machines it could be a bit slow, so, let's do it in a job to make sure
    // that the plugin is properly initialized without any delays.
    startSynchSchedulerJob.schedule(1000);
// restore the nature for all python projects -- that's done when the project is set now.
// new Job("PyDev: Restoring projects python nature"){
// 
// protected IStatus run(IProgressMonitor monitor) {
// try{
// 
// IProject[] projects = getWorkspace().getRoot().getProjects();
// for (int i = 0; i < projects.length; i++) {
// IProject project = projects[i];
// try {
// if (project.isOpen() && project.hasNature(PythonNature.PYTHON_NATURE_ID)) {
// PythonNature.addNature(project, monitor, null, null);
// }
// } catch (Exception e) {
// PydevPlugin.log(e);
// }
// }
// }catch(Throwable t){
// t.printStackTrace();
// }
// return Status.OK_STATUS;
// }
// 
// }.schedule();
}
Also used : MessageConsoles(org.python.pydev.consoles.MessageConsoles) AbstractTemplateCodeCompletion(org.python.pydev.ast.codecompletion.AbstractTemplateCodeCompletion) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) IPythonNature(org.python.pydev.core.IPythonNature) JythonModulesManagerUtils(org.python.pydev.editor.codecompletion.revisited.javaintegration.JythonModulesManagerUtils) TemplateHelper(org.python.pydev.editor.templates.TemplateHelper) PythonNature(org.python.pydev.plugin.nature.PythonNature) ErrorDialog(org.eclipse.jface.dialogs.ErrorDialog) InterpreterManagersAPI(org.python.pydev.ast.interpreter_managers.InterpreterManagersAPI) FileUtils(org.python.pydev.shared_core.io.FileUtils) BackingStoreException(org.osgi.service.prefs.BackingStoreException) PythonSelectionLibrariesDialog(org.python.pydev.ui.pythonpathconf.PythonSelectionLibrariesDialog) IStatus(org.eclipse.core.runtime.IStatus) SyncSystemModulesManager(org.python.pydev.ast.codecompletion.revisited.SyncSystemModulesManager) PyLinkedModeCompletionProposal(org.python.pydev.editor.codecompletion.proposals.PyLinkedModeCompletionProposal) IPath(org.eclipse.core.runtime.IPath) PropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent) SharedUiPlugin(org.python.pydev.shared_ui.SharedUiPlugin) MypyPreferences(com.python.pydev.analysis.mypy.MypyPreferences) IEclipsePreferences(org.eclipse.core.runtime.preferences.IEclipsePreferences) LinkedPositionGroup(org.eclipse.jface.text.link.LinkedPositionGroup) FormColors(org.eclipse.ui.forms.FormColors) LibraryLocation(org.eclipse.jdt.launching.LibraryLocation) AbstractInterpreterManager(org.python.pydev.ast.interpreter_managers.AbstractInterpreterManager) UIConstants(org.python.pydev.shared_core.image.UIConstants) ProposalPosition(org.eclipse.jface.text.link.ProposalPosition) IAdaptable(org.eclipse.core.runtime.IAdaptable) SharedCorePlugin(org.python.pydev.shared_core.SharedCorePlugin) IBundleInfo(org.python.pydev.shared_ui.bundle.IBundleInfo) DefaultSyncSystemModulesManagerScheduler(org.python.pydev.ast.codecompletion.revisited.DefaultSyncSystemModulesManagerScheduler) IPythonSelectLibraries(org.python.pydev.ast.interpreter_managers.InterpreterInfo.IPythonSelectLibraries) MissingResourceException(java.util.MissingResourceException) Set(java.util.Set) Status(org.eclipse.core.runtime.Status) BundleInfo(org.python.pydev.shared_ui.bundle.BundleInfo) Display(org.eclipse.swt.widgets.Display) JavaProjectModulesManagerCreator(org.python.pydev.editor.codecompletion.revisited.javaintegration.JavaProjectModulesManagerCreator) BundleContext(org.osgi.framework.BundleContext) IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) PyContextType(org.python.pydev.editor.templates.PyContextType) ImageCache(org.python.pydev.shared_ui.ImageCache) List(java.util.List) InstanceScope(org.eclipse.core.runtime.preferences.InstanceScope) Flake8Preferences(com.python.pydev.analysis.flake8.Flake8Preferences) PydevCombiningHover(org.python.pydev.editor.hover.PydevCombiningHover) TreeNodeLabelProvider(org.python.pydev.ui.dialogs.TreeNodeLabelProvider) CorePlugin(org.python.pydev.core.CorePlugin) EditorLinkedModeUI(org.eclipse.ui.texteditor.link.EditorLinkedModeUI) PydevPrefs(org.python.pydev.core.preferences.PydevPrefs) ResourcesPlugin(org.eclipse.core.resources.ResourcesPlugin) IVMInstall(org.eclipse.jdt.launching.IVMInstall) PyHoverPreferencesPage(org.python.pydev.editor.hover.PyHoverPreferencesPage) PythonInterpreterManager(org.python.pydev.ast.interpreter_managers.PythonInterpreterManager) LinkedModeModel(org.eclipse.jface.text.link.LinkedModeModel) EmptyModuleForZip(org.python.pydev.ast.codecompletion.revisited.modules.EmptyModuleForZip) ArrayList(java.util.ArrayList) PyEditorTextHoverDescriptor(org.python.pydev.editor.hover.PyEditorTextHoverDescriptor) HashSet(java.util.HashSet) JavaRuntime(org.eclipse.jdt.launching.JavaRuntime) DataAndImageTreeNode(org.python.pydev.shared_core.structure.DataAndImageTreeNode) IDocument(org.eclipse.jface.text.IDocument) AbstractShell(org.python.pydev.ast.codecompletion.shell.AbstractShell) ResourceBundle(java.util.ResourceBundle) IProject(org.eclipse.core.resources.IProject) SelectNDialog(org.python.pydev.ui.dialogs.SelectNDialog) IWorkspace(org.eclipse.core.resources.IWorkspace) ProjectModulesManager(org.python.pydev.ast.codecompletion.revisited.ProjectModulesManager) IConfigurationElement(org.eclipse.core.runtime.IConfigurationElement) DefaultCompletionProposalFactory(org.python.pydev.editor.codecompletion.proposals.DefaultCompletionProposalFactory) AbstractUIPlugin(org.eclipse.ui.plugin.AbstractUIPlugin) ICompletionProposal(org.eclipse.jface.text.contentassist.ICompletionProposal) ITextViewer(org.eclipse.jface.text.ITextViewer) StandardVMType(org.eclipse.jdt.internal.launching.StandardVMType) IPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) IOConsoleOutputStream(org.eclipse.ui.console.IOConsoleOutputStream) PyLintPreferences(com.python.pydev.analysis.pylint.PyLintPreferences) CancelException(org.python.pydev.shared_core.progress.CancelException) Job(org.eclipse.core.runtime.jobs.Job) ModulesManager(org.python.pydev.ast.codecompletion.revisited.ModulesManager) TreeNode(org.python.pydev.shared_core.structure.TreeNode) FormToolkit(org.eclipse.ui.forms.widgets.FormToolkit) CompletionProposalFactory(org.python.pydev.core.proposals.CompletionProposalFactory) JavaVmLocationFinder(org.python.pydev.ast.listing_utils.JavaVmLocationFinder) File(java.io.File) ImageDescriptor(org.eclipse.jface.resource.ImageDescriptor) JythonInterpreterManager(org.python.pydev.ast.interpreter_managers.JythonInterpreterManager) RunInUiThread(org.python.pydev.shared_ui.utils.RunInUiThread) PyDialogHelpers(org.python.pydev.ui.dialogs.PyDialogHelpers) InterpreterInfo(org.python.pydev.ast.interpreter_managers.InterpreterInfo) LinkedModeUI(org.eclipse.jface.text.link.LinkedModeUI) IronpythonInterpreterManager(org.python.pydev.ast.interpreter_managers.IronpythonInterpreterManager) Color(org.eclipse.swt.graphics.Color) ColorCache(org.python.pydev.shared_ui.ColorCache) Platform(org.eclipse.core.runtime.Platform) IInterpreterInfo(org.python.pydev.core.IInterpreterInfo) Log(org.python.pydev.core.log.Log) IAdaptable(org.eclipse.core.runtime.IAdaptable) EditorLinkedModeUI(org.eclipse.ui.texteditor.link.EditorLinkedModeUI) PythonSelectionLibrariesDialog(org.python.pydev.ui.pythonpathconf.PythonSelectionLibrariesDialog) IOConsoleOutputStream(org.eclipse.ui.console.IOConsoleOutputStream) MissingResourceException(java.util.MissingResourceException) ArrayList(java.util.ArrayList) EmptyModuleForZip(org.python.pydev.ast.codecompletion.revisited.modules.EmptyModuleForZip) LinkedModeModel(org.eclipse.jface.text.link.LinkedModeModel) JythonInterpreterManager(org.python.pydev.ast.interpreter_managers.JythonInterpreterManager) DataAndImageTreeNode(org.python.pydev.shared_core.structure.DataAndImageTreeNode) TreeNode(org.python.pydev.shared_core.structure.TreeNode) List(java.util.List) ArrayList(java.util.ArrayList) IronpythonInterpreterManager(org.python.pydev.ast.interpreter_managers.IronpythonInterpreterManager) IStatus(org.eclipse.core.runtime.IStatus) Status(org.eclipse.core.runtime.Status) PythonInterpreterManager(org.python.pydev.ast.interpreter_managers.PythonInterpreterManager) DataAndImageTreeNode(org.python.pydev.shared_core.structure.DataAndImageTreeNode) DefaultCompletionProposalFactory(org.python.pydev.editor.codecompletion.proposals.DefaultCompletionProposalFactory) ITextViewer(org.eclipse.jface.text.ITextViewer) IVMInstall(org.eclipse.jdt.launching.IVMInstall) EditorLinkedModeUI(org.eclipse.ui.texteditor.link.EditorLinkedModeUI) LinkedModeUI(org.eclipse.jface.text.link.LinkedModeUI) CancelException(org.python.pydev.shared_core.progress.CancelException) File(java.io.File) IDocument(org.eclipse.jface.text.IDocument) IEclipsePreferences(org.eclipse.core.runtime.preferences.IEclipsePreferences) IPythonNature(org.python.pydev.core.IPythonNature) LibraryLocation(org.eclipse.jdt.launching.LibraryLocation) PyLinkedModeCompletionProposal(org.python.pydev.editor.codecompletion.proposals.PyLinkedModeCompletionProposal) TreeNodeLabelProvider(org.python.pydev.ui.dialogs.TreeNodeLabelProvider) IProject(org.eclipse.core.resources.IProject) IPythonSelectLibraries(org.python.pydev.ast.interpreter_managers.InterpreterInfo.IPythonSelectLibraries) LinkedPositionGroup(org.eclipse.jface.text.link.LinkedPositionGroup) ProposalPosition(org.eclipse.jface.text.link.ProposalPosition) IInterpreterInfo(org.python.pydev.core.IInterpreterInfo) Display(org.eclipse.swt.widgets.Display)

Aggregations

IDocument (org.eclipse.jface.text.IDocument)2 Flake8Preferences (com.python.pydev.analysis.flake8.Flake8Preferences)1 MypyPreferences (com.python.pydev.analysis.mypy.MypyPreferences)1 PyLintPreferences (com.python.pydev.analysis.pylint.PyLintPreferences)1 File (java.io.File)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 List (java.util.List)1 MissingResourceException (java.util.MissingResourceException)1 ResourceBundle (java.util.ResourceBundle)1 Set (java.util.Set)1 IProject (org.eclipse.core.resources.IProject)1 IWorkspace (org.eclipse.core.resources.IWorkspace)1 ResourcesPlugin (org.eclipse.core.resources.ResourcesPlugin)1 IAdaptable (org.eclipse.core.runtime.IAdaptable)1 IConfigurationElement (org.eclipse.core.runtime.IConfigurationElement)1 IPath (org.eclipse.core.runtime.IPath)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 IStatus (org.eclipse.core.runtime.IStatus)1