Package org.erlide.engine.model.root

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


    private void createTaskMarkers(final IProject project, final IResource res) {
        BuildQueueProcessor.getInstance().addWork(new BuildWorkerInfo(project, res));
    }

    private IPath getBeamForErl(final IResource source) {
        final IErlProject erlProject = ErlangEngine.getInstance().getModel()
                .getErlangProject(source.getProject());
        IPath p = erlProject.getProperties().getOutputDir();
        p = p.append(source.getName());
        if (!ERL.equals(p.getFileExtension())) {
            return null;
        }
        final IPath module = p.removeFileExtension();
View Full Code Here


        final IProject project = getProject();
        if (project == null || !project.isAccessible()) {
            return null;
        }
        final IErlProject erlProject = ErlangEngine.getInstance().getModel()
                .getErlangProject(project);
        final ProjectConfigType config = erlProject.getConfigType();
        final BuilderTool tool = erlProject.getBuilderProperties().getBuilderTool();

        if (!validateBuildConfiguration(erlProject)) {
            ErlLogger.warn("Builder tool and config mismatch: " + tool + " " + config);
            monitor.setCanceled(true);
        }
View Full Code Here

                return false;
            }
            if (getResult() != null) {
                return false;
            }
            final IErlProject erlProject = ErlangEngine.getInstance().getModel()
                    .getErlangProject(resource.getProject());
            if (resource.getType() == IResource.FILE
                    && resource.getFileExtension() != null
                    && ERL.equals(resource.getFileExtension())
                    && isInCodePath(resource, erlProject)) {
View Full Code Here

        final Set<String> externalModulePaths = new HashSet<String>();
        final IErlModel model = ErlangEngine.getInstance().getModel();
        for (final IProject project : projects) {
            SearchCoreUtil.addProjectToScope(project, result);
            if (NatureUtil.hasErlangNature(project)) {
                final IErlProject erlProject = model.getErlangProject(project);
                addExternalModules(erlProject, result, externalModulePaths, addExternals,
                        addOtp);
            }
        }
        return result;
View Full Code Here

    static void addProjectToScope(final IProject project, final ErlSearchScope result)
            throws CoreException {
        if (project == null) {
            return;
        }
        final IErlProject erlProject = ErlangEngine.getInstance().getModel()
                .getErlangProject(project);
        if (erlProject != null) {
            final Collection<IPath> sourcePaths = erlProject.getProperties()
                    .getSourceDirs();
            for (final IPath path : sourcePaths) {
                final IFolder folder = project.getFolder(path);
                SearchCoreUtil.addFolderToScope(folder, result);
            }
View Full Code Here

            if (project != null) {
                try {
                    final String alternatePltFileDirectory = DialyzerPreferences
                            .getAlternatePLTFileDirectoryFromPreferences();
                    checkIfPltFilesShouldBeCopied(alternatePltFileDirectory);
                    final IErlProject eproject = ErlangEngine.getInstance().getModel()
                            .findProject(project);
                    if (eproject != null) {
                        final IOtpRpc backend = BackendCore.getBuildBackend(eproject);
                        for (final String pltPath : selectedPLTPaths) {
                            checkPlt(pltPath, alternatePltFileDirectory, monitor, backend);
View Full Code Here

                List<String> ebinDirs = null;
                if (alternatePltFileDirectory != null) {
                    ebinDirs = Lists.newArrayList();
                    for (final IErlElement i : ErlangEngine.getInstance().getModel()
                            .getChildrenOfKind(ErlElementKind.PROJECT)) {
                        final IErlProject project = (IErlProject) i;
                        final String ebinDir = project.getWorkspaceProject()
                                .getFolder(project.getProperties().getOutputDir())
                                .getLocation().toString();
                        ebinDirs.add(ebinDir);
                    }
                }
                final OtpErlangObject result = ErlideDialyze.checkPlt(backend, pltPath,
View Full Code Here

    // throws BackingStoreException;
    @Test
    public void getExternalModules() throws Exception {
        File externalFile = null;
        File externalsFile = null;
        final IErlProject aProject = project2;
        final String externalModulesString = aProject.getProperties()
                .getExternalModules();
        try {
            // given
            // an erlang project and an external file not in any project
            final String externalFileName = "external.erl";
            externalFile = createTmpFile(externalFileName,
                    "-module(external).\nf([_ | _]=L ->\n    atom_to_list(L).\n");
            final String absolutePath = externalFile.getAbsolutePath();
            externalsFile = createTmpFile(XX_ERLIDEX, absolutePath);
            aProject.open(null);
            final Collection<IErlModule> otpModules = aProject.getExternalModules();
            ((ErlProject) aProject).setExternalModulesFile(externalsFile
                    .getAbsolutePath());
            aProject.open(null);
            // when
            // fetching all external modules
            final Collection<IErlModule> externalModules = aProject.getExternalModules();
            // then
            // the external file should be returned
            final Set<IErlModule> otpSet = Sets.newHashSet(otpModules);
            final Set<IErlModule> externalSet = Sets.newHashSet(externalModules);
            final Set<IErlModule> difference = Sets.difference(externalSet, otpSet);
View Full Code Here

public class ContentAssistTest extends WorkspaceTest {

    @Test
    public void moduleCompletionTest() throws Exception {
        final String name1 = "completion";
        final IErlProject project = createProject(name1, getTmpPath(name1));
        final String initialText = "application_";
        completionTest(project, "z.erl", initialText, initialText.length(),
                Lists.newArrayList("application_controller:", "application_master:",
                        "application_starter:"), false);
    }
View Full Code Here

    }

    @Test
    public void moduleCompletion1Test() throws Exception {
        final String name1 = "completion1";
        final IErlProject project = createProject(name1, getTmpPath(name1));
        completionTest(project, "a.erl", "alarm_h", 7,
                Lists.newArrayList("alarm_handler:"), false);
        completionTest(project, "azx.erl", "az", 2, Lists.newArrayList("azx:"), false);
    }
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.