Package org.python.pydev.editor.codecompletion.shell

Examples of org.python.pydev.editor.codecompletion.shell.AbstractShell


                        //empty block
                    } //just wait a little before a retry...
                }

                try {
                    AbstractShell shell = AbstractShell.getServerShell(manager.getNature(),
                            AbstractShell.COMPLETION_SHELL);
                    synchronized (shell) {
                        shell.clearSocket();
                    }
                    setTokens(name, manager);
                } catch (Exception e2) {
                    tokens = new HashMap<String, IToken>();
                    Log.log(e2);
View Full Code Here


    private void setTokens(String name, IModulesManager manager) throws IOException, Exception, CoreException {
        if (TRACE_COMPILED_MODULES) {
            Log.log(IStatus.INFO, ("Compiled modules: getting info for:" + name), null);
        }
        final IPythonNature nature = manager.getNature();
        AbstractShell shell = AbstractShell.getServerShell(nature, AbstractShell.COMPLETION_SHELL);
        synchronized (shell) {
            Tuple<String, List<String[]>> completions = shell.getImportCompletions(name, manager.getCompletePythonPath(
                    nature.getProjectInterpreter(), nature.getRelatedInterpreterManager())); //default

            if (TRACE_COMPILED_MODULES) {
                Log.log(IStatus.INFO, ("Compiled modules: " + name + " file: " + completions.o1 + " found: "
                        + completions.o2.size() + " completions."), null);
View Full Code Here

        if (COMPILED_MODULES_ENABLED) {
            try {
                final IPythonNature nature = manager.getNature();

                final AbstractShell shell;
                try {
                    shell = AbstractShell.getServerShell(nature, AbstractShell.COMPLETION_SHELL);
                } catch (Exception e) {
                    throw new RuntimeException("Unable to create shell for CompiledModule: " + this.name, e);
                }
                synchronized (shell) {
                    String act = name + '.' + activationToken;
                    String tokenToCompletion = act;
                    if (isPythonBuiltin) {
                        String replacement = BUILTIN_REPLACEMENTS.get(activationToken);
                        if (replacement != null) {
                            tokenToCompletion = name + '.' + replacement;
                        }
                    }

                    List<String[]> completions = shell.getImportCompletions(
                            tokenToCompletion,
                            manager.getModulesManager().getCompletePythonPath(nature.getProjectInterpreter(),
                                    nature.getRelatedInterpreterManager())).o2;

                    ArrayList<IToken> array = new ArrayList<IToken>();
View Full Code Here

                System.out.println("CompiledModule.findDefinition: found in cache.");
            }
            return found;
        }

        AbstractShell shell = AbstractShell.getServerShell(nature, AbstractShell.COMPLETION_SHELL);
        synchronized (shell) {
            Tuple<String[], int[]> def = shell.getLineCol(this.name, token, nature.getAstManager().getModulesManager()
                    .getCompletePythonPath(nature.getProjectInterpreter(), nature.getRelatedInterpreterManager())); //default
            if (def == null) {
                if (TRACE_COMPILED_MODULES) {
                    System.out.println("CompiledModule.findDefinition:" + token + " = empty");
                }
View Full Code Here

TOP

Related Classes of org.python.pydev.editor.codecompletion.shell.AbstractShell

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.