/** * Determines if an existing directory can be written to. * * @param dir the directory * @return {@code true} if the directory can be written to, otherwise {@code false} */ protected boolean checkOverwrite(File dir) { boolean result = true; // if 'ShowExistingDirectoryWarning' configuration option set 'false' then don't show // "The directory already exists! Are you sure you want to install here and possibly overwrite existing files?" // warning dialog: String show = getMetadata().getConfigurationOptionValue(PathInputBase.SHOWEXISTINGDIRECTORYWARNING, installData.getRules()); if ((show == null || Boolean.getBoolean(show)) && dir.isDirectory() && dir.list().length > 0) { result = askWarningQuestion(getString("installer.warning"), warnMsg, AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES) == AbstractUIHandler.ANSWER_YES; } return result; }
/** * Determines if an existing directory can be written to. * * @param dir the directory * @return {@code true} if the directory can be written to, otherwise {@code false} */ protected boolean checkOverwrite(File dir, Console console) { boolean result = true; // if 'ShowExistingDirectoryWarning' configuration option set 'false' then don't show // "The directory already exists! Are you sure you want to install here and possibly overwrite existing files?" // warning dialog: String show = getPanel().getConfigurationOptionValue(PathInputBase.SHOWEXISTINGDIRECTORYWARNING, installData.getRules()); if ((show == null || Boolean.getBoolean(show)) && dir.isDirectory() && dir.list().length > 0) { Messages messages = installData.getMessages(); result = askUser(messages.get("installer.warning"), messages.get("TargetPanel.warn"), Prompt.Option.NO); } return result; }
/** * Determines if the specified directory can be created. * * @param dir the directory * @return {@code true} if the directory may be created, otherwise {@code false} */ protected boolean checkCreateDirectory(File dir) { boolean result = true; // if 'ShowCreateDirectoryMessage' configuration option set 'false' then don't show // then don't show "directory will be created" dialog: String show = getMetadata().getConfigurationOptionValue(PathInputBase.SHOWCREATEDIRECTORYMESSAGE, installData.getRules()); if (show == null || Boolean.getBoolean(show)) { result = emitNotificationFeedback(getI18nStringForClass("createdir", "TargetPanel") + "\n" + dir); } return result; }
boolean paging = Boolean.parseBoolean(panel.getConfigurationOptionValue("console-text-paging", rules)); boolean wordwrap = Boolean.parseBoolean(panel.getConfigurationOptionValue("console-text-wordwrap", rules));
/** * Determines if the specified directory can be created. * * @param dir the directory * @return {@code true} if the directory may be created, otherwise {@code false} */ protected boolean checkCreateDirectory(File dir, Console console) { boolean result = true; // if 'ShowCreateDirectoryMessage' configuration option set 'false' then don't show // then don't show "directory will be created" dialog: String show = getPanel().getConfigurationOptionValue(PathInputBase.SHOWCREATEDIRECTORYMESSAGE, installData.getRules()); if (show == null || Boolean.getBoolean(show)) { Messages messages = installData.getMessages(); result = (OK == prompt.confirm(WARNING, messages.get("installer.Message"), messages.get("TargetPanel.createdir") + "\n" + dir, OK_CANCEL, OK)); } return result; }
if ((mustExist = panel.getConfigurationOptionValue("mustExist", installData.getRules())) != null) { this._mustExist = Boolean.parseBoolean(mustExist);