113
113
base.RemoveTrailingWhitespaces = currentPolicy.RemoveTrailingWhitespace; //PropertyService.Get ("RemoveTrailingWhitespaces", true);
116
void GetPreferences (object sender, EventArgs args)
118
this.tabIsReindent = PropertyService.Get ("TabIsReindent", false);
116
// Need to be picky about only updating individual properties when they change.
117
// The old approach called LoadAllPrefs on any prefs event, which sometimes caused
118
// massive change event storms.
119
void UpdatePreferences (object sender, PropertyChangedEventArgs args)
122
case "TabIsReindent":
123
this.TabIsReindent = (bool) args.NewValue;
125
case "EnableSemanticHighlighting":
126
this.EnableSemanticHighlighting = (bool) args.NewValue;
128
case "AutoInsertMatchingBracket":
129
this.AutoInsertMatchingBracket = (bool) args.NewValue;
131
case "EnableCodeCompletion":
132
this.EnableCodeCompletion = (bool) args.NewValue;
134
case "EnableParameterInsight":
135
this.EnableParameterInsight = (bool) args.NewValue;
137
case "EnableQuickFinder":
138
this.EnableQuickFinder = (bool) args.NewValue;
140
case "UnderlineErrors":
141
this.UnderlineErrors = (bool) args.NewValue;
144
this.IndentStyle = (MonoDevelop.Ide.Gui.Content.IndentStyle) args.NewValue;
146
case "EditorFontType":
147
this.EditorFontType = (MonoDevelop.SourceEditor.EditorFontType) args.NewValue;
149
case "ShowLineNumberMargin":
150
base.ShowLineNumberMargin = (bool) args.NewValue;
152
case "ShowFoldMargin":
153
base.ShowFoldMargin = (bool) args.NewValue;
155
case "ShowInvalidLines":
156
base.ShowInvalidLines = (bool) args.NewValue;
159
base.ShowTabs = (bool) args.NewValue;
161
case "ShowEolMarkers":
162
base.ShowEolMarkers = (bool) args.NewValue;
164
case "HighlightCaretLine":
165
base.HighlightCaretLine = (bool) args.NewValue;
168
base.ShowSpaces = (bool) args.NewValue;
170
case "EnableSyntaxHighlighting":
171
base.EnableSyntaxHighlighting = (bool) args.NewValue;
173
case "HighlightMatchingBracket":
174
base.HighlightMatchingBracket = (bool) args.NewValue;
177
base.ShowRuler = (bool) args.NewValue;
180
base.FontName = (string) args.NewValue;
183
base.ColorScheme = (string) args.NewValue;
185
case "DefaultRegionsFolding":
186
this.DefaultRegionsFolding = (bool) args.NewValue;
188
case "DefaultCommentFolding":
189
this.DefaultCommentFolding = (bool) args.NewValue;
192
this.UseViModes = (bool) args.NewValue;
194
case "OnTheFlyFormatting":
195
this.OnTheFlyFormatting = (bool) args.NewValue;
197
case "EnableAutoCodeCompletion":
198
this.EnableAutoCodeCompletion = (bool) args.NewValue;
200
case "CompleteWithSpaceOrPunctuation":
201
this.CompleteWithSpaceOrPunctuation = (bool) args.NewValue;
203
case "ControlLeftRightMode":
204
this.ControlLeftRightMode = (ControlLeftRightMode)Enum.Parse (typeof(ControlLeftRightMode), (string) args.NewValue);
206
case "EnableAnimations":
207
base.EnableAnimations = (bool) args.NewValue;
214
this.tabIsReindent = PropertyService.Get ("TabIsReindent", false);
119
215
this.enableSemanticHighlighting = PropertyService.Get ("EnableSemanticHighlighting", false);
120
// this.autoInsertTemplates = PropertyService.Get ("AutoInsertTemplates", false);
121
this.autoInsertMatchingBracket = PropertyService.Get ("AutoInsertMatchingBracket", false);
122
this.enableCodeCompletion = PropertyService.Get ("EnableCodeCompletion", true);
123
this.enableQuickFinder = PropertyService.Get ("EnableQuickFinder", true);
124
this.underlineErrors = PropertyService.Get ("UnderlineErrors", true);
125
this.indentStyle = PropertyService.Get ("IndentStyle", MonoDevelop.Ide.Gui.Content.IndentStyle.Smart);
126
this.editorFontType = PropertyService.Get ("EditorFontType", MonoDevelop.SourceEditor.EditorFontType.DefaultMonospace);
127
base.ShowLineNumberMargin = PropertyService.Get ("ShowLineNumberMargin", true);
128
base.ShowFoldMargin = PropertyService.Get ("ShowFoldMargin", true);
129
base.ShowInvalidLines = PropertyService.Get ("ShowInvalidLines", true);
130
base.ShowTabs = PropertyService.Get ("ShowTabs", false);
131
base.ShowEolMarkers = PropertyService.Get ("ShowEolMarkers", false);
132
base.HighlightCaretLine = PropertyService.Get ("HighlightCaretLine", false);
133
base.ShowSpaces = PropertyService.Get ("ShowSpaces", false);
216
// this.autoInsertTemplates = PropertyService.Get ("AutoInsertTemplates", false);
217
this.autoInsertMatchingBracket = PropertyService.Get ("AutoInsertMatchingBracket", false);
218
this.enableCodeCompletion = PropertyService.Get ("EnableCodeCompletion", true);
219
this.enableParameterInsight = PropertyService.Get ("EnableParameterInsight", true);
220
this.enableQuickFinder = PropertyService.Get ("EnableQuickFinder", true);
221
this.underlineErrors = PropertyService.Get ("UnderlineErrors", true);
222
this.indentStyle = PropertyService.Get ("IndentStyle", MonoDevelop.Ide.Gui.Content.IndentStyle.Smart);
223
this.editorFontType = PropertyService.Get ("EditorFontType", MonoDevelop.SourceEditor.EditorFontType.DefaultMonospace);
224
base.ShowLineNumberMargin = PropertyService.Get ("ShowLineNumberMargin", true);
225
base.ShowFoldMargin = PropertyService.Get ("ShowFoldMargin", true);
226
base.ShowInvalidLines = PropertyService.Get ("ShowInvalidLines", true);
227
base.ShowTabs = PropertyService.Get ("ShowTabs", false);
228
base.ShowEolMarkers = PropertyService.Get ("ShowEolMarkers", false);
229
base.HighlightCaretLine = PropertyService.Get ("HighlightCaretLine", false);
230
base.ShowSpaces = PropertyService.Get ("ShowSpaces", false);
134
231
base.EnableSyntaxHighlighting = PropertyService.Get ("EnableSyntaxHighlighting", true);
135
232
base.HighlightMatchingBracket = PropertyService.Get ("HighlightMatchingBracket", true);
136
base.ShowRuler = PropertyService.Get ("ShowRuler", false);
137
base.FontName = PropertyService.Get ("FontName", "Mono 10");
138
base.ColorScheme = PropertyService.Get ("ColorScheme", "Default");
139
this.defaultRegionsFolding = PropertyService.Get ("DefaultRegionsFolding", false);
140
this.defaultCommentFolding = PropertyService.Get ("DefaultCommentFolding", true);
233
base.ShowRuler = PropertyService.Get ("ShowRuler", false);
234
base.FontName = PropertyService.Get ("FontName", "Mono 10");
235
base.ColorScheme = PropertyService.Get ("ColorScheme", "Default");
236
this.defaultRegionsFolding = PropertyService.Get ("DefaultRegionsFolding", false);
237
this.defaultCommentFolding = PropertyService.Get ("DefaultCommentFolding", true);
141
238
this.useViModes = PropertyService.Get ("UseViModes", false);
142
239
this.onTheFlyFormatting = PropertyService.Get ("OnTheFlyFormatting", false);
143
240
this.enableAutoCodeCompletion = PropertyService.Get ("EnableAutoCodeCompletion", true);
144
241
this.completeWithSpaceOrPunctuation = PropertyService.Get ("CompleteWithSpaceOrPunctuation", true);
145
this.ControlLeftRightMode = (ControlLeftRightMode)Enum.Parse (typeof (ControlLeftRightMode), PropertyService.Get ("ControlLeftRightMode", DesktopService.DefaultControlLeftRightBehavior));
242
this.ControlLeftRightMode = (ControlLeftRightMode)Enum.Parse (typeof(ControlLeftRightMode), PropertyService.Get ("ControlLeftRightMode", DesktopService.DefaultControlLeftRightBehavior));
243
base.EnableAnimations = PropertyService.Get ("EnableAnimations", true);
148
246
#region new options