public JComponent createMainComponent() {
    myLayoutTreeComponent.initTree();
    DataManager.registerDataProvider(myMainPanel, (EdtNoGetDataProvider)this::uiDataSnapshot);

    myErrorPanelPlace.add(myValidationManager.getMainErrorPanel(), BorderLayout.CENTER);

    final JBSplitter splitter = new OnePixelSplitter(false);
    final JPanel leftPanel = new JPanel(new BorderLayout());
    JPanel treePanel = myLayoutTreeComponent.getTreePanel();
    if (StartupUiUtil.isUnderDarcula()) {
      treePanel.setBorder(JBUI.Borders.emptyTop(3));
    } else {
      treePanel.setBorder(new LineBorder(JBColor.border()));
    }
    leftPanel.add(treePanel, BorderLayout.CENTER);
    if (StartupUiUtil.isUnderDarcula()) {
      CompoundBorder border =
        new CompoundBorder(new CustomLineBorder(0, 0, 0, 1), JBUI.Borders.empty());
      leftPanel.setBorder(border);
    } else {
      leftPanel.setBorder(JBUI.Borders.empty(3, 3, 3, 0));
    }
    splitter.setFirstComponent(leftPanel);

    final JPanel rightPanel = new JPanel(new BorderLayout());
    final JPanel rightTopPanel = new JPanel(new BorderLayout());
    final JPanel labelPanel = new JPanel();
    labelPanel.setLayout(new BoxLayout(labelPanel, BoxLayout.X_AXIS));
    labelPanel.add(new JLabel(JavaUiBundle.message("label.available.elements")));
    final HyperlinkLabel link = new HyperlinkLabel("");
    link.setIcon(AllIcons.General.ContextHelp);
    link.setUseIconAsLink(true);
    link.addHyperlinkListener(new HyperlinkAdapter() {
      @Override
      protected void hyperlinkActivated(@NotNull HyperlinkEvent e) {
        final JLabel label = new JLabel(JavaUiBundle.message("artifact.source.items.tree.tooltip"));
        label.setBorder(HintUtil.createHintBorder());
        label.setBackground(HintUtil.getInformationColor());
        label.setOpaque(true);
        HintManager.getInstance().showHint(label, RelativePoint.getSouthWestOf(link), HintManager.HIDE_BY_ANY_KEY | HintManager.HIDE_BY_TEXT_CHANGE, -1);
      }
    });
    labelPanel.add(link);
    rightTopPanel.add(labelPanel, BorderLayout.CENTER);
    rightPanel.add(rightTopPanel, BorderLayout.NORTH);
    JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(mySourceItemsTree, true);
    JPanel scrollPaneWrap = new JPanel(new BorderLayout());
    scrollPaneWrap.add(scrollPane, BorderLayout.CENTER);
    if (StartupUiUtil.isUnderDarcula()) {
      scrollPaneWrap.setBorder(JBUI.Borders.emptyTop(3));
    } else {
      scrollPaneWrap.setBorder(new LineBorder(JBColor.border()));
    }

    rightPanel.add(scrollPaneWrap, BorderLayout.CENTER);
    if (StartupUiUtil.isUnderDarcula()) {
      rightPanel.setBorder(new CompoundBorder(new CustomLineBorder(0, 1, 0, 0), JBUI.Borders.empty()));
    } else {
      rightPanel.setBorder(JBUI.Borders.empty(3, 0, 3, 3));
    }
    splitter.setSecondComponent(rightPanel);
    splitter.getDivider().setBackground(UIUtil.getPanelBackground());
    treePanel.setBorder(JBUI.Borders.empty());
    rightPanel.setBorder(JBUI.Borders.empty());
    scrollPaneWrap.setBorder(JBUI.Borders.empty());
    leftPanel.setBorder(JBUI.Borders.empty());


    myShowContentCheckBox.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        final ThreeStateCheckBox.State state = myShowContentCheckBox.getState();
        if (state == ThreeStateCheckBox.State.SELECTED) {
          mySubstitutionParameters.setSubstituteAll();
        }
        else if (state == ThreeStateCheckBox.State.NOT_SELECTED) {
          mySubstitutionParameters.setSubstituteNone();
        }
        myShowContentCheckBox.setThirdStateEnabled(false);
        myLayoutTreeComponent.rebuildTree();
        onShowContentSettingsChanged();
      }
    });

    ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("ProjectStructureArtifactEditor", createToolbarActionGroup(), true);
    JComponent toolbarComponent = toolbar.getComponent();
    toolbar.setTargetComponent(treePanel);
    if (StartupUiUtil.isUnderDarcula()) {
      toolbarComponent.setBorder(new CustomLineBorder(0, 0, 1, 0));
    }
    leftPanel.add(toolbarComponent, BorderLayout.NORTH);
    rightTopPanel.setPreferredSize(new Dimension(-1, toolbarComponent.getPreferredSize().height));

    myTabbedPane = new TabbedPaneWrapper(this);
    myTabbedPane.addTab(JavaUiBundle.message("tab.title.output.layout"), splitter);
    myPropertiesEditors.addTabs(myTabbedPane);
    myEditorPanel.add(myTabbedPane.getComponent(), BorderLayout.CENTER);

    final LayoutTree tree = myLayoutTreeComponent.getLayoutTree();
    new ShowAddPackagingElementPopupAction(this).registerCustomShortcutSet(CommonShortcuts.getNew(), tree);
    PopupHandler.installPopupMenu(tree, createPopupActionGroup(), "ArtifactLayoutTreePopup");
    ToolTipManager.sharedInstance().registerComponent(tree);
    rebuildTries();
    return getMainComponent();
  }
public JComponent createMainComponent()