'Show project structure' actions moved to idea-ui module
[idea/community.git] / platform / platform-impl / src / com / intellij / ide / actions / ShowSettingsUtilImpl.java
index 2492b85246b7a4c56273eec10a97c64dd74e5b04..f1feefdc86bcbb188888671781b7f513e7c3f251 100644 (file)
@@ -17,6 +17,7 @@ package com.intellij.ide.actions;
 
 import com.intellij.ide.util.PropertiesComponent;
 import com.intellij.openapi.application.ApplicationManager;
+import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.options.Configurable;
 import com.intellij.openapi.options.ConfigurableGroup;
 import com.intellij.openapi.options.ShowSettingsUtil;
@@ -36,6 +37,7 @@ import java.util.List;
  * @author max
  */
 public class ShowSettingsUtilImpl extends ShowSettingsUtil {
+  private static final Logger LOG = Logger.getInstance("#com.intellij.ide.actions.ShowSettingsUtilImpl");
   @NonNls
   private static final String PREFER_CLASSIC_OPTIONS_EDITOR = "PREFER_CLASSIC_OPTIONS_EDITOR";
 
@@ -147,6 +149,21 @@ public class ShowSettingsUtilImpl extends ShowSettingsUtil {
     return configurableEditor.isOK();
   }
 
+  @Override
+  public boolean editProjectConfigurable(@NotNull Project project,
+                                         Class<? extends Configurable> configurableClass,
+                                         @NonNls String dimensionServiceKey) {
+    final Configurable configurable = findProjectConfigurable(project, configurableClass);
+    if (configurable == null) {
+      LOG.error("Cannot find project configurable for " + configurableClass);
+      return false;
+    }
+    if (dimensionServiceKey == null) {
+      dimensionServiceKey = createDimensionKey(configurable);
+    }
+    return editConfigurable(project, dimensionServiceKey, configurable);
+  }
+
   public boolean editConfigurable(Component parent, Configurable configurable) {
     final SingleConfigurableEditor configurableEditor = new SingleConfigurableEditor(parent, configurable, createDimensionKey(configurable));
     configurableEditor.show();