Continuation added to updateRuntime()

This commit is contained in:
Andrey Breslav
2013-01-25 16:14:05 +04:00
parent c662f51a0a
commit 5a09d3a6b5
2 changed files with 4 additions and 3 deletions
@@ -222,7 +222,8 @@ public class KotlinRuntimeLibraryUtil {
public static void updateRuntime( public static void updateRuntime(
@NotNull final Project project, @NotNull final Project project,
@NotNull final Runnable jarNotFoundHandler @NotNull final Runnable jarNotFoundHandler,
@Nullable final Runnable continuation
) { ) {
ApplicationManager.getApplication().invokeLater(new Runnable() { ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override @Override
@@ -241,7 +242,7 @@ public class KotlinRuntimeLibraryUtil {
catch (IOException e) { catch (IOException e) {
throw new AssertionError(e); throw new AssertionError(e);
} }
runtimeJar.refresh(true, true); runtimeJar.refresh(true, true, continuation);
} }
}); });
} }
@@ -73,7 +73,7 @@ public class OutdatedKotlinRuntimeNotification extends AbstractProjectComponent
"kotlin-runtime.jar is not found. Make sure plugin is properly installed.", "kotlin-runtime.jar is not found. Make sure plugin is properly installed.",
"No Runtime Found"); "No Runtime Found");
} }
}); }, null);
} }
else if ("ignore".equals(event.getDescription())) { else if ("ignore".equals(event.getDescription())) {
PropertiesComponent.getInstance(myProject).setValue(SUPPRESSED_PROPERTY_NAME, pluginVersion); PropertiesComponent.getInstance(myProject).setValue(SUPPRESSED_PROPERTY_NAME, pluginVersion);