use of com.intellij.lang.javascript.hierarchy.method.JSMethodHierarchyTreeStructure in project intellij-plugins by JetBrains.
the class FlexHierarchyTest method doJSMethodHierarchyTest.
private void doJSMethodHierarchyTest(final String classFqn, final String methodName, final boolean hideClassesWhereMethodNotImplemented, final String... fileNames) throws Exception {
final HierarchyBrowserManager.State state = HierarchyBrowserManager.getInstance(myProject).getState();
final boolean oldState = state.HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED;
state.HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED = hideClassesWhereMethodNotImplemented;
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;
return new JSMethodHierarchyTreeStructure(myProject, jsFunction);
}, fileNames);
state.HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED = oldState;
}
Aggregations