Package org.erlide.engine.model.root

Examples of org.erlide.engine.model.root.IErlProject


    public boolean buildStructure(final IProgressMonitor pm) throws ErlModelException {
        if (prebuilt) {
            // already done
            return true;
        }
        final IErlProject project = ErlangEngine.getInstance().getModelUtilService()
                .getProject(this);
        final IOtpRpc backend = OtpRpcFactory.getOtpRpcForProject(project);
        if (backend != null) {
            final List<String> files = ErlangEngine.getInstance()
                    .getService(OpenService.class).getLibFiles(entry);
View Full Code Here


                moduleName = or.getMod();
            }
            final ErlangFunctionCall functionCall = HoverUtil.eventToErlangFunctionCall(
                    moduleName, event);
            if (functionCall != null) {
                final IErlProject project = ErlangEngine.getInstance()
                        .getModelUtilService().getProject(editor.getModule());
                if (project == null) {
                    return;
                }
                final IOtpRpc backend = BackendCore.getBuildBackend(project);
View Full Code Here

        if (debuggerVar.length() > 0) {
            result.append(debuggerVar);
        }
        final String stateDir = ErlangEngine.getInstance().getStateDir();

        final IErlProject erlProject = editor.getProject();

        String docPath = "";
        String anchor = "";
        try {
            if (erlProject == null) {
                return null;
            }
            final IOtpRpc backend = BackendCore.getBuildBackend(erlProject);
            if (backend == null) {
                return null;
            }

            final IErlModel model = ErlangEngine.getInstance().getModel();
            final String externalModulesString = erlProject.getProperties()
                    .getExternalModules();
            final OtpErlangTuple t = (OtpErlangTuple) ErlangEngine
                    .getInstance()
                    .getService(OtpDocService.class)
                    .getOtpDoc(
View Full Code Here

        }
        return null;
    }

    private IErlProject createErlangProject(final IProject project) {
        final IErlProject ep = new ErlProject(this, project);
        addChild(ep);
        final ErlModelCache cache = getModelCache();
        cache.newProjectCreated();
        return ep;
    }
View Full Code Here

        return folder;
    }

    @Override
    public boolean isOnSourcePath() {
        final IErlProject project = modelUtilService.getProject(this);
        return ErlFolder.isOnPaths(folder, project.getWorkspaceProject(), project
                .getProperties().getSourceDirs());
    }
View Full Code Here

                .getProperties().getSourceDirs());
    }

    @Override
    public boolean isOnIncludePath() {
        final IErlProject project = modelUtilService.getProject(this);
        return ErlFolder.isOnPaths(folder, project.getWorkspaceProject(), project
                .getProperties().getIncludeDirs());
    }
View Full Code Here

    }

    @Override
    public boolean isSourcePathParent() {
        final IProject project = folder.getProject();
        final IErlProject erlProject = modelUtilService.getProject(this);
        final Collection<IPath> sourcePaths = erlProject.getProperties().getSourceDirs();
        final IPath path = folder.getFullPath();
        for (final IPath i : sourcePaths) {
            if (path.isPrefixOf(project.getFolder(i).getFullPath())) {
                return true;
            }
View Full Code Here

        private void notifyProject(final IProject prj0) {
            if (!prj0.exists()) {
                return;
            }
            final IErlProject prj = findProject(prj0);
            if (prj instanceof ProjectConfigurationChangeListener) {
                ((ProjectConfigurationChangeListener) prj).configurationChanged();
            }
        }
View Full Code Here

                .getIncludedFilesForModule(module);
        if (includedFilesForModule != null && !includedFilesForModule.isEmpty()) {
            return includedFilesForModule;
        }
        final Collection<ErlangIncludeFile> includedFiles = module.getIncludeFiles();
        final IErlProject project = modelUtilService.getProject(module);
        if (project == null) {
            return result;
        }
        final Collection<IErlModule> includes = project.getIncludes();
        includes.addAll(getLocalIncludes(module));
        Collection<IErlModule> externalIncludes = null;
        Collection<IErlModule> referencedIncludes = null;
        Collection<IErlModule> modules = null;
        for (final ErlangIncludeFile includeFile : includedFiles) {
            final String includeFileName = includeFile.getFilenameLastPart();
            if (findAllIncludedFilesAux(checked, result, includes, includeFileName)) {
                continue;
            }
            if (referencedIncludes == null) {
                referencedIncludes = Lists.newArrayList();
                final Collection<IErlProject> referencedProjects = project
                        .getReferencedProjects();
                for (final IErlProject referencedProject : referencedProjects) {
                    referencedIncludes.addAll(referencedProject.getIncludes());
                }
            }
            if (findAllIncludedFilesAux(checked, result, referencedIncludes,
                    includeFileName)) {
                continue;
            }
            if (externalIncludes == null) {
                externalIncludes = project.getExternalIncludes();
            }
            if (findAllIncludedFilesAux(checked, result, externalIncludes,
                    includeFileName)) {
                continue;
            }
            if (modules == null) {
                modules = project.getModules();
            }
            findAllIncludedFilesAux(checked, result, modules, includeFileName);
        }
        ErlModelCache.getDefault().putIncludedFilesForModule(module, result);
        return result;
View Full Code Here

    public boolean buildStructure(final IProgressMonitor pm) throws ErlModelException {
        // TODO some code duplication within this function
        // ErlLogger.debug("ErlExternalReferenceEntryList.buildStructure %s",
        // getName());

        final IErlProject project = ErlangEngine.getInstance().getModelUtilService()
                .getProject(this);
        final ErlModelCache cache = ErlModelCache.getDefault();
        List<ExternalTreeEntry> externalModuleTree = cache
                .getExternalTree(externalModules);
        List<ExternalTreeEntry> externalIncludeTree = cache
                .getExternalTree(externalIncludes);
        if (externalModuleTree == null || externalIncludeTree == null) {
            final OtpErlangList pathVars = ErlangEngine.getInstance().getModel()
                    .getPathVars(project.getWorkspaceProject());
            final IOtpRpc backend = OtpRpcFactory.getOtpRpcForProject(project);
            if (externalModuleTree == null && externalModules.length() > 0) {
                if (pm != null) {
                    pm.worked(1);
                }
View Full Code Here

TOP

Related Classes of org.erlide.engine.model.root.IErlProject

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.