void () { final Set<PsiFile> set = new HashSet<>(); ContainerUtil.addAll(set, getPackageDirectory("package1").getFiles()); set.add(JavaPsiFacade.getInstance(getProject()).findClass(CommonClassNames.JAVA_LANG_OBJECT, GlobalSearchScope.allScope(getProject())).getContainingFile()); final DependenciesPanel.DependencyPanelSettings panelSettings = new DependenciesPanel.DependencyPanelSettings(); panelSettings.UI_COMPACT_EMPTY_MIDDLE_PACKAGES = false; panelSettings.UI_FLATTEN_PACKAGES = false; panelSettings.UI_SHOW_FILES = true; panelSettings.UI_FILTER_LEGALS = false; panelSettings.UI_SHOW_MODULES = true; panelSettings.UI_GROUP_BY_SCOPE_TYPE = false; TreeModel model = FileTreeModelBuilder.createTreeModel(getProject(), false, set, ALL_MARKED, panelSettings); JTree tree = new Tree(); TreeTestUtil.assertTreeUI(tree); tree.setModel(model); PlatformTestUtil.expandAll(tree); PlatformTestUtil.assertTreeEqual(tree, """ -Root -structure -src -package1 Test1.java -External Dependencies -< java 1.7 > -rt.jar -java -lang Object.class"""); }