// --------------------------------------------------------------------------- // Show confirmation message depending on the amount and type of the // selected plugin descriptors: already downloaded plugins need "update" // while non-installed yet need "install". // --------------------------------------------------------------------------- private boolean userConfirm(IdeaPluginDescriptor[] selection) { String message; if (selection.length == 1) { if (selection[0] instanceof IdeaPluginDescriptorImpl) { message = IdeBundle.message("prompt.update.plugin", selection[0].getName()); } else { message = IdeBundle.message("prompt.download.and.install.plugin", selection[0].getName()); } } else { message = IdeBundle.message("prompt.install.several.plugins", selection.length); } return Messages.showYesNoDialog( myHost.getMainPanel(), message, IdeBundle.message("action.download.and.install.plugin"), Messages.getQuestionIcon()) == Messages.YES; }