private <P extends JpsElement> JComponent createFolderComponent(ContentFolderRef folderRef, Color foreground, ModuleSourceRootEditHandler<P> editor) {
    final VirtualFile folderFile = folderRef.getFile();
    final VirtualFile contentEntryFile = getContentEntry().getFile();
    ContentFolder folder = folderRef.getContentFolder();
    final String properties = folder instanceof SourceFolder ? StringUtil.notNullize(editor.getPropertiesString((P)((SourceFolder)folder).getJpsElement().getProperties())) : "";
    if (folderFile != null && contentEntryFile != null) {
      String path = folderFile.equals(contentEntryFile)? "." : VfsUtilCore.getRelativePath(folderFile, contentEntryFile, File.separatorChar);
      HoverHyperlinkLabel hyperlinkLabel = new HoverHyperlinkLabel(path + properties, foreground);
      hyperlinkLabel.setMinimumSize(new Dimension(0, 0));
      hyperlinkLabel.addHyperlinkListener(new HyperlinkListener() {
        @Override
        public void hyperlinkUpdate(HyperlinkEvent e) {
          myCallback.navigateFolder(getContentEntry(), folderRef);
        }
      });
      registerTextComponent(hyperlinkLabel, foreground);
      return new UnderlinedPathLabel(hyperlinkLabel);
    }
    else {
      String path = toRelativeDisplayPath(folderRef.getUrl(), getContentEntry().getUrl());
      final JLabel pathLabel = new JLabel(path + properties);
      pathLabel.setOpaque(false);
      pathLabel.setForeground(JBColor.RED);

      return new UnderlinedPathLabel(pathLabel);
    }
  }
private <P extends JpsElement> JComponent createFolderComponent(ContentFolderRef folderRef, Color foreground, ModuleSourceRootEditHandler<P> editor)