Examples of IErlElementLocator


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

                            project,
                            moduleName,
                            "-module(f).\n-include(\"a.hrl\").\n-export([f/0]).\n-record(rec2, {a, b}).\n"
                                    + "f() ->\n    lists:reverse([1, 0]),\n    lists:reverse([1, 0], [2]).\n");
            module.open(null);
            final IErlElementLocator model = ErlangEngine.getInstance().getModel();
            final IErlModule module2 = model.findModuleFromProject(project, moduleName,
                    null, IErlElementLocator.Scope.PROJECT_ONLY);
            // final ErlModelCache cache = ErlModelCache.getDefault();
            // final Set<IErlModule> modulesByName2 = cache
            // .getModulesByName(ListsUtils.withoutExtension(moduleName));
            // when
View Full Code Here

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

            final File externalsFile = createTmpFile("x.erlidex",
                    absolutePath);
            ((ErlProject) project)
                    .setExternalModulesFile(externalsFile.getAbsolutePath());
            project.open(null);
            final IErlElementLocator model = ErlangEngine.getInstance().getModel();
            final IErlModule findModule = model.findModuleFromProject(project,
                    externalName, null, IErlElementLocator.Scope.PROJECT_ONLY);
            // final ErlModelCache cache = ErlModelCache.getDefault();
            // final Set<IErlModule> modulesByName = cache
            // .getModulesByName(ListsUtils
            // .withoutExtension(externalName));
            // when
            // creating a new project with a module with the same name and
            // searching
            // for it
            final String projectName2 = "testprojectb";
            project2 = createProject(
                    projectName2, getTmpPath(projectName2));
            final IErlModule module = createModule(project2,
                    externalName, "-module(xyz).\n");
            final IErlModule findModule2 = model.findModuleFromProject(project,
                    externalName, null, IErlElementLocator.Scope.ALL_PROJECTS);
            // final Set<IErlModule> modulesByName2 = cache
            // .getModulesByName(ListsUtils
            // .withoutExtension(externalName));
            // then
View Full Code Here

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

                .getModelFindService();
        final String moduleName = modelFindService.resolveMacroValue(moduleName0, module);
        // we have an external call
        final List<ICompletionProposal> result = new ArrayList<ICompletionProposal>();
        final boolean checkAllProjects = NavigationPreferencePage.getCheckAllProjects();
        final IErlElementLocator model = ErlangEngine.getInstance().getModel();
        final IErlModule theModule = modelFindService.findModule(model, project,
                moduleName, null,
                checkAllProjects ? IErlElementLocator.Scope.ALL_PROJECTS
                        : IErlElementLocator.Scope.REFERENCED_PROJECTS);
        if (theModule != null) {
View Full Code Here

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

                String msg = warnings.get(i);
                final int j = msg.indexOf(": ");
                if (j != -1) {
                    msg = msg.substring(j + 1);
                }
                final IErlElementLocator model = ErlangEngine.getInstance().getModel();
                addDialyzerWarningMarker(model, filename, line, msg);
            }
        }
    }
View Full Code Here

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

        DialyzerPreferences prefs = null;
        prefs = DialyzerPreferences.get(project);
        if (prefs == null || !prefs.getDialyzeOnCompile()) {
            return null;
        }
        final IErlElementLocator model = ErlangEngine.getInstance().getModel();
        final Set<IErlModule> modules = DialyzerUtils.collectModulesFromResource(model,
                project);
        final Set<IErlProject> projects = Sets.newHashSet();
        projects.add(model.findProject(project));
        if (!modules.isEmpty()) {
            try {
                final IErlProject eproject = model.findProject(project);
                if (eproject == null) {
                    return null;
                }
                final IBackend backend = BackendCore.getBackendManager().getBuildBackend(
                        eproject);
View Full Code Here

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

import org.erlide.util.ErlLogger;

public class BreakpointUtils {

    public static IErlElement getElement(final ILineBreakpoint breakpoint) {
        final IErlElementLocator model = ErlangEngine.getInstance().getModel();
        final IErlElement element = model.findElement(breakpoint.getMarker()
                .getResource());
        if (element instanceof IErlModule) {
            final IErlModule m = (IErlModule) element;
            try {
                m.open(null);
View Full Code Here

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

            project1.open(null);
            // moduleC.open(null);
            // when
            // looking for it
            // within project
            final IErlElementLocator model = ErlangEngine.getInstance().getModel();

            final IErlElement element1 = modelFindService.findTypeDef(model, project1,
                    moduleB, "bx", "concat_thing", moduleB.getResource().getLocation()
                            .toPortableString(), IErlElementLocator.Scope.PROJECT_ONLY);
            // in other project but path given
View Full Code Here

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

        final IErlModule moduleD = createModule(project1, "d.erl",
                "-module(d).\n-export([f/0]).\nf() ->\n    ok.\ng() ->\n    ?MODULE:f().\n");
        moduleD.open(null);
        // when
        // looking for it with ?MODULE
        final IErlElementLocator model = ErlangEngine.getInstance().getModel();
        final IErlElement element1 = modelFindService.findFunction(model, project1,
                moduleD, "?MODULE", null, new ErlangFunction("f", 0),
                IErlElementLocator.Scope.PROJECT_ONLY);
        // then
        // it should be found
View Full Code Here

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

            ((ErlProject) project)
                    .setExternalModulesFile(externalsFile.getAbsolutePath());
            project.open(null);
            // when
            // looking for it
            final IErlElementLocator model = getModel();
            final IErlModule module = modelFindService.findModule(model, null, null,
                    absolutePath, IErlElementLocator.Scope.ALL_PROJECTS);
            // then
            // we should find it
            assertNotNull(module);
View Full Code Here

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

            ((ErlProject) project).setExternalIncludesFile(externalsFile
                    .getAbsolutePath());
            project.open(null);
            // when
            // looking for it
            final IErlElementLocator model = ErlangEngine.getInstance().getModel();
            final IErlModule module = modelFindService.findInclude(model, project, null,
                    externalFileName, absolutePath);
            // then
            // we should find it
            assertNotNull(module);
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.