mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 19:02:13 +07:00
get rid of django project name
This commit is contained in:
+10
-3
@@ -29,6 +29,7 @@ import com.jetbrains.python.PythonSdkChooserCombo;
|
||||
import com.jetbrains.python.configuration.PyConfigurableInterpreterList;
|
||||
import com.jetbrains.python.configuration.VirtualEnvProjectFilter;
|
||||
import com.jetbrains.python.newProject.PyFrameworkProjectGenerator;
|
||||
import com.jetbrains.python.newProject.PythonProjectGenerator;
|
||||
import com.jetbrains.python.packaging.PyExternalProcessException;
|
||||
import com.jetbrains.python.packaging.PyPackage;
|
||||
import com.jetbrains.python.packaging.PyPackageManager;
|
||||
@@ -73,12 +74,18 @@ abstract public class AbstractProjectSettingsStep extends AbstractActionWithPane
|
||||
@Override
|
||||
public void stateChanged(boolean validSettings) {
|
||||
checkValid();
|
||||
if (validSettings) {
|
||||
setErrorText(null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (myProjectGenerator instanceof PythonProjectGenerator) {
|
||||
((PythonProjectGenerator)myProjectGenerator).addSettingsStateListener(new PythonProjectGenerator.SettingsListener() {
|
||||
@Override
|
||||
public void stateChanged() {
|
||||
checkValid();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
myCreateAction = new AnAction("Create ", "Create Project", getIcon()) {
|
||||
@Override
|
||||
public void actionPerformed(AnActionEvent e) {
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
package com.jetbrains.python.newProject;
|
||||
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class PythonProjectGenerator {
|
||||
private final List<SettingsListener> myListeners = ContainerUtil.newArrayList();
|
||||
|
||||
@Nullable
|
||||
public JComponent getSettingsPanel(File baseDir) throws ProcessCanceledException {
|
||||
return null;
|
||||
@@ -15,4 +20,18 @@ public abstract class PythonProjectGenerator {
|
||||
public Object getProjectSettings() {
|
||||
return new PyNewProjectSettings();
|
||||
}
|
||||
|
||||
public void addSettingsStateListener(@NotNull SettingsListener listener) {
|
||||
myListeners.add(listener);
|
||||
}
|
||||
|
||||
public interface SettingsListener {
|
||||
void stateChanged();
|
||||
}
|
||||
|
||||
public void fireStateChanged() {
|
||||
for (SettingsListener listener : myListeners) {
|
||||
listener.stateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user