Source:
<code>public RestartRequirement onApply(UserPrefs prefs) { RestartRequirement restartRequirement = super.onApply(prefs); prefs_.lineEndingConversion().setGlobalValue(lineEndings_.getValue()); prefs_.ansiConsoleMode().setGlobalValue(consoleColorMode_.getValue()); prefs_.defaultEncoding().setGlobalValue(encodingValue_); prefs_.codeCompletion().setGlobalValue(showCompletions_.getValue()); prefs_.codeCompletionOther().setGlobalValue(showCompletionsOther_.getValue()); String editorMode = editorMode_.getValue(); prefs_.editorKeybindings().setGlobalValue(editorMode); boolean isVim = editorMode == UserPrefs.EDITOR_KEYBINDINGS_VIM; boolean isEmacs = editorMode == UserPrefs.EDITOR_KEYBINDINGS_EMACS; boolean isSublime = editorMode == UserPrefs.EDITOR_KEYBINDINGS_SUBLIME; if (isVim) ShortcutManager.INSTANCE.setEditorMode(KeyboardShortcut.MODE_VIM); else if (isEmacs) ShortcutManager.INSTANCE.setEditorMode(KeyboardShortcut.MODE_EMACS); else if (isSublime) ShortcutManager.INSTANCE.setEditorMode(KeyboardShortcut.MODE_SUBLIME); else ShortcutManager.INSTANCE.setEditorMode(KeyboardShortcut.MODE_DEFAULT); prefs_.foldStyle().setGlobalValue(foldMode_.getValue()); prefs_.surroundSelection().setGlobalValue(delimiterSurroundWidget_.getValue()); prefs_.executionBehavior().setGlobalValue(executionBehavior_.getValue()); prefs_.autoSaveOnIdle().setGlobalValue(autoSaveOnIdle_.getValue()); <START> prefs_.autoSaveIdleMs().setGlobalValue(Integer.parseInt(autoSaveIdleMs_.getValue())); <END> return restartRequirement; }</code><technical_language>Do worth StringUtil.parseInt(<...>, 1000) here, avoid a potential exception a parse failure? (It invalid options handled in dialog paranoid hurt here)</technical_language>

Target:
public RestartRequirement onApply(UserPrefs prefs) { RestartRequirement restartRequirement = super.onApply(prefs); prefs_.lineEndingConversion().setGlobalValue(lineEndings_.getValue()); prefs_.ansiConsoleMode().setGlobalValue(consoleColorMode_.getValue()); prefs_.defaultEncoding().setGlobalValue(encodingValue_); prefs_.codeCompletion().setGlobalValue(showCompletions_.getValue()); prefs_.codeCompletionOther().setGlobalValue(showCompletionsOther_.getValue()); String editorMode = editorMode_.getValue(); prefs_.editorKeybindings().setGlobalValue(editorMode); boolean isVim = editorMode == UserPrefs.EDITOR_KEYBINDINGS_VIM; boolean isEmacs = editorMode == UserPrefs.EDITOR_KEYBINDINGS_EMACS; boolean isSublime = editorMode == UserPrefs.EDITOR_KEYBINDINGS_SUBLIME; if (isVim) ShortcutManager.INSTANCE.setEditorMode(KeyboardShortcut.MODE_VIM); else if (isEmacs) ShortcutManager.INSTANCE.setEditorMode(KeyboardShortcut.MODE_EMACS); else if (isSublime) ShortcutManager.INSTANCE.setEditorMode(KeyboardShortcut.MODE_SUBLIME); else ShortcutManager.INSTANCE.setEditorMode(KeyboardShortcut.MODE_DEFAULT); prefs_.foldStyle().setGlobalValue(foldMode_.getValue()); prefs_.surroundSelection().setGlobalValue(delimiterSurroundWidget_.getValue()); prefs_.executionBehavior().setGlobalValue(executionBehavior_.getValue()); prefs_.autoSaveOnIdle().setGlobalValue(autoSaveOnIdle_.getValue()); prefs_.autoSaveIdleMs().setGlobalValue(StringUtil.parseInt(autoSaveIdleMs_.getValue(), 1000)); return restartRequirement; }