use of com.intellij.lang.javascript.hierarchy.call.JSCallerMethodsTreeStructure in project intellij-plugins by JetBrains.
the class FlexHierarchyTest method doJSCallHierarchyTest.
private void doJSCallHierarchyTest(final String hierarchyType, final String classFqn, final String methodName, final String scope, final String... fileNames) throws Exception {
doHierarchyTest(() -> {
final JSClass jsClass = (JSClass) JSDialectSpecificHandlersFactory.forLanguage(JavaScriptSupportLoader.ECMA_SCRIPT_L4).getClassResolver().findClassByQName(classFqn, GlobalSearchScope.moduleScope(myModule));
assert jsClass != null;
final JSFunction jsFunction = jsClass.findFunctionByName(methodName);
assert jsFunction != null;
if (CallHierarchyBrowserBase.CALLEE_TYPE.equals(hierarchyType)) {
return new JSCalleeMethodsTreeStructure(myProject, jsFunction, scope);
} else if (CallHierarchyBrowserBase.CALLER_TYPE.equals(hierarchyType)) {
return new JSCallerMethodsTreeStructure(myProject, jsFunction, scope);
}
throw new IllegalArgumentException("Wrong hierarchy type: " + hierarchyType);
}, fileNames);
}
Aggregations