JComponent () { ScopeViewTreeModel myTreeModel; if (this.myTreeModel.get() == null) { myTreeModel = new ScopeViewTreeModel(myProject, new ProjectViewSettings.Delegate(myProject, ID)); myTreeModel.setStructureProvider(CompoundTreeStructureProvider.get(myProject)); myTreeModel.setNodeDecorator(CompoundProjectViewNodeDecorator.get(myProject)); myTreeModel.setFilter(getFilter(getSubId())); myTreeModel.setComparator(createComparator()); this.myTreeModel.set(myTreeModel); } else { myTreeModel = this.myTreeModel.get(); } if (myTree == null) { myTree = new ProjectViewTree(new AsyncTreeModel(myTreeModel, this)); myTree.setName("ScopeViewTree"); myTree.setRootVisible(false); myTree.setShowsRootHandles(true); myTree.addTreeSelectionListener(new RestoreSelectionListener()); TreeUtil.installActions(myTree); ToolTipManager.sharedInstance().registerComponent(myTree); EditSourceOnDoubleClickHandler.install(myTree); EditSourceOnEnterKeyHandler.install(myTree); CustomizationUtil.installPopupHandler(myTree, IdeActions.GROUP_SCOPE_VIEW_POPUP, ActionPlaces.SCOPE_VIEW_POPUP); TreeUIHelper.getInstance().installTreeSpeedSearch(myTree); enableDnD(); myTree.getEmptyText() .setText(IdeBundle.message("scope.view.empty.text")) .appendSecondaryText(IdeBundle.message("scope.view.empty.link"), LINK_PLAIN_ATTRIBUTES, event -> { ProjectView view = myProject.isDisposed() ? null : ProjectView.getInstance(myProject); if (view != null) view.changeView(ProjectViewPane.ID); }); } if (myScrollPane == null) { myScrollPane = ScrollPaneFactory.createScrollPane(myTree, true); ErrorStripePainter painter = new ErrorStripePainter(true); Disposer.register(this, new TreeUpdater<>(painter, myScrollPane, myTree) { @Override protected void update(ErrorStripePainter painter, int index, Object object) { super.update(painter, index, myTreeModel.getStripe(object, myTree.isExpanded(index))); } }); } else { SwingUtilities.updateComponentTreeUI(myScrollPane); } return myScrollPane; }