Examples of IJavaSearchScope


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

            IProgressMonitor monitor = new SubProgressMonitor(
                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,
View Full Code Here

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

            IProgressMonitor monitor = new SubProgressMonitor(progressMonitor, 5, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
           
            monitor.beginTask("Searching for calls to " + 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 calls to " + methodName);
           
View Full Code Here

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

            IProgressMonitor monitor = new SubProgressMonitor(
                    progressMonitor, 5, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
            monitor.beginTask("Searching for calls to " +
                    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,
View Full Code Here

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

    ViewContentProvider cp = ((ViewContentProvider)viewer.getContentProvider());
    try {
      MethodDeclarationsSearchRequestor requestor = new MethodDeclarationsSearchRequestor();
            SearchEngine searchEngine = new SearchEngine();

            IJavaSearchScope searchScope = CallerFinder.getSearchScope(project);
            SearchPattern pattern = SearchPattern.createPattern(
                methodName,
          IJavaSearchConstants.METHOD,
          IJavaSearchConstants.DECLARATIONS,
          SearchPattern.R_PATTERN_MATCH | SearchPattern.R_CASE_SENSITIVE
View Full Code Here

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

      IType element = javaProject.findType(targetClass);

      SearchEngine searchEngine = new SearchEngine();
      SearchPattern pattern = SearchPattern.createPattern(element, IJavaSearchConstants.REFERENCES);
      SearchParticipant[] participants = new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() };
      IJavaSearchScope scope = SearchEngine.createWorkspaceScope();

      BasicSearchRequestor requestor = new BasicSearchRequestor();
      searchEngine.search(pattern, participants, scope, requestor, null);

      SearchMatch[] matches = requestor.getMatches();
View Full Code Here

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

  private void modifyBlocks(final IMethod fromMethod, BlockModifier blockModifier) {
    try {
      SearchEngine searchEngine = new SearchEngine();
      SearchPattern pattern = SearchPattern.createPattern(fromMethod, IJavaSearchConstants.ALL_OCCURRENCES | IJavaSearchConstants.IGNORE_RETURN_TYPE);
      SearchParticipant[] participants = new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() };
      IJavaSearchScope scope = SearchEngine.createWorkspaceScope();

      BasicSearchRequestor requestor = new BasicSearchRequestor();
      searchEngine.search(pattern, participants, scope, requestor, null);

      SearchMatch[] matches = requestor.getMatches();
View Full Code Here

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

      IType singleton = javaProject.findType("javax.ejb.Singleton");
     
      SearchEngine searchEngine = new SearchEngine();
      SearchPattern pattern = SearchPattern.createPattern(singleton, IJavaSearchConstants.REFERENCES);
      SearchParticipant[] participants = new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() };
      IJavaSearchScope scope = SearchEngine.createWorkspaceScope();

      SingletonBeanSearchRequestor requestor = new SingletonBeanSearchRequestor();
      searchEngine.search(pattern, participants, scope, requestor, null);

      SearchMatch[] matches = requestor.getMatches();
View Full Code Here

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

      throws CoreException, OperationCanceledException {
    final RefactoringStatus status = new RefactoringStatus();
    try {
      monitor.beginTask(Messages.ConvertConstantsToEnumRefactoring_CheckingPreconditions, 2);

      final IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
      this.computer = new EnumerizationComputer(this.fieldsToRefactor,
          scope, monitor);

      // build the enumerization forest.
      /*
 
View Full Code Here

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

   * Ask user choose type, accessible from given project and filtered using given contributors.
   */
  public static String chooseType(IPackageFragment packageFragment,
      IChooseBeanContributor[] contributors) throws JavaModelException {
    IJavaProject javaProject = packageFragment.getJavaProject();
    IJavaSearchScope searchScope =
        SearchEngine.createJavaSearchScope(new IJavaElement[]{javaProject});
    IRunnableContext context = DesignerPlugin.getActiveWorkbenchWindow();
    // prepare extension
    ChooseBeanTypeSelectionExtension extension =
        new ChooseBeanTypeSelectionExtension(packageFragment, searchScope, contributors);
View Full Code Here

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

  private boolean isCalledFromOutside(IMethod method) throws CoreException {
    CompareTypeSearchRequestor requestor = new CompareTypeSearchRequestor(
        (IType) method.getParent());
    SearchPattern pattern = SearchPattern.createPattern(method,
        IJavaSearchConstants.REFERENCES, GENERICS_AGNOSTIC_MATCH_RULE);
    IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
    SearchEngine searchEngine = new SearchEngine();
    searchEngine
        .search(pattern, new SearchParticipant[] { SearchEngine
            .getDefaultSearchParticipant() }, scope, requestor,
            null /* progress monitor */);
 
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.