Examples of FullRepIterable


Examples of org.python.pydev.core.FullRepIterable

        //use a single buffer to create all the strings
        FastStringBuffer buffer = new FastStringBuffer();
        boolean doIgnoreImportsStartingWithUnder = AutoImportsPreferencesPage.doIgnoreImportsStartingWithUnder();

        for (String completeName : allModules) {
            FullRepIterable iterable = new FullRepIterable(completeName);

            for (String mod : iterable) {

                if (fullRep.startsWith(mod)) {
View Full Code Here

Examples of org.python.pydev.core.FullRepIterable

                String fullRepNameId = ((NameTok) alias.name).id;

                //we have to get all representations, since an import such as import os.path would
                //have to match os and os.path
                for (String repId : new FullRepIterable(fullRepNameId)) {

                    if (repId.equals(rep)) {
                        return (NameTok) alias.name;
                    }
                }
View Full Code Here

Examples of org.python.pydev.core.FullRepIterable

                ModulesKey k = new ModulesKeyForZip(modName, zipContents.zipFile, filePathInZip, true);
                keys.put(k, k);

                if (zipContents.zipContentsType == ZipContents.ZIP_CONTENTS_TYPE_JAR) {
                    //folder modules are only created for jars (because for python files, the __init__.py is required).
                    for (String s : new FullRepIterable(FullRepIterable.getWithoutLastPart(modName))) { //the one without the last part was already added
                        k = new ModulesKeyForZip(s, zipContents.zipFile, s.replace('.', '/'), false);
                        keys.put(k, k);
                    }
                }
            }
View Full Code Here

Examples of org.python.pydev.core.FullRepIterable

     * @throws CompletionRecursionException
     */
    public Tuple3<IModule, String, IToken> findOnImportedMods(IToken[] importedModules, ICompletionState state,
            String currentModuleName, IModule current) throws CompletionRecursionException {

        FullRepIterable iterable = new FullRepIterable(state.getActivationToken(), true);
        for (String tok : iterable) {
            for (IToken importedModule : importedModules) {

                final String modRep = importedModule.getRepresentation(); //this is its 'real' representation (alias) on the file (if it is from xxx import a as yyy, it is yyy)

View Full Code Here

Examples of org.python.pydev.core.FullRepIterable

        FastStringBuffer displayString = new FastStringBuffer();
        HashSet<String> alreadyFound = new HashSet<String>();

        for (String name : allModuleNames) {

            FullRepIterable iterable = new FullRepIterable(name);
            for (String string : iterable) {
                //clear the buffer...
                realImportRep.clear();

                String[] strings = FullRepIterable.headAndTail(string);
View Full Code Here

Examples of org.python.pydev.core.FullRepIterable

            for (String name : allModuleNames) {
                if (name.equals(initialModule)) {
                    continue;
                }

                FullRepIterable iterable = new FullRepIterable(name);
                for (String string : iterable) {
                    //clear the buffer...
                    realImportRep.clear();

                    String[] strings = FullRepIterable.headAndTail(string);
View Full Code Here

Examples of org.python.pydev.core.FullRepIterable

                        return new Definition(0 + 1, 0 + 1, "", null, null, module); // it is the module itself
                    }

                } else if (token instanceof CompiledToken) {
                    String parentPackage = token.getParentPackage();
                    FullRepIterable iterable = new FullRepIterable(parentPackage, true);

                    IModule module = null;
                    for (String modName : iterable) {
                        module = nature.getAstManager().getModule(modName, nature, true);
                        if (module != null) {
View Full Code Here

Examples of org.python.pydev.core.FullRepIterable

            if (aliasType.asname != null) {
                name = ((NameTok) aliasType.asname).id;
            }

            if (name == null) {
                FullRepIterable iterator = new FullRepIterable(original);
                Iterator<String> it = iterator.iterator();
                while (it.hasNext()) {
                    String rep = it.next();
                    SourceToken sourceToken;
                    if (it.hasNext()) {
                        sourceToken = new ImportPartSourceToken(node, rep, "", "", module, initialImportName + rep,
View Full Code Here

Examples of org.python.pydev.core.FullRepIterable

        Object ret = super.visitImportFrom(node);
        //the import from will generate the tokens that go into the module namespace, but still, it needs to
        //create tokens that will not be used in code-analysis, but will be used in matching tokens
        //regarding its module.
        NameTok tokModName = (NameTok) node.module;
        for (String m : new FullRepIterable(tokModName.id)) {
            if (m.indexOf(".") == -1) {
                aliasType[] names = new aliasType[1];
                NameTok importNameTok = new NameTok(m, NameTok.ImportModule);

                importNameTok.beginLine = tokModName.beginLine;
View Full Code Here

Examples of org.python.pydev.core.FullRepIterable

    @Override
    protected void onAfterEndScope(SimpleNode node, ScopeItems m) {
        ASTEntry parent = popParent(node);
        if (hitAsUndefined == null) {
            for (String rep : new FullRepIterable(this.completeNameToFind, true)) {
                List<Found> foundItems = m.getAll(rep);
                for (Found found : foundItems) {
                    if (checkFound(found, parent) != null) {
                        return;
                    }
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.