Examples of SearchPattern


Examples of org.eclipse.jdt.core.search.SearchPattern

    if (elems.size() > 0){       
      SearchRequestor requestor = new Searcher();
      SearchEngine engine = new SearchEngine();
     
      IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[]{jp});//, IJavaSearchScope.SOURCES | IJavaSearchScope.APPLICATION_LIBRARIES | IJavaSearchScope.);
      SearchPattern combined = SearchPattern.createPattern((IJavaElement)elems.get(0), IJavaSearchConstants.IMPLEMENTORS, 0);

//       Until this bug is fixed, stub it out...  only the first interface/superclass will be used.
//              https://bugs.eclipse.org/bugs/show_bug.cgi?id=142044
//              for(int i=1;i<elems.size();i++){
//                final SearchPattern other = SearchPattern.createPattern((IJavaElement)elems.get(i), IJavaSearchConstants.IMPLEMENTORS, 0);
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchPattern

            if (jobMonitor != null && jobMonitor.isCanceled())
                return Status.CANCEL_STATUS;
            if (JSPSearchSupport.getInstance().isCanceled())
                return Status.CANCEL_STATUS;

            SearchPattern javaSearchPattern = null;
            // if an element is available, use that to create search pattern
            // (eg. LocalVariable)
            // otherwise use the text and other paramters
            if (this.fElement != null)
                javaSearchPattern = SearchPattern.createPattern(this.fElement, this.fLimitTo);
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchPattern

            if (monitor != null && monitor.isCanceled())
                return;
            if (JSPSearchSupport.getInstance().isCanceled())
                return;

            SearchPattern javaSearchPattern = null;
            // if an element is available, use that to create search pattern
            // (eg. LocalVariable)
            // otherwise use the text and other paramters
            if (this.fElement != null)
                javaSearchPattern = SearchPattern.createPattern(this.fElement, fLimitTo);
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchPattern

            if (jobMonitor != null && jobMonitor.isCanceled())
                return Status.CANCEL_STATUS;
            if (JSPSearchSupport.getInstance().isCanceled())
                return Status.CANCEL_STATUS;

            SearchPattern javaSearchPattern = null;
            // if an element is available, use that to create search pattern
            // (eg. LocalVariable)
            // otherwise use the text and other paramters
            if (this.fElement != null)
                javaSearchPattern = SearchPattern.createPattern(this.fElement, this.fLimitTo);
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchPattern

            if (monitor != null && monitor.isCanceled())
                return;
            if (JSPSearchSupport.getInstance().isCanceled())
                return;

            SearchPattern javaSearchPattern = null;
            // if an element is available, use that to create search pattern
            // (eg. LocalVariable)
            // otherwise use the text and other paramters
            if (this.fElement != null)
                javaSearchPattern = SearchPattern.createPattern(this.fElement, fLimitTo);
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchPattern

    private double calculateAfferentCoupling(PackageFragmentMetric source) {
      IPackageFragment pf = (IPackageFragment) source.getJavaElement();
      if (!pf.isDefaultPackage()) {
        try {
          SearchPattern pattern = SearchPattern.createPattern(source
              .getJavaElement(), IJavaSearchConstants.REFERENCES);

          IJavaSearchScope scope = createProjectSearchScope(source
              .getJavaElement());
          SearchEngine searchEngine = new SearchEngine();
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchPattern

          scope.add(packages[i]);
      }
    }

    private double calculateEfferentCoupling(PackageFragmentMetric source) {
      SearchPattern pattern = SearchPattern.createPattern("*",
          IJavaSearchConstants.PACKAGE,
          IJavaSearchConstants.REFERENCES,
          SearchPattern.R_PATTERN_MATCH);
      IJavaSearchScope scope = SearchEngine
          .createJavaSearchScope(new IJavaElement[] { source
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchPattern

                progressMonitor, 5, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL);
            monitor.beginTask("Searching for declaration of " + methodName +
                (project != null ? " in " + project.getProject().getName() : ""), 100);
            IJavaSearchScope searchScope = getSearchScope(project);
            int matchType = !isConstructor ? IJavaSearchConstants.METHOD : IJavaSearchConstants.CONSTRUCTOR;
            SearchPattern pattern = SearchPattern.createPattern(
                methodName,
          matchType,
          IJavaSearchConstants.DECLARATIONS,
          SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE );
           
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchPattern

           
            log("Looking for calls to " + methodName);
           
            int matchType = !isConstructor ? IJavaSearchConstants.METHOD : IJavaSearchConstants.CONSTRUCTOR;
           
            SearchPattern pattern = SearchPattern.createPattern(
                methodName,
          matchType,
          IJavaSearchConstants.REFERENCES,
          SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
           
View Full Code Here

Examples of org.eclipse.jdt.core.search.SearchPattern

                    methodName + (project != null ? " in " + project.getProject().getName() : ""), 100);           
            IJavaSearchScope searchScope = getSearchScope(project);
            // This is kind of hacky: we need to make up a string name for the search to work right
            log("Looking for " + methodName);
            int matchType = !isConstructor ? IJavaSearchConstants.METHOD : IJavaSearchConstants.CONSTRUCTOR;
            SearchPattern pattern = SearchPattern.createPattern(
                    methodName,
                    matchType,
                    IJavaSearchConstants.DECLARATIONS,
                    SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE );
           
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.