Examples of ErlSearchScope


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

    private boolean performNewSearch() throws CoreException {
        final SearchPatternData data = getPatternData();
        final int includeMask = getIncludeMask();
        // Setup search scope
        ErlSearchScope scope = EMPTY_SCOPE;
        String scopeDescription = null;
        final boolean searchSources = (includeMask & SearchUtil.SEARCH_IN_SOURCES) != 0;
        final boolean searchExternals = (includeMask & SearchUtil.SEARCH_IN_EXTERNALS) != 0;
        final boolean searchOtp = (includeMask & SearchUtil.SEARCH_IN_OTP_LIBRARIES) != 0;
        final int selectedScope = getContainer().getSelectedScope();
View Full Code Here

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

                }
            }

        };
        try {
            final ErlSearchScope reducedScope = pattern.reduceScope(scope);
            ErlangEngine
                    .getInstance()
                    .getSearchServerService()
                    .startFindRefs(pattern, reducedScope,
                            ErlangEngine.getInstance().getStateDir(), callback, false);
View Full Code Here

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

                                LimitTo.ALL_OCCURRENCES, false);
                if (fCanceled) {
                    return;
                }
                if (pattern != null) {
                    final ErlSearchScope scope = new ErlSearchScope();
                    scope.addModule(theModule);
                    final List<ModuleLineFunctionArityRef> findRefs = Lists
                            .newArrayList();
                    // TODO: should run in background
                    final OtpErlangObject refs = ErlangEngine
                            .getInstance()
View Full Code Here

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

        // 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, "");
        query.run(new NullProgressMonitor());
        // then
        // it should be found in module b
        final ErlangSearchResult searchResult = (ErlangSearchResult) query
View Full Code Here

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

        // 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, "");
        query.run(new NullProgressMonitor());
        // then
        // it should be found in module b
        final ErlangSearchResult searchResult = (ErlangSearchResult) query
View Full Code Here

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

        // 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

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

public class SearchCoreUtil {

    static public ErlSearchScope getProjectsScope(final Collection<IProject> projects,
            final boolean addExternals, final boolean addOtp) throws CoreException {
        final ErlSearchScope result = new ErlSearchScope();
        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)) {
View Full Code Here

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

        }
    }

    public static ErlSearchScope getWorkspaceScope(final boolean addExternals,
            final boolean addOtp) throws ErlModelException {
        final ErlSearchScope result = new ErlSearchScope();
        final Collection<IErlProject> erlangProjects = ErlangEngine.getInstance()
                .getModel().getErlangProjects();
        for (final IErlProject i : erlangProjects) {
            final Collection<IErlModule> modules = i.getModulesAndIncludes();
            for (final IErlModule j : modules) {
                result.addModule(j);
            }
            // addProjectEbin(i, result);
        }
        final Set<String> externalModulePaths = new HashSet<String>();
        for (final IErlProject project : erlangProjects) {
View Full Code Here

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

  private static int ARI_INCLUDE = (-6);
 
  private static int ARI_RECORD_FIELD_DEF = (-7);
 
  public static ErlSearchScope getSelectionScope(final ISelection selection, final boolean addExternals, final boolean addOtp) throws CoreException {
    final ErlSearchScope result = new ErlSearchScope();
    final Set<String> externalModulePaths = new HashSet<String>();
    if ((selection instanceof IStructuredSelection)) {
      List _list = ((IStructuredSelection)selection).toList();
      for (final Object obj : _list) {
        boolean _matched = false;
        if (!_matched) {
          if (obj instanceof IResource) {
            _matched=true;
            SearchCoreUtil.addResourceToScope(result, ((IResource)obj));
          }
        }
        if (!_matched) {
          if (obj instanceof IErlModule) {
            _matched=true;
            result.addModule(((IErlModule)obj));
          }
        }
        if (!_matched) {
          if (obj instanceof IErlElement) {
            _matched=true;
View Full Code Here

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

    int _minus = (_length_1 - 2);
    return sb.substring(0, _minus);
  }
 
  public static ErlSearchScope getWorkingSetsScope(final IWorkingSet[] workingSets, final boolean addExternals, final boolean addOTP) throws CoreException {
    final ErlSearchScope result = new ErlSearchScope();
    final Set<String> externalModulePaths = new HashSet<String>();
    boolean _tripleEquals = (workingSets == null);
    if (_tripleEquals) {
      return result;
    }
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.