Package org.eclipse.jdt.core.search

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


      // dummy query for waiting until the indexes are ready
      if (monitor != null)
        monitor.subTask(Messages.javamodel_configuring_searchengine);
      SearchEngine engine = new SearchEngine();
      IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
      try {
        engine.searchAllTypeNames(
          null,
          SearchPattern.R_EXACT_MATCH,
          "!@$#!@".toCharArray(), //$NON-NLS-1$
View Full Code Here


  private Set evaluateStarImportConflicts(IProgressMonitor monitor) throws JavaModelException {
    //long start= System.currentTimeMillis();

    final HashSet/*String*/ onDemandConflicts= new HashSet();

    IJavaSearchScope scope= SearchEngine.createJavaSearchScope(new IJavaElement[] { this.compilationUnit.getJavaProject() });

    ArrayList/*<char[][]>*/  starImportPackages= new ArrayList();
    ArrayList/*<char[][]>*/ simpleTypeNames= new ArrayList();
    int nPackageEntries= this.packageEntries.size();
    for (int i= 0; i < nPackageEntries; i++) {
View Full Code Here

  }
 
  @Test
  public void learning_SearchEngine() throws Exception {
    SearchEngine engine = new SearchEngine();
    IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
    SearchPattern pattern = SearchPattern.createPattern("TestClass2", IJavaSearchConstants.CLASS, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_FULL_MATCH);
    SearchParticipant[] participants = new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()};
    SearchRequestor requestor = new SearchRequestor(){
   
      @Override
View Full Code Here

  }

  private void search(SearchPattern pattern) {
    try {
      SearchEngine engine = new SearchEngine();
      IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
      SearchParticipant[] participants = new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()};
      engine.search(pattern, participants, scope, requestor, monitor);
    } catch (CoreException e) {
      JavaDocActivator.getDefault().handleSystemError(e, this);
    }
View Full Code Here

    /**
     * Show a dialog that lists all main types
     */
    protected void handleSearchButtonSelected() {
        try {
            IJavaSearchScope searchScope = createSearchScope("org.nakedobjects.nof.core.persist.Fixture");
            SelectionDialog dialog = null;
                dialog = JavaUI.createTypeDialog(
                            getTab().getShell(),
                            getTab().getLaunchConfigurationDialog(),
                            searchScope,
View Full Code Here

 
  public void populate(IProgressMonitor monitor) throws CoreException {
    SearchEngine engine = new SearchEngine();
    SearchPattern pattern = SearchPattern.createPattern("Relation", IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE, SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
    SearchParticipant[] participants = new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()};
    IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
   
    engine.search(pattern, participants, scope, this, monitor);
  }
View Full Code Here

 
  public void populate(IProgressMonitor monitor) throws CoreException {
    SearchEngine engine = new SearchEngine();
    SearchPattern pattern = SearchPattern.createPattern("Constraint", IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE, SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
    SearchParticipant[] participants = new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()};
    IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
   
    ConstraintRequestor consReq = new ConstraintRequestor(rels);   
    engine.search(pattern, participants, scope, consReq, monitor);
    constraints.addAll(consReq.getConstraints());
   
View Full Code Here

  public void populate(IProgressMonitor monitor) throws CoreException {
    SearchEngine engine = new SearchEngine();
    SearchPattern pattern = SearchPattern.createPattern("Infer", IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE, SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
    SearchParticipant[] participants = new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()};
    IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
    InferRequestor requestor = new InferRequestor(rels);
   
    engine.search(pattern, participants, scope, requestor, monitor);
    inferRules.addAll(requestor.getRules());
  }
View Full Code Here

    SearchPattern pattern =
      SearchPattern.createPattern(name,
          IJavaSearchConstants.TYPE,
          IJavaSearchConstants.DECLARATIONS,
          SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
    IJavaSearchScope scope =
      SearchEngine.createJavaSearchScope(new IJavaElement[]{javaProject});
    SearchRequestor requestor = new SearchRequestor();
    SearchEngine engine = new SearchEngine();
    SearchParticipant[] participants =
      new SearchParticipant[]{SearchEngine.getDefaultSearchParticipant()};
View Full Code Here

        SearchPattern pattern =
          SearchPattern.createPattern(problem.getArguments()[0],
              IJavaSearchConstants.TYPE,
              IJavaSearchConstants.DECLARATIONS,
              SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
        IJavaSearchScope scope =
          SearchEngine.createJavaSearchScope(new IJavaElement[]{javaProject});
        SearchRequestor requestor = new SearchRequestor();
        SearchEngine engine = new SearchEngine();
        SearchParticipant[] participants =
          new SearchParticipant[]{SearchEngine.getDefaultSearchParticipant()};
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.search.IJavaSearchScope

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.