Package org.python.pydev.core

Examples of org.python.pydev.core.IProjectModulesManager


                    //the nature may still not be completely restored...
                    if (astManager != null) {
                        IModulesManager modulesManager = astManager.getModulesManager();

                        if (modulesManager instanceof IProjectModulesManager) {
                            IProjectModulesManager projectModulesManager = (IProjectModulesManager) modulesManager;
                            String moduleName = projectModulesManager.resolveModuleInDirectManager(file
                                    .getActualObject());
                            if (moduleName != null) {
                                IModule module = projectModulesManager.getModuleInDirectManager(moduleName, nature,
                                        true);
                                if (module == null) {
                                    //ok, something strange happened... it shouldn't be null... maybe empty, but not null at this point
                                    //so, if it exists, let's try to create it...
                                    //TODO: This should be moved to somewhere else.
                                    String resourceOSString = PydevPlugin.getIResourceOSString(file.getActualObject());
                                    if (resourceOSString != null) {
                                        File f = new File(resourceOSString);
                                        if (f.exists()) {
                                            projectModulesManager.addModule(new ModulesKey(moduleName, f));
                                            module = projectModulesManager.getModuleInDirectManager(moduleName, nature,
                                                    true);
                                        }
                                    }
                                }
                                if (module instanceof SourceModule) {
View Full Code Here


            }
        }

        for (IModulesManager m : managersInvolved) {
            if (m instanceof IProjectModulesManager) {
                IProjectModulesManager pM = (IProjectModulesManager) m;
                module = pM.getModuleInDirectManager(name, nature, dontSearchInit);

            } else if (m instanceof ISystemModulesManager) {
                ISystemModulesManager systemModulesManager = (ISystemModulesManager) m;
                module = systemModulesManager.getModuleWithoutBuiltins(name, nature, dontSearchInit);
View Full Code Here

        IModulesManager[] managersInvolved = this.getManagersInvolved(checkSystemManager);
        for (IModulesManager m : managersInvolved) {

            String mod;
            if (m instanceof IProjectModulesManager) {
                IProjectModulesManager pM = (IProjectModulesManager) m;
                mod = pM.resolveModuleInDirectManager(full);

            } else {
                mod = m.resolveModule(full);
            }
View Full Code Here

                        if (!nature.startRequests()) {
                            continue;
                        }
                        try {
                            for (ModulesKey key : file.o1) {
                                IProjectModulesManager modulesManager = (IProjectModulesManager) nature.getAstManager()
                                        .getModulesManager();

                                request.checkCancelled();
                                String modName = key.name;

                                if (modName != null) {
                                    if (!request.moduleName.equals(modName)) {
                                        //we've already checked the module from the request...

                                        request.checkCancelled();
                                        IModule module = modulesManager
                                                .getModuleInDirectManager(modName, nature, false);

                                        if (module instanceof SourceModule) {

                                            request.checkCancelled();
View Full Code Here

     */
    protected Map<Tuple<String, File>, HashSet<ASTEntry>> getReferencesForRename(String moduleName, int line, int col,
            boolean expectError) {
        Map<Tuple<String, File>, HashSet<ASTEntry>> occurrencesToReturn = null;
        try {
            IProjectModulesManager modulesManager = (IProjectModulesManager) natureRefactoring.getAstManager()
                    .getModulesManager();
            IModule module = modulesManager.getModuleInDirectManager(moduleName, natureRefactoring, true);
            if (module == null) {
                throw new RuntimeException("Unable to get source module for module:" + moduleName);
            }
            String strDoc = FileUtils.getFileContents(module.getFile());

View Full Code Here

TOP

Related Classes of org.python.pydev.core.IProjectModulesManager

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.