Examples of ImportInfo


Examples of com.python.pydev.analysis.visitors.ImportChecker.ImportInfo

        //only report undefined imports if we're not inside a try..except ImportError.
        boolean reportUndefinedImports = withinExceptNode == null;

        boolean requireTokensToBeImports = false;
        ImportInfo importInfo = null;
        if (generator != null) {
            //it will only enter here if it is a wild import (for other imports, the generator is equal to the
            //import)
            if (!generator.isImport()) {
                throw new RuntimeException(
View Full Code Here

Examples of com.python.pydev.analysis.visitors.ImportChecker.ImportInfo

     * @param map this is the map that contains the imports Found occurrences (it has to be passed,
     * as there is a map for the imports that are actually in the namespace and another for those
     * that are 'artificially' generated).
     */
    private void addFoundToImportsMap(Found found, Map<String, List<Tuple3<Found, Integer, ASTEntry>>> map) {
        ImportInfo info = found.importInfo;
        String modName = UNRESOLVED_MOD_NAME;
        if (info != null && info.mod != null) {
            modName = info.mod.getName();
        }
        List<Tuple3<Found, Integer, ASTEntry>> prev = map.get(modName);
View Full Code Here

Examples of com.python.pydev.analysis.visitors.ImportChecker.ImportInfo

                importTok.beginColumn = tokModName.beginColumn;

                List<IToken> createdTokens = AbstractVisitor.makeImportToken(importTok, null, this.current.getName(),
                        true);
                for (IToken token : createdTokens) {
                    ImportInfo info = this.scope.importChecker.visitImportToken(token, false, this.completionCache);
                    Found found = new Found(token, token, scope.getCurrScopeId(), scope.getCurrScopeItems());
                    found.importInfo = info;

                    checkFound(found, peekParent()); //check if this is actually a match
                    addFoundToImportsMap(found, importsFoundFromModuleName);
View Full Code Here

Examples of com.python.pydev.analysis.visitors.ImportChecker.ImportInfo

            return false;
        }
        //now, there's a catch here... the import checker will make the module 'resolved' for any token it found, even
        //if it doesn't end up matching with the token we're looking for... so, we must keep on going with the
        //import definitions until we actually find what we're looking for.
        ImportInfo info = found.importInfo;
        if (info != null && info.wasResolved) {
            if (info.rep.length() != 0 && info.token.isImport()) {
                //we only actually had a match with a module if the representation found is empty
                Definition definition = info.getModuleDefinitionFromImportInfo(nature, this.completionCache);
                if (definition != null && definition.module.getName().equals(this.moduleToFind.getName())) {
                    return true;
                }

            } else if (info.mod.getName().equals(this.moduleToFind.getName())) {
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.ImportInfo

        }
    }

    private void commit(Session session, TxInfo info, LinkedList<TxInfo> skipList) throws RepositoryException, IOException {
        try {
            ImportInfo imp = null;
            if (skipList.isEmpty()) {
                if (info == cpTxInfo) {
                    // don't need to import again, just set import info
                    log.debug("skipping last checkpoint info {}", info.path);
                    imp = cpImportInfo;
                } else {
                    imp = commit(session, info);
                    if (imp != null) {
                        nodesToCheckin.addAll(imp.getToVersion());
                        memberships.putAll(imp.getMemberships());
                        autoSave.modified(imp.numModified());
                    }
                }
            } else if (log.isDebugEnabled()) {
                StringBuilder skips = new StringBuilder();
                for (TxInfo i: skipList) {
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.ImportInfo

            throws RepositoryException {
        if (fullCoverage && !recursive) {
            // todo: allow smarter removal
            throw new RepositoryException("Unable to remove content since aggregation has children and recursive is not set.");
        }
        ImportInfo info = new ImportInfoImpl();
        info.onDeleted(node.getPath());
        Node parent = node.getParent();
        if (getAclManagement().isACLNode(node)) {
            getAclManagement().clearACL(parent);
        } else {
            node.remove();
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.ImportInfo

    /**
     * {@inheritDoc}
     */
    public ImportInfo remove(Node node, boolean recursive, boolean trySave) throws RepositoryException {
        ImportInfo info = new ImportInfoImpl();
        info.onDeleted(node.getPath());
        Node parent = node.getParent();
        node.remove();
        if (trySave) {
            parent.save();
        }
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.ImportInfo

    /**
     * {@inheritDoc}
     */
    public ImportInfo remove(Node node, boolean recursive, boolean trySave)
            throws RepositoryException {
        ImportInfo info = new ImportInfoImpl();
        info.onDeleted(node.getPath());
        Node parent = node.getParent();
        node.remove();
        if (trySave) {
            parent.save();
        }
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.ImportInfo

        }
    }

    private void commit(Session session, TxInfo info, LinkedList<TxInfo> skipList) throws RepositoryException, IOException {
        try {
            ImportInfo imp = null;
            if (skipList.isEmpty()) {
                if (info == cpTxInfo) {
                    // don't need to import again, just set import info
                    log.debug("skipping last checkpoint info {}", info.path);
                    imp = cpImportInfo;
                } else {
                    imp = commit(session, info);
                    if (imp != null) {
                        nodesToCheckin.addAll(imp.getToVersion());
                        memberships.putAll(imp.getMemberships());
                        autoSave.modified(imp.numModified());
                    }
                }
            } else if (log.isDebugEnabled()) {
                StringBuilder skips = new StringBuilder();
                for (TxInfo i: skipList) {
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.ImportInfo

    public ImportInfo writeAggregate(AggregateImpl node, String reposName,
                                        ArtifactSetImpl artifacts)
            throws RepositoryException, IOException {
        assertMounted();
        if (reposName == null) {
            ImportInfo info;
            for (ArtifactHandler artifactHandler : artifactHandlers) {
                info = artifactHandler.accept(session, node, artifacts);
                if (info != null) {
                    node.invalidate();
                    return info;
                }
            }
        } else {
            ImportInfo info;
            for (ArtifactHandler artifactHandler : artifactHandlers) {
                info = artifactHandler.accept(session, node, reposName, artifacts);
                if (info != null) {
                    node.invalidate();
                    return info;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.