Package org.erlide.ui.internal.search

Examples of org.erlide.ui.internal.search.ErlSearchQuery


        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, "");
        query.run(new NullProgressMonitor());
        // then
        // it should be found in module b
        final ErlangSearchResult searchResult = (ErlangSearchResult) query
                .getSearchResult();
        assertEquals(nFoundExpected, searchResult.getMatchCount());
        final List<ErlangSearchElement> result = searchResult.getResult();
        if (limitTo == LimitTo.REFERENCES) {
            // f is only referred in moduleB, but declarations matches in any
View Full Code Here


        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, "");
        query.run(new NullProgressMonitor());
        // then
        // it should be found in module b
        final ErlangSearchResult searchResult = (ErlangSearchResult) query
                .getSearchResult();
        assertEquals(1, searchResult.getMatchCount());
        final List<ErlangSearchElement> result = searchResult.getResult();
        assertTrue(hasModule(moduleB, result));
        assertFalse(hasModule(moduleA, result));
View Full Code Here

        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
                .getSearchResult();
        assertEquals(2, searchResult.getMatchCount());
        final List<ErlangSearchElement> result = searchResult.getResult();
        assertTrue(hasModule(moduleA, result));
        assertFalse(hasModule(moduleB, result));
View Full Code Here

    SearchPatternFactory _searchPatternFactory = new SearchPatternFactory(_modelUtilService);
    return _searchPatternFactory.getSearchPattern(searchFor, moduleName, name, arity, limitTo, module);
  }
 
  public static void runQuery(final ErlangSearchPattern pattern, final ErlSearchScope scope, final String scopeDescription, final Shell shell) {
    final ErlSearchQuery query = new ErlSearchQuery(pattern, scope, scopeDescription);
    boolean _canRunInBackground = query.canRunInBackground();
    if (_canRunInBackground) {
      NewSearchUI.runQueryInBackground(query);
    } else {
      IWorkbench _workbench = PlatformUI.getWorkbench();
      final IProgressService progressService = _workbench.getProgressService();
View Full Code Here

TOP

Related Classes of org.erlide.ui.internal.search.ErlSearchQuery

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.