mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
moved plugin-specific project types to the different step
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 945 B |
@@ -836,6 +836,7 @@ public class AllIcons {
|
||||
public static final Icon PinToolWindow = IconLoader.getIcon("/nodes/pinToolWindow.png"); // 13x13
|
||||
public static final Icon Plugin = IconLoader.getIcon("/nodes/plugin.png"); // 16x16
|
||||
public static final Icon PluginJB = IconLoader.getIcon("/nodes/pluginJB.png"); // 16x16
|
||||
public static final Icon PluginLogo = IconLoader.getIcon("/nodes/pluginLogo.png"); // 32x32
|
||||
public static final Icon Pluginnotinstalled = IconLoader.getIcon("/nodes/pluginnotinstalled.png"); // 16x16
|
||||
public static final Icon Pluginobsolete = IconLoader.getIcon("/nodes/pluginobsolete.png"); // 16x16
|
||||
public static final Icon PluginRestart = IconLoader.getIcon("/nodes/pluginRestart.png"); // 16x16
|
||||
|
||||
@@ -53,7 +53,7 @@ public class PyCharmNewProjectDialog extends DialogWrapper {
|
||||
|
||||
@Override
|
||||
public Dimension getMinimumSize() {
|
||||
return new Dimension(800, 500);
|
||||
return new Dimension(650, 350);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
+12
-5
@@ -24,6 +24,7 @@ import com.intellij.platform.DirectoryProjectGenerator;
|
||||
import com.intellij.platform.WebProjectGenerator;
|
||||
import com.intellij.ui.DocumentAdapter;
|
||||
import com.intellij.ui.JBColor;
|
||||
import com.intellij.ui.components.JBScrollPane;
|
||||
import com.intellij.util.NullableConsumer;
|
||||
import com.intellij.util.ui.CenteredIcon;
|
||||
import com.jetbrains.python.PythonSdkChooserCombo;
|
||||
@@ -103,14 +104,20 @@ abstract public class AbstractProjectSettingsStep extends AbstractActionWithPane
|
||||
@Override
|
||||
public JPanel createPanel() {
|
||||
final JPanel mainPanel = new JPanel(new BorderLayout());
|
||||
mainPanel.setPreferredSize(new Dimension(mainPanel.getPreferredSize().width, 450));
|
||||
final JPanel scrollPanel = new JPanel(new BorderLayout());
|
||||
|
||||
mainPanel.setPreferredSize(new Dimension(mainPanel.getPreferredSize().width, 300));
|
||||
|
||||
final JPanel panel = createBasePanel();
|
||||
mainPanel.add(panel, BorderLayout.NORTH);
|
||||
|
||||
scrollPanel.add(panel, BorderLayout.NORTH);
|
||||
final JPanel advancedSettings = createAdvancedSettings();
|
||||
if (advancedSettings != null)
|
||||
mainPanel.add(advancedSettings, BorderLayout.CENTER);
|
||||
if (advancedSettings != null) {
|
||||
scrollPanel.add(advancedSettings, BorderLayout.CENTER);
|
||||
}
|
||||
final JBScrollPane scrollPane = new JBScrollPane(scrollPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
|
||||
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
scrollPane.setBorder(null);
|
||||
mainPanel.add(scrollPane, BorderLayout.CENTER);
|
||||
|
||||
final JPanel bottomPanel = new JPanel(new BorderLayout());
|
||||
myCreateButton = new Button(myCreateAction, myCreateAction.getTemplatePresentation());
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.jetbrains.python.newProject.actions;
|
||||
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.platform.DirectoryProjectGenerator;
|
||||
import com.intellij.util.NullableConsumer;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PluginSpecificProjectsStep extends DefaultActionGroup implements DumbAware {
|
||||
|
||||
public PluginSpecificProjectsStep(@NotNull final NullableConsumer<AbstractProjectSettingsStep> callback,
|
||||
@NotNull final List<DirectoryProjectGenerator> projectGenerators) {
|
||||
super("Plugin-specific", true);
|
||||
getTemplatePresentation().setIcon(AllIcons.Nodes.PluginLogo);
|
||||
for (DirectoryProjectGenerator generator : projectGenerators) {
|
||||
add(new ProjectSpecificAction(callback, generator));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.jetbrains.python.newProject.actions;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.intellij.ide.GeneralSettings;
|
||||
import com.intellij.ide.util.projectWizard.WebProjectTemplate;
|
||||
import com.intellij.internal.statistic.UsageTrigger;
|
||||
@@ -172,8 +173,17 @@ public class PyCharmNewProjectStep extends DefaultActionGroup implements DumbAwa
|
||||
return o1.getName().compareTo(o2.getName());
|
||||
}
|
||||
});
|
||||
|
||||
List<DirectoryProjectGenerator> pluginSpecificGenerators = Lists.newArrayList();
|
||||
for (DirectoryProjectGenerator generator : generators) {
|
||||
add(new ProjectSpecificAction(callback, generator));
|
||||
if (generator instanceof PythonProjectGenerator)
|
||||
add(new ProjectSpecificAction(callback, generator));
|
||||
else
|
||||
pluginSpecificGenerators.add(generator);
|
||||
}
|
||||
|
||||
if (!pluginSpecificGenerators.isEmpty()) {
|
||||
add(new PluginSpecificProjectsStep(callback, pluginSpecificGenerators));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user