JComponent (@NotNull final SourceFolder folder, @NotNull final JComponent parentComponent, @NotNull final ContentRootPanel.ActionCallback callback) { final IconActionComponent iconComponent = new IconActionComponent(AllIcons.General.Inline_edit, AllIcons.General.Inline_edit_hovered, ProjectBundle.message("module.paths.edit.properties.tooltip"), () -> { JavaResourceRootProperties properties = folder.getJpsElement().getProperties( JavaModuleSourceRootTypes.RESOURCES); assert properties != null; ResourceRootPropertiesDialog dialog = new ResourceRootPropertiesDialog(parentComponent, properties); if (dialog.showAndGet()) { callback.onSourceRootPropertiesChanged(folder); } }); final JPanel panel = new JPanel(new BorderLayout()); panel.setOpaque(false); panel.add(iconComponent, BorderLayout.CENTER); panel.add(Box.createHorizontalStrut(3), BorderLayout.EAST); return panel; }