Examples of JSPSearchSupport


Examples of org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport

  /**
   * @deprecated
   */
  public static Change[] createChangesFor(IType type, String newName) {
   
    JSPSearchSupport support = JSPSearchSupport.getInstance();
    // should be handled by JSPIndexManager
    // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3036
    // support.indexWorkspaceAndWait();
   
    JSPTypeMoveRequestor requestor = new JSPTypeMoveRequestor(type, newName);
    support.searchRunnable(type, new JSPSearchScope(), requestor);

    return requestor.getChanges();
  }
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport

   */
  protected Change[] createChangesFor(IJavaElement element, String newName) {
    Change[] changes;
    BasicRefactorSearchRequestor requestor = getSearchRequestor(element, newName);
    if(requestor != null) {
      JSPSearchSupport support = JSPSearchSupport.getInstance();
      support.searchRunnable(element, new JSPSearchScope(), requestor);
      changes = requestor.getChanges(this);
    } else {
      changes = new Change[0];
    }
   
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport

   */
  protected Change[] createChangesFor(IJavaElement element, String newName) {
    Change[] changes;
    BasicRefactorSearchRequestor requestor = getSearchRequestor(element, newName);
    if(requestor != null) {
      JSPSearchSupport support = JSPSearchSupport.getInstance();
      support.searchRunnable(element, new JSPSearchScope(), requestor);
      changes = requestor.getChanges(this);
    } else {
      changes = new Change[0];
    }
   
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport

  }
 
  protected IStatus doQuery(IProgressMonitor monitor) {
    IStatus status = Status.OK_STATUS;
    try {
      JSPSearchSupport support = JSPSearchSupport.getInstance();
      // index the file
      SearchDocument delegate =  support.addJspFile(getFile());
     
      String scopePath = delegate.getPath();
      JSPSearchScope singleFileScope = new JSPSearchScope(new String[]{getFile().getFullPath().toString(), scopePath});
     
      // perform a searchs
      // by passing in this jsp search query, requstor can add matches
      support.searchRunnable(getJavaElement(), singleFileScope, new JSPSingleFileSearchRequestor(getInstance()), monitor);
    }
    catch (Exception e){
      status = new Status(IStatus.ERROR, "org.eclipse.wst.sse.ui", IStatus.OK, "", null); //$NON-NLS-1$  //$NON-NLS-2$
    }
    return status;
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport

  /**
   * @deprecated
   */
  public static Change[] createChangesFor(IMethod method, String newName) {
    JSPSearchSupport support = JSPSearchSupport.getInstance();
   
    // should be handled by JSPIndexManager
    // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3036
    // support.indexWorkspaceAndWait();
   
    BasicRefactorSearchRequestor requestor = new JSPMethodRenameRequestor(method, newName);
    support.searchRunnable(method, new JSPSearchScope(), requestor);

    return requestor.getChanges();
  }
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport

  /**
   * @deprecated
   */
  public static Change[] createChangesFor(IPackageFragment pkg, String newName) {
    JSPSearchSupport support = JSPSearchSupport.getInstance();
   
    // should be handled by JSPIndexManager
    // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3036
    //support.indexWorkspaceAndWait();
   
    BasicRefactorSearchRequestor requestor = new JSPPackageRenameRequestor(pkg, newName);
    support.searchRunnable(pkg, new JSPSearchScope(), requestor);

    return requestor.getChanges();
  }
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport

  /**
   * @deprecated
   */
  public static Change[] createChangesFor(IType type, String newName) {
    JSPSearchSupport support = JSPSearchSupport.getInstance();
   
    // should be handled by JSPIndexManager
    // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3036
    // support.indexWorkspaceAndWait();
 
   
    JSPTypeRenameRequestor requestor = new JSPTypeRenameRequestor(type, newName);
    support.searchRunnable(type, new JSPSearchScope(), requestor);

    return requestor.getChanges();
  }
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport

  }
 
  protected IStatus doQuery() {
    IStatus status = Status.OK_STATUS;
    try {
      JSPSearchSupport support = JSPSearchSupport.getInstance();
      // index the file
      SearchDocument delegate =  support.addJspFile(getFile());
     
      String scopePath = delegate.getPath();
      JSPSearchScope singleFileScope = new JSPSearchScope(new String[]{getFile().getFullPath().toString(), scopePath});
     
      // perform a searchs
      // by passing in this jsp search query, requstor can add matches
      support.searchRunnable(getJavaElement(), singleFileScope, new JSPSingleFileSearchRequestor(getInstance()));
    }
    catch (Exception e){
      status = new Status(IStatus.ERROR, "org.eclipse.wst.sse.ui", IStatus.OK, "", null); //$NON-NLS-1$  //$NON-NLS-2$
    }
    return status;
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport

   *
   * @deprecated
   */
  public Change[] getChanges() {
   
    JSPSearchSupport support = JSPSearchSupport.getInstance();
    List changes = new ArrayList();
    Iterator keys = fSearchDocPath2JavaEditMap.keySet().iterator();
    String searchDocPath = null;
    SearchDocument delegate = null;
   
    while(keys.hasNext()) {
      // create on the fly
      searchDocPath = (String)keys.next();
      MultiTextEdit javaEdit = (MultiTextEdit)fSearchDocPath2JavaEditMap.get(searchDocPath);
      delegate = support.getSearchDocument(searchDocPath);
     
      if(delegate != null && delegate instanceof JavaSearchDocumentDelegate) {
        JavaSearchDocumentDelegate javaDelegate = (JavaSearchDocumentDelegate)delegate;
        changes.add(createChange(javaDelegate, javaDelegate.getJspTranslation().getJspEdit(javaEdit)));
      }
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport

   * added to existing {@link TextChange}s then those existing {@link TextChange}s will not be
   * returned in this array.
   */
  public Change[] getChanges(RefactoringParticipant participant) {
   
    JSPSearchSupport support = JSPSearchSupport.getInstance();
    List changes = new ArrayList();
    Iterator keys = fSearchDocPath2JavaEditMap.keySet().iterator();
    String searchDocPath = null;
    SearchDocument delegate = null;
   
    while(keys.hasNext()) {
      // create on the fly
      searchDocPath = (String)keys.next();
      MultiTextEdit javaEdit = (MultiTextEdit)fSearchDocPath2JavaEditMap.get(searchDocPath);
      delegate = support.getSearchDocument(searchDocPath);
     
      if(delegate != null && delegate instanceof JavaSearchDocumentDelegate) {
        JavaSearchDocumentDelegate javaDelegate = (JavaSearchDocumentDelegate)delegate;
        Change change = createChange(javaDelegate, javaDelegate.getJspTranslation().getJspEdit(javaEdit), participant);
        changes.add(change);
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.