mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-20733: Useless lambda removed
* Swing dialog uses event pumping and does not need spaghetti code. Direct code should be used instead
This commit is contained in:
@@ -61,17 +61,14 @@ public abstract class PythonProjectGenerator<T extends PyNewProjectSettings> imp
|
||||
@Nullable final T settings,
|
||||
@NotNull final Module module) {
|
||||
/*Instead of this method overwrite ``configureProject``*/
|
||||
final Runnable configureProject = () -> configureProject(project, baseDir, settings, module);
|
||||
|
||||
// If we deal with remote project -- use remote manager to configure it
|
||||
final PythonRemoteInterpreterManager remoteManager = PythonRemoteInterpreterManager.getInstance();
|
||||
final Sdk sdk = (settings != null ? settings.getSdk() : null);
|
||||
if (remoteManager != null && PythonSdkType.isRemote(sdk)) {
|
||||
remoteManager.prepareRemoteSettingsIfNeeded(module, sdk, configureProject);
|
||||
}
|
||||
else {
|
||||
configureProject.run();
|
||||
remoteManager.prepareRemoteSettingsIfNeeded(module, sdk);
|
||||
}
|
||||
configureProject(project, baseDir, settings, module);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -138,12 +138,9 @@ public abstract class PythonRemoteInterpreterManager {
|
||||
/**
|
||||
* Prepares project (i.e. sets appropriate mappings) if sdk is remote.
|
||||
* Do not call this method if sdk is not remote: id does nothing
|
||||
*
|
||||
* @param callAfterCheck what to call after configuration completes (runs on AWT)
|
||||
*/
|
||||
public abstract void prepareRemoteSettingsIfNeeded(@NotNull final Module module,
|
||||
@NotNull final Sdk sdk,
|
||||
@NotNull final Runnable callAfterCheck);
|
||||
@NotNull final Sdk sdk);
|
||||
|
||||
public abstract void copyFromRemote(Sdk sdk, @NotNull Project project,
|
||||
RemoteSdkCredentials data,
|
||||
|
||||
Reference in New Issue
Block a user