Examples of ErlangSearchPattern


Examples of org.erlide.engine.services.search.ErlangSearchPattern

                        searchOtp);
            }
            SearchUtil.updateLRUWorkingSets(workingSets);
        }
        }
        final ErlangSearchPattern searchPattern = SearchUtil.getSearchPattern(null,
                data.getSearchFor(), data.getPattern(), data.getLimitTo());
        SearchUtil.runQuery(searchPattern, scope, scopeDescription, getShell());
        return true;
    }
View Full Code Here

Examples of org.erlide.engine.services.search.ErlangSearchPattern

    private SearchPatternData determineInitValuesFrom(final IErlModule module,
            final int offset, final OpenResult res) throws ErlModelException {
        if (res == null) {
            return null;
        }
        final ErlangSearchPattern pattern = SearchUtil
                .getSearchPatternFromOpenResultAndLimitTo(res, module, offset,
                        LimitTo.REFERENCES, true);
        final String patternString = pattern == null ? "" : pattern.patternString();
        final SearchFor searchFor = pattern == null ? SearchFor.FUNCTION : pattern
                .getSearchFor();
        final SearchPatternData searchPatternData = new SearchPatternData(patternString,
                ISearchPageContainer.WORKSPACE_SCOPE, LimitTo.REFERENCES, searchFor,
                null, SearchUtil.SEARCH_IN_SOURCES);
        return searchPatternData;
View Full Code Here

Examples of org.erlide.engine.services.search.ErlangSearchPattern

                null, SearchUtil.SEARCH_IN_SOURCES);
        return searchPatternData;
    }

    private SearchPatternData determineInitValuesFrom(final IErlElement e) {
        final ErlangSearchPattern pattern = new SearchPatternFactory(ErlangEngine
                .getInstance().getModelUtilService())
                .getSearchPatternFromErlElementAndLimitTo(e, getLimitTo());
        if (pattern == null) {
            return null;
        }
        return new SearchPatternData(pattern.patternString(),
                ISearchPageContainer.WORKSPACE_SCOPE, LimitTo.REFERENCES,
                pattern.getSearchFor(), null, getLastIncludeMask());
    }
View Full Code Here

Examples of org.erlide.engine.services.search.ErlangSearchPattern

                                    .getImportsAsList(module),
                            "",
                            ErlangEngine.getInstance().getModel()
                                    .getPathVars(module.getCorrespondingResource()));
            ErlLogger.debug("find " + res);
            final ErlangSearchPattern ref = SearchUtil
                    .getSearchPatternFromOpenResultAndLimitTo(res, module, offset,
                            getLimitTo(), true);
            if (ref != null) {
                SearchUtil.runQuery(ref, getScope(), getScopeDescription(), getShell());
            }
View Full Code Here

Examples of org.erlide.engine.services.search.ErlangSearchPattern

     *            The erlang element to be found.
     * @throws CoreException
     */
    public void run(final IErlElement element) {
        try {
            final ErlangSearchPattern pattern = new SearchPatternFactory(ErlangEngine
                    .getInstance().getModelUtilService())
                    .getSearchPatternFromErlElementAndLimitTo(element, getLimitTo());
            SearchUtil.runQuery(pattern, getScope(), getScopeDescription(), getShell());
        } catch (final CoreException e) {
            handleException(e);
View Full Code Here

Examples of org.erlide.engine.services.search.ErlangSearchPattern

                                "",
                                ErlangEngine
                                        .getInstance()
                                        .getModel()
                                        .getPathVars(theModule.getCorrespondingResource()));
                final ErlangSearchPattern pattern = SearchUtil
                        .getSearchPatternFromOpenResultAndLimitTo(res, theModule, offset,
                                LimitTo.ALL_OCCURRENCES, false);
                if (fCanceled) {
                    return;
                }
View Full Code Here

Examples of org.erlide.engine.services.search.ErlangSearchPattern

                "-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);
        final ErlSearchScope scope = new ErlSearchScope(moduleA);
        scope.addModule(moduleB);
        final ErlSearchQuery query = new ErlSearchQuery(ref, scope, "");
View Full Code Here

Examples of org.erlide.engine.services.search.ErlangSearchPattern

                "-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);
        final ErlSearchScope scope = new ErlSearchScope(moduleA);
        scope.addModule(moduleB);
        final ErlSearchQuery query = new ErlSearchQuery(ref, scope, "");
View Full Code Here

Examples of org.erlide.engine.services.search.ErlangSearchPattern

                "-module(bz).\n-export([f/0]).\nf(A) ->\n    [A].\n");
        moduleA.open(null);
        moduleB.open(null);
        // when
        // searching for the variable A from module a
        final ErlangSearchPattern pattern = new SearchPatternFactory(ErlangEngine
                .getInstance().getModelUtilService()).getSearchPattern(
                SearchFor.VARIABLE, null, "A", 0, LimitTo.ALL_OCCURRENCES, moduleA);
        final ErlSearchScope scope = new ErlSearchScope(moduleA, moduleB);
        final ErlSearchScope reducedScope = pattern.reduceScope(scope);
        final ErlSearchQuery query = new ErlSearchQuery(pattern, reducedScope, "");
        query.run(new NullProgressMonitor());
        // then
        // it should be found in module a
        final ErlangSearchResult searchResult = (ErlangSearchResult) query
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.