1 19 20 package org.netbeans.editor; 21 22 import java.util.Map ; 23 24 35 36 public class BaseSettingsInitializer extends Settings.AbstractInitializer { 37 38 39 public static final String NAME = "base-settings-initializer"; 41 public BaseSettingsInitializer() { 42 super(NAME); 43 } 44 45 52 public void updateSettingsMap(Class kitClass, Map settingsMap) { 53 54 if (kitClass == BaseKit.class) { 56 settingsMap.put(SettingsNames.TAB_SIZE, SettingsDefaults.defaultTabSize); 57 settingsMap.put(SettingsNames.EXPAND_TABS, SettingsDefaults.defaultExpandTabs); 58 settingsMap.put(SettingsNames.SPACES_PER_TAB, SettingsDefaults.defaultSpacesPerTab); 59 60 settingsMap.put(SettingsNames.CARET_TYPE_INSERT_MODE, SettingsDefaults.defaultCaretTypeInsertMode); 61 settingsMap.put(SettingsNames.CARET_TYPE_OVERWRITE_MODE, SettingsDefaults.defaultCaretTypeOverwriteMode); 62 settingsMap.put(SettingsNames.CARET_ITALIC_INSERT_MODE, SettingsDefaults.defaultCaretItalicInsertMode); 63 settingsMap.put(SettingsNames.CARET_ITALIC_OVERWRITE_MODE, SettingsDefaults.defaultCaretItalicOverwriteMode); 64 settingsMap.put(SettingsNames.CARET_COLOR_INSERT_MODE, SettingsDefaults.defaultCaretColorInsertMode); 65 settingsMap.put(SettingsNames.CARET_COLOR_OVERWRITE_MODE, SettingsDefaults.defaultCaretColorOvwerwriteMode); 66 settingsMap.put(SettingsNames.CARET_BLINK_RATE, SettingsDefaults.defaultCaretBlinkRate); 67 68 settingsMap.put(SettingsNames.MACRO_MAP, SettingsDefaults.defaultMacroMap ); 69 settingsMap.put(SettingsNames.ABBREV_MAP, SettingsDefaults.defaultAbbrevMap ); 70 settingsMap.put(SettingsNames.ABBREV_EXPAND_ACCEPTOR, SettingsDefaults.defaultAbbrevExpandAcceptor); 71 settingsMap.put(SettingsNames.ABBREV_ADD_TYPED_CHAR_ACCEPTOR, SettingsDefaults.defaultAbbrevAddTypedCharAcceptor); 72 settingsMap.put(SettingsNames.ABBREV_RESET_ACCEPTOR, SettingsDefaults.defaultAbbrevResetAcceptor); 73 74 settingsMap.put(SettingsNames.LINE_NUMBER_VISIBLE, SettingsDefaults.defaultLineNumberVisible); 75 76 settingsMap.put(SettingsNames.LINE_HEIGHT_CORRECTION, SettingsDefaults.defaultLineHeightCorrection); 77 settingsMap.put(SettingsNames.TEXT_LEFT_MARGIN_WIDTH, SettingsDefaults.defaultTextLeftMarginWidth); 78 settingsMap.put(SettingsNames.MARGIN, SettingsDefaults.defaultMargin); 79 settingsMap.put(SettingsNames.SCROLL_JUMP_INSETS, SettingsDefaults.defaultScrollJumpInsets); 80 settingsMap.put(SettingsNames.SCROLL_FIND_INSETS, SettingsDefaults.defaultScrollFindInsets); 81 settingsMap.put(SettingsNames.COMPONENT_SIZE_INCREMENT, SettingsDefaults.defaultComponentSizeIncrement); 82 83 settingsMap.put(SettingsNames.STATUS_BAR_VISIBLE, SettingsDefaults.defaultStatusBarVisible); 84 settingsMap.put(SettingsNames.STATUS_BAR_CARET_DELAY, SettingsDefaults.defaultStatusBarCaretDelay); 85 86 settingsMap.put(SettingsNames.TEXT_LIMIT_LINE_VISIBLE, SettingsDefaults.defaultTextLimitLineVisible); 87 settingsMap.put(SettingsNames.TEXT_LIMIT_LINE_COLOR, SettingsDefaults.defaultTextLimitLineColor); 88 settingsMap.put(SettingsNames.TEXT_LIMIT_WIDTH, SettingsDefaults.defaultTextLimitWidth); 89 90 settingsMap.put(SettingsNames.HOME_KEY_COLUMN_ONE, SettingsDefaults.defaultHomeKeyColumnOne); 91 settingsMap.put(SettingsNames.WORD_MOVE_NEWLINE_STOP, SettingsDefaults.defaultWordMoveNewlineStop); 92 settingsMap.put(SettingsNames.INPUT_METHODS_ENABLED, SettingsDefaults.defaultInputMethodsEnabled); 93 settingsMap.put(SettingsNames.FIND_HIGHLIGHT_SEARCH, SettingsDefaults.defaultFindHighlightSearch); 94 settingsMap.put(SettingsNames.FIND_INC_SEARCH, SettingsDefaults.defaultFindIncSearch); 95 settingsMap.put(SettingsNames.FIND_BACKWARD_SEARCH, SettingsDefaults.defaultFindBackwardSearch); 96 settingsMap.put(SettingsNames.FIND_WRAP_SEARCH, SettingsDefaults.defaultFindWrapSearch); 97 settingsMap.put(SettingsNames.FIND_MATCH_CASE, SettingsDefaults.defaultFindMatchCase); 98 settingsMap.put(SettingsNames.FIND_WHOLE_WORDS, SettingsDefaults.defaultFindWholeWords); 99 settingsMap.put(SettingsNames.FIND_REG_EXP, SettingsDefaults.defaultFindRegExp); 100 settingsMap.put(SettingsNames.FIND_HISTORY_SIZE, SettingsDefaults.defaultFindHistorySize); 101 settingsMap.put(SettingsNames.WORD_MATCH_SEARCH_LEN, SettingsDefaults.defaultWordMatchSearchLen); 102 settingsMap.put(SettingsNames.WORD_MATCH_WRAP_SEARCH, SettingsDefaults.defaultWordMatchWrapSearch); 103 settingsMap.put(SettingsNames.WORD_MATCH_MATCH_ONE_CHAR, SettingsDefaults.defaultWordMatchMatchOneChar); 104 settingsMap.put(SettingsNames.WORD_MATCH_MATCH_CASE, SettingsDefaults.defaultWordMatchMatchCase); 105 settingsMap.put(SettingsNames.WORD_MATCH_SMART_CASE, SettingsDefaults.defaultWordMatchSmartCase); 106 settingsMap.put(SettingsNames.IDENTIFIER_ACCEPTOR, SettingsDefaults.defaultIdentifierAcceptor); 107 settingsMap.put(SettingsNames.WHITESPACE_ACCEPTOR, SettingsDefaults.defaultWhitespaceAcceptor); 108 settingsMap.put(SettingsNames.CODE_FOLDING_ENABLE, SettingsDefaults.defaultCodeFoldingEnable); 109 110 114 SettingsUtil.setColoring(settingsMap, 116 SettingsNames.DEFAULT_COLORING, SettingsDefaults.defaultColoring); 117 118 SettingsUtil.setColoring(settingsMap, 119 SettingsNames.LINE_NUMBER_COLORING, SettingsDefaults.defaultLineNumberColoring); 120 121 SettingsUtil.setColoring(settingsMap, 122 SettingsNames.GUARDED_COLORING, SettingsDefaults.defaultGuardedColoring); 123 124 SettingsUtil.setColoring(settingsMap, 125 SettingsNames.CODE_FOLDING_COLORING, SettingsDefaults.defaultCodeFoldingColoring); 126 127 SettingsUtil.setColoring(settingsMap, 128 SettingsNames.CODE_FOLDING_BAR_COLORING, SettingsDefaults.defaultCodeFoldingBarColoring); 129 130 SettingsUtil.setColoring(settingsMap, 131 SettingsNames.SELECTION_COLORING, SettingsDefaults.defaultSelectionColoring); 132 133 SettingsUtil.setColoring(settingsMap, 134 SettingsNames.HIGHLIGHT_SEARCH_COLORING, SettingsDefaults.defaultHighlightSearchColoring); 135 136 SettingsUtil.setColoring(settingsMap, 137 SettingsNames.INC_SEARCH_COLORING, SettingsDefaults.defaultIncSearchColoring); 138 139 SettingsUtil.setColoring(settingsMap, 140 SettingsNames.BLOCK_SEARCH_COLORING, SettingsDefaults.defaultblockSearchColoring); 141 142 SettingsUtil.setColoring(settingsMap, 143 SettingsNames.STATUS_BAR_COLORING, SettingsDefaults.defaultStatusBarColoring); 144 145 SettingsUtil.setColoring(settingsMap, 146 SettingsNames.STATUS_BAR_BOLD_COLORING, SettingsDefaults.defaultStatusBarBoldColoring); 147 148 SettingsUtil.updateListSetting(settingsMap, 150 SettingsNames.COLORING_NAME_LIST, SettingsDefaults.defaultColoringNames); 151 152 172 173 181 settingsMap.put(SettingsNames.READ_BUFFER_SIZE, SettingsDefaults.defaultReadBufferSize); 182 settingsMap.put(SettingsNames.WRITE_BUFFER_SIZE, SettingsDefaults.defaultWriteBufferSize); 183 settingsMap.put(SettingsNames.READ_MARK_DISTANCE, SettingsDefaults.defaultReadMarkDistance); 184 settingsMap.put(SettingsNames.MARK_DISTANCE, SettingsDefaults.defaultMarkDistance); 185 settingsMap.put(SettingsNames.MAX_MARK_DISTANCE, SettingsDefaults.defaultMaxMarkDistance); 186 settingsMap.put(SettingsNames.MIN_MARK_DISTANCE, SettingsDefaults.defaultMinMarkDistance); 187 settingsMap.put(SettingsNames.SYNTAX_UPDATE_BATCH_SIZE, SettingsDefaults.defaultSyntaxUpdateBatchSize); 188 settingsMap.put(SettingsNames.LINE_BATCH_SIZE, SettingsDefaults.defaultLineBatchSize); 189 190 } 191 } 192 193 } 194 | Popular Tags |