Skip to content

Commit

Permalink
avoid dialog overflow via word-smithing
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Dec 3, 2020
1 parent 3ce9c7e commit e5e49b3
Showing 1 changed file with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1023,13 +1023,12 @@ private void executePkgCommand(String cmd)

private void restartForInstallWithConfirmation(final String installCmd)
{
String msg = "One or more of the packages that will be updated by this " +
"installation are currently loaded. Restarting R prior " +
"to updating these packages is strongly recommended.\n\n" +
"RStudio can restart R and then automatically continue " +
"the installation after restarting (all work and " +
"data will be preserved during the restart).\n\n" +
"Do you want to restart R prior to installing?";
String msg =
"One or more of the packages to be updated are currently loaded. " +
"Restarting R prior to install is highly recommended.\n\n" +
"RStudio can restart R before installing the requested packages. " +
"All work and data will be preserved during restart.\n\n" +
"Do you want to restart R?";

final boolean haveInstallCmd = installCmd.startsWith("install.packages");

Expand All @@ -1038,13 +1037,12 @@ private void restartForInstallWithConfirmation(final String installCmd)
"Updating Loaded Packages",
msg,
true,
new Operation() { public void execute()
() ->
{
events_.fireEvent(new SuspendAndRestartEvent(
SuspendOptions.createSaveAll(true), installCmd));

}},
new Operation() { public void execute()
},
() ->
{
server_.ignoreNextLoadedPackageCheck(
new VoidServerRequestCallback() {
Expand All @@ -1055,7 +1053,7 @@ public void onSuccess()
executePkgCommand(installCmd);
}
});
}},
},
true);
}

Expand Down

0 comments on commit e5e49b3

Please sign in to comment.