public SourceItemsTree(ArtifactEditorContext editorContext, ArtifactEditorImpl artifactsEditor) { myArtifactsEditor = artifactsEditor; myBuilder = new SimpleTreeBuilder(this, this.getBuilderModel(), new SourceItemsTreeStructure(editorContext, artifactsEditor), new WeightBasedComparator(true)); setRootVisible(false); setShowsRootHandles(true); Disposer.register(this, myBuilder); PopupHandler.installPopupHandler(this, createPopupGroup(), ActionPlaces.UNKNOWN, ActionManager.getInstance()); installDnD(); }
@Nullable private WeightBasedComparator getComparator() { return mySortElements ? new WeightBasedComparator(true) : null; }