Package org.python.pydev.core.cache

Examples of org.python.pydev.core.cache.CompleteIndexValue


            int worked = 0;
            try {
                monitor.beginTask("Get modules with token", memoryInfo.o1.size() + memoryInfo.o2.size());
                for (Tuple<CompleteIndexKey, CompleteIndexValue> tup : memoryInfo.o1) {
                    CompleteIndexKey indexKey = tup.o1;
                    CompleteIndexValue obj = tup.o2;

                    worked++;
                    if (monitor.isCanceled()) {
                        return ret;
                    }
View Full Code Here


                    this.addAstInfo(indexKey.key, true);
                } catch (Exception e) {
                    Log.log(e);
                }

                obj = new CompleteIndexValue();
            } else {
                if (DEBUG) {
                    System.out.println("Removing (file does not exist or is not a valid source module): "
                            + indexKey.key.name);
                }
                this.removeInfoFromModule(indexKey.key.name, true);
                return;
            }
        }

        long lastModified = indexKey.key.file.lastModified();
        if (lastModified == 0 || !canAddAstInfoFor) {
            //File no longer exists or is not a valid source module.
            if (DEBUG) {
                System.out.println("Removing (file no longer exists or is not a valid source module): "
                        + indexKey.key.name + " indexKey.key.file: " + indexKey.key.file + " exists: "
                        + indexKey.key.file.exists());
            }
            this.removeInfoFromModule(indexKey.key.name, true);
            return;
        }

        //if it got here, it must be a valid source module!

        if (obj.entries != null) {
            if (lastModified != indexKey.lastModified) {
                obj = new CompleteIndexValue();
                try {
                    //Recreate the entry on the new time (recreate the entry in the index and in the actual AST)
                    this.addAstInfo(indexKey.key, true);
                } catch (Exception e) {
                    Log.log(e);
View Full Code Here

        try {
            synchronized (lock) {
                addAstInfo = super.addAstInfo(node, key, generateDelta);

                if (key.file != null) {
                    completeIndex.add(new CompleteIndexKey(key), new CompleteIndexValue());
                }

            }
        } catch (Exception e) {
            Log.log(e);
View Full Code Here

TOP

Related Classes of org.python.pydev.core.cache.CompleteIndexValue

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.