Logo Search packages:      
Sourcecode: eclipse-pydev version File versions  Download package

Tuple<String[],int []> org::python::pydev::editor::codecompletion::shell::AbstractShell::getLineCol ( String  moduleName,
String  token,
List  pythonpath 
) [inline, inherited]

moduleName the name of the module where the token is defined
token the token we are looking for
the file where the token was defined, its line and its column (or null if it was not found)

Definition at line 907 of file AbstractShell.java.

References org::python::pydev::editor::codecompletion::shell::AbstractShell::ENCODING_UTF_8, org::python::pydev::editor::codecompletion::shell::AbstractShell::internalChangePythonPath(), org::python::pydev::editor::codecompletion::shell::AbstractShell::isInOperation, and org::python::pydev::editor::codecompletion::shell::AbstractShell::sleepALittle().

Referenced by org::python::pydev::editor::codecompletion::revisited::modules::CompiledModule::findDefinition().

        isInOperation = true;
        try {
            String str = moduleName+"."+token;

            try {
                str = URLEncoder.encode(str, ENCODING_UTF_8);
                Tuple<String,List<String[]>> theCompletions = this.getTheCompletions("@@SEARCH" + str + "\nEND@@");
                List<String[]> def = theCompletions.o2;
                if(def.size() == 0){
                    return null;

                String[] comps = def.get(0);
                if(comps.length == 0){
                    return null;
                int line = Integer.parseInt(comps[0]);
                int col = Integer.parseInt(comps[1]);
                String foundAs = comps[2];
                return new Tuple<String[], int[]>(
                        new String[]{theCompletions.o1, foundAs}, 
                        new int[]{line, col});
            } catch (Exception e) {
                throw new RuntimeException(e);
        } finally {
            isInOperation = false;

Generated by  Doxygen 1.6.0   Back to index