IDEA-131214 Default Project Structure: panels are misplaced
authorSergey Malenkov <sergey.malenkov@jetbrains.com>
Mon, 13 Oct 2014 14:44:47 +0000 (18:44 +0400)
committerSergey Malenkov <sergey.malenkov@jetbrains.com>
Mon, 13 Oct 2014 14:46:34 +0000 (18:46 +0400)
java/idea-ui/src/com/intellij/ide/actions/ShowStructureSettingsAction.java
java/idea-ui/src/com/intellij/ide/actions/TemplateProjectStructureAction.java

index b43698ece136b19d8e6b6f62c245768718acb670..700be0621a60f819befc296ffc24bc3019e1c92f 100644 (file)
@@ -43,7 +43,10 @@ public class ShowStructureSettingsAction extends AnAction implements DumbAware {
     if (project == null) {
       project = ProjectManager.getInstance().getDefaultProject();
     }
+    showDialog(project);
+  }
 
+  static void showDialog(Project project) {
     if (Registry.is("ide.new.project.settings")) {
       new SingleConfigurableEditor(project, ProjectStructureConfigurable.getInstance(project), OptionsEditorDialog.DIMENSION_KEY) {
         @Nullable
index 093552e12be0e040260a6ef3254dafe771c612e4..ed439c6c2b70b8b73ed1a3d8c31da43eb3722066 100644 (file)
@@ -17,17 +17,12 @@ package com.intellij.ide.actions;
 
 import com.intellij.openapi.actionSystem.AnAction;
 import com.intellij.openapi.actionSystem.AnActionEvent;
-import com.intellij.openapi.options.ShowSettingsUtil;
-import com.intellij.openapi.options.newEditor.OptionsEditorDialog;
 import com.intellij.openapi.project.DumbAware;
-import com.intellij.openapi.project.Project;
 import com.intellij.openapi.project.ex.ProjectManagerEx;
-import com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable;
 
 public class TemplateProjectStructureAction extends AnAction implements DumbAware {
   @Override
   public void actionPerformed(final AnActionEvent e) {
-    Project defaultProject = ProjectManagerEx.getInstanceEx().getDefaultProject();
-    ShowSettingsUtil.getInstance().editConfigurable(defaultProject, OptionsEditorDialog.DIMENSION_KEY, ProjectStructureConfigurable.getInstance(defaultProject));
+    ShowStructureSettingsAction.showDialog(ProjectManagerEx.getInstanceEx().getDefaultProject());
   }
 }
\ No newline at end of file