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:
Ilya.Kazakevich
2016-09-15 17:45:38 +03:00
parent 301e5a6357
commit ad301c145b
2 changed files with 3 additions and 9 deletions
@@ -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,