Search in sources :

Example 6 with JsSearchSupport

use of org.eclipse.wst.jsdt.web.core.javascript.search.JsSearchSupport in project webtools.sourceediting by eclipse.

the class JSPTypeRenameChange method createChangesFor.

public static Change[] createChangesFor(IType type, String newName) {
    JsSearchSupport support = JsSearchSupport.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 JsSearchScope(), requestor);
    return requestor.getChanges();
}
Also used : JsSearchScope(org.eclipse.wst.jsdt.web.core.javascript.search.JsSearchScope) JsSearchSupport(org.eclipse.wst.jsdt.web.core.javascript.search.JsSearchSupport)

Aggregations

JsSearchSupport (org.eclipse.wst.jsdt.web.core.javascript.search.JsSearchSupport)6 JsSearchScope (org.eclipse.wst.jsdt.web.core.javascript.search.JsSearchScope)5 SearchDocument (org.eclipse.wst.jsdt.core.search.SearchDocument)2 ArrayList (java.util.ArrayList)1 Iterator (java.util.Iterator)1 List (java.util.List)1 IStatus (org.eclipse.core.runtime.IStatus)1 Status (org.eclipse.core.runtime.Status)1 Change (org.eclipse.ltk.core.refactoring.Change)1 DocumentChange (org.eclipse.ltk.core.refactoring.DocumentChange)1 MultiTextEdit (org.eclipse.text.edits.MultiTextEdit)1 JSDTSearchDocumentDelegate (org.eclipse.wst.jsdt.web.core.javascript.search.JSDTSearchDocumentDelegate)1