mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-78469 Gradle New Project Wizard: details populated from prior creation
Avoiding excessive exporting
This commit is contained in:
@@ -65,6 +65,8 @@ public class GradleApiFacadeManager {
|
||||
|
||||
private final AtomicReference<Pair<GradleApiFacade, RemoteGradleProcessSettings>> myFacade
|
||||
= new AtomicReference<Pair<GradleApiFacade, RemoteGradleProcessSettings>>();
|
||||
private final AtomicReference<RemoteGradleProgressNotificationManager> myExportedProgressManager
|
||||
= new AtomicReference<RemoteGradleProgressNotificationManager>();
|
||||
|
||||
private final GradleLibraryManager myGradleLibraryManager;
|
||||
private final RemoteGradleProgressNotificationManager myProgressManager;
|
||||
@@ -110,7 +112,7 @@ public class GradleApiFacadeManager {
|
||||
Collection<File> gradleLibraries = myGradleLibraryManager.getAllLibraries(null);
|
||||
GradleLog.LOG.assertTrue(gradleLibraries != null, GradleBundle.message("gradle.generic.text.error.sdk.undefined"));
|
||||
if (gradleLibraries == null) {
|
||||
return null;
|
||||
throw new ExecutionException("Can't find gradle libraries");
|
||||
}
|
||||
|
||||
final SimpleJavaParameters params = new SimpleJavaParameters();
|
||||
@@ -230,7 +232,16 @@ public class GradleApiFacadeManager {
|
||||
return myFacade.get().first;
|
||||
}
|
||||
result.applySettings(getRemoteSettings());
|
||||
RemoteGradleProgressNotificationManager exported = (RemoteGradleProgressNotificationManager)UnicastRemoteObject.exportObject(myProgressManager, 0);
|
||||
RemoteGradleProgressNotificationManager exported = myExportedProgressManager.get();
|
||||
if (exported == null) {
|
||||
try {
|
||||
exported = (RemoteGradleProgressNotificationManager)UnicastRemoteObject.exportObject(myProgressManager, 0);
|
||||
myExportedProgressManager.set(exported);
|
||||
}
|
||||
catch (RemoteException e) {
|
||||
exported = myExportedProgressManager.get();
|
||||
}
|
||||
}
|
||||
if (exported == null) {
|
||||
GradleLog.LOG.warn("Can't export progress manager");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user