package com.intellij.openapi.options;

import com.intellij.ui.TabbedPaneWrapper;

import javax.swing.*;
import java.awt.*;

/**
 * @author yole
 */
public abstract class TabbedConfigurable extends CompositeConfigurable<Configurable> {
  private TabbedPaneWrapper myTabbedPane;

  public JComponent createComponent() {
    myTabbedPane = new TabbedPaneWrapper();
    for (Configurable configurable : getConfigurables()) {
      myTabbedPane.addTab(configurable.getDisplayName(), configurable.getIcon(), configurable.createComponent(), null);
    }
    final JComponent component = myTabbedPane.getComponent();
    component.setPreferredSize(new Dimension(500, 400));
    return component;
  }

  @Override
  public void disposeUIResources() {
    myTabbedPane = null;
    super.disposeUIResources();
  }
}

@@ -236,13 +236,15 @@
   pr
-ivate
+otected
  Tab
@@ -353,24 +353,244 @@
 eWrapper();%0A
+    createConfigurableTabs();%0A    final JComponent component = myTabbedPane.getComponent();%0A    component.setPreferredSize(new Dimension(500, 400));%0A    return component;%0A  %7D%0A%0A  protected void createConfigurableTabs() %7B%0A
     for (Con
@@ -766,149 +766,8 @@
   %7D%0A
-    final JComponent component = myTabbedPane.getComponent();%0A    component.setPreferredSize(new Dimension(500, 400));%0A    return component;%0A
   %7D%0A

use TabbedConfigurable for Ruby IDE SDK configurable; fix NPE