@@ -75,8 +75,8 @@ public String getDisplay() {
7575 public static final class OptionSet {
7676 public String CURRENT_PLUGIN_VERSION ;
7777
78- public boolean CARET_ROW_SHOWN ;
79- public boolean USE_SOFT_WRAP ;
78+ public boolean CARET_ROW_SHOWN = true ;
79+ public boolean USE_SOFT_WRAP = false ;
8080 public boolean HIGHTLIGHT_TAB_SEPARATOR = true ;
8181 public boolean SHOW_INFO_BALLOON = true ;
8282 public String TAB_HIGHLIGHT_COLOR = "-7984" ;
@@ -100,18 +100,6 @@ public static final class OptionSet {
100100 private boolean isInitialized = false ;
101101
102102 public OptionSet () {}
103-
104- public void init () {
105- if (this .isInitialized ) {
106- return ;
107- }
108-
109- EditorSettingsExternalizable editorSettingsExternalizable = EditorSettingsExternalizable .getInstance ();
110- CARET_ROW_SHOWN = editorSettingsExternalizable == null ? true : editorSettingsExternalizable .isCaretRowShown ();
111- USE_SOFT_WRAP = editorSettingsExternalizable == null ? false : editorSettingsExternalizable .isUseSoftWraps ();
112-
113- this .isInitialized = true ;
114- }
115103 }
116104
117105 private OptionSet myOptions = new OptionSet ();
@@ -138,7 +126,6 @@ public void removePropertyChangeListener(PropertyChangeListener listener) {
138126
139127 @ Override
140128 public OptionSet getState () {
141- this .myOptions .init ();
142129 return this .myOptions ;
143130 }
144131
@@ -184,7 +171,7 @@ public void setShowInfoBalloon(boolean showInfoBalloon) {
184171 public Color getTabHighlightColor () {
185172 String color = getState ().TAB_HIGHLIGHT_COLOR ;
186173 try {
187- return color == null || color .isEmpty () ? null : Color .decode (getState (). TAB_HIGHLIGHT_COLOR );
174+ return color == null || color .isEmpty () ? null : Color .decode (color );
188175 } catch (NumberFormatException exc ) {
189176 return null ;
190177 }
@@ -195,13 +182,7 @@ public void setTabHighlightColor(Color color) {
195182 }
196183
197184 public EditorPrio getEditorPrio () {
198- // Important: avoid triggering OptionSet.init() here because it consults
199- // EditorSettingsExternalizable on first access which may require UI/EDT
200- // initialization. The file editor providers call this method from background
201- // threads during provider discovery, and any slow or blocking initialization
202- // can lead to timeouts when the IDE checks providers.
203- // Access the current option directly to keep provider checks fast and non-blocking.
204- return this .myOptions .EDITOR_PRIO ;
185+ return getState ().EDITOR_PRIO ;
205186 }
206187
207188 public void setEditorPrio (EditorPrio editorPrio ) {
@@ -217,9 +198,8 @@ public void showTableEditorInfoPanel(boolean showInfoPanel) {
217198 }
218199
219200 public int getTableEditorRowHeight () {
220- // ensure the current state of row height fits the boundaries (which is checked in the setTableEditorRowHeight method
221- setTableEditorRowHeight (getState ().TABLE_EDITOR_ROW_HEIGHT );
222- return getState ().TABLE_EDITOR_ROW_HEIGHT ;
201+ int rowHeight = getState ().TABLE_EDITOR_ROW_HEIGHT ;
202+ return rowHeight > TABLE_EDITOR_ROW_HEIGHT_MAX || rowHeight < TABLE_EDITOR_ROW_HEIGHT_MIN ? TABLE_EDITOR_ROW_HEIGHT_DEFAULT : rowHeight ;
223203 }
224204
225205 public void setTableEditorRowHeight (int rowHeight ) {
@@ -268,7 +248,7 @@ public void setDefaultEscapeCharacter(CsvEscapeCharacter defaultEscapeCharacter)
268248
269249 public CsvEscapeCharacter getDefaultEscapeCharacter () {
270250 CsvEscapeCharacter csvValueSeparator = getState ().DEFAULT_ESCAPE_CHARACTER ;
271- return csvValueSeparator == null ? ESCAPE_CHARACTER_DEFAULT : getState (). DEFAULT_ESCAPE_CHARACTER ;
251+ return csvValueSeparator == null ? ESCAPE_CHARACTER_DEFAULT : csvValueSeparator ;
272252 }
273253
274254 public void setDefaultValueSeparator (CsvValueSeparator defaultValueSeparator ) {
0 commit comments