Package org.erlide.engine.model.erlang

Examples of org.erlide.engine.model.erlang.IErlModule.open()


        final AbstractErlangEditor erlangEditor = (AbstractErlangEditor) editor;
        final IErlModule module = erlangEditor.getModule();
        if (module == null) {
            return false;
        }
        module.open(null);
        final IErlFunction function = module.findFunction(erlangFunction);
        if (function == null) {
            return false;
        }
        EditorUtility.revealInEditor(editor, function);
View Full Code Here


        final AbstractErlangEditor erlangEditor = (AbstractErlangEditor) editor;
        final IErlModule module = erlangEditor.getModule();
        if (module == null) {
            return false;
        }
        module.open(null);
        final IErlTypespec typespec = ErlangEngine.getInstance().getModelFindService()
                .findTypespec(module, typeName);
        if (typespec == null) {
            return false;
        }
View Full Code Here

            final ErlangSearchElement ese = (ErlangSearchElement) element;
            kind = ese.getKind();
            if (kind == ErlElementKind.FUNCTION) {
                final IErlModule module = ese.getModule();
                try {
                    module.open(null);
                } catch (final ErlModelException e) {
                }
                final IErlFunction function = module.findFunction(new ErlangFunction(ese
                        .getName(), ese.getArity()));
                if (function != null && function.isExported()) {
View Full Code Here

            return null;
        }
        try {
            if (reconcile) {
                synchronized (module) {
                    module.open(null);
                    return module.getElementAt(offset);
                }
            } else if (module.isConsistent()) {
                return module.getElementAt(offset);
            }
View Full Code Here

        if (moduleName0 != null) {
            final String moduleName = resolveMacroValue(moduleName0, module);
            final IErlModule module2 = findModule(model, project, moduleName, modulePath,
                    scope);
            if (module2 != null) {
                module2.open(null);
                final IErlFunction function = module2.findFunction(erlangFunction);
                if (function != null) {
                    return function;
                }
                return null;
View Full Code Here

            final IErlElementLocator.Scope scope) throws CoreException {
        final String moduleName = resolveMacroValue(moduleName0, module);
        final IErlModule module2 = findModule(model, project, moduleName, modulePath,
                scope);
        if (module2 != null) {
            module2.open(null);
            return module2.findTypespec(typeName);
        }
        return null;
    }
View Full Code Here

            module = model.getModuleFromText(model, name, s, s);
        }
        ErlNode root = null;
        if (element != null && document != null) {
            try {
                module.open(null);
                root = new RootErlNode(document, element);
                recursiveMakeErlNodes(module, root, document);
            } catch (final ErlModelException e) {
                ErlLogger.warn(e);
            }
View Full Code Here

    public IErlFunction findFunction(final FunctionRef r) throws ErlModelException {
        final IErlModule module = findModule(r.module);
        if (module == null) {
            return null;
        }
        module.open(null);
        return module.findFunction(new ErlangFunction(r.function, r.arity));
    }

    @Override
    public IErlModule findModule(final String moduleName, final String modulePath)
View Full Code Here

        final IErlModule moduleA = createModule(project, "a.erl",
                "-module(a). -export([f/0]). f() -> ok.");
        final IErlModule moduleB = createModule(project, "b.erl",
                "-module(b). -export([f/0]). f() -> a:f().");
        moduleA.open(null);
        moduleB.open(null);
        // when
        // searching for the call to a:f
        final ErlangSearchPattern ref = new SearchPatternFactory(ErlangEngine
                .getInstance().getModelUtilService()).getSearchPattern(
                SearchFor.FUNCTION, "a", "f", 0, limitTo, moduleA);
View Full Code Here

        final IErlModule moduleA = createModule(project, "a.erl",
                "-module(a).\n-export([f/0]).\nf() ->\n    ok.\n");
        final IErlModule moduleB = createModule(project, "b.erl",
                "-module(b).\n-export([f/0]).\nf() ->\n    #a.b,\n    a:f().\n");
        moduleA.open(null);
        moduleB.open(null);
        // when
        // searching for the call to a:f
        final ErlangSearchPattern ref = new SearchPatternFactory(ErlangEngine
                .getInstance().getModelUtilService()).getSearchPattern(
                SearchFor.FUNCTION, "a", "f", 0, LimitTo.REFERENCES, moduleA);
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.