Search in sources :

Example 6 with JsSearchScope

use of org.eclipse.wst.jsdt.web.core.javascript.search.JsSearchScope 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

JsSearchScope (org.eclipse.wst.jsdt.web.core.javascript.search.JsSearchScope)6 JsSearchSupport (org.eclipse.wst.jsdt.web.core.javascript.search.JsSearchSupport)5 IStatus (org.eclipse.core.runtime.IStatus)1 Status (org.eclipse.core.runtime.Status)1 IJavaScriptElement (org.eclipse.wst.jsdt.core.IJavaScriptElement)1 SearchDocument (org.eclipse.wst.jsdt.core.search.SearchDocument)1 SearchRequestor (org.eclipse.wst.jsdt.core.search.SearchRequestor)1 ElementQuerySpecification (org.eclipse.wst.jsdt.ui.search.ElementQuerySpecification)1 ISearchRequestor (org.eclipse.wst.jsdt.ui.search.ISearchRequestor)1 PatternQuerySpecification (org.eclipse.wst.jsdt.ui.search.PatternQuerySpecification)1 JsSearchRequestor (org.eclipse.wst.jsdt.web.ui.internal.java.search.JsSearchRequestor)1