~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorOptions.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
                        UpdateStylePolicy (currentPolicy);
85
85
                        PropertyService.PropertyChanged += UpdatePreferences;
86
86
                        FontService.RegisterFontChangedCallback ("Editor", UpdateFont);
 
87
                        FontService.RegisterFontChangedCallback ("Editor(Gutter)", UpdateFont);
87
88
                        FontService.RegisterFontChangedCallback ("MessageBubbles", UpdateFont);
88
89
                        
89
90
                }
97
98
                void UpdateFont ()
98
99
                {
99
100
                        base.FontName = FontName;
 
101
                        base.GutterFontName = GutterFontName;
100
102
                        this.OnChanged (EventArgs.Empty);
101
103
                
102
104
                }
146
148
                                case "ShowFoldMargin":
147
149
                                        base.ShowFoldMargin = (bool)args.NewValue;
148
150
                                        break;
149
 
                                case "ShowInvalidLines":
150
 
                                        base.ShowInvalidLines = (bool)args.NewValue;
151
 
                                        break;
152
 
                                case "ShowTabs":
153
 
                                        base.ShowTabs = (bool)args.NewValue;
154
 
                                        break;
155
 
                                case "ShowEolMarkers":
156
 
                                        base.ShowEolMarkers = (bool)args.NewValue;
157
 
                                        break;
158
151
                                case "HighlightCaretLine":
159
152
                                        base.HighlightCaretLine = (bool)args.NewValue;
160
153
                                        break;
161
 
                                case "ShowSpaces":
162
 
                                        base.ShowSpaces = (bool)args.NewValue;
163
 
                                        break;
164
154
                                case "EnableSyntaxHighlighting":
165
155
                                        base.EnableSyntaxHighlighting = (bool)args.NewValue;
166
156
                                        break;
173
163
                                case "FontName":
174
164
                                        base.FontName = (string)args.NewValue;
175
165
                                        break;
 
166
                                case "GutterFontName":
 
167
                                        base.GutterFontName = (string)args.NewValue;
 
168
                                        break;
176
169
                                case "ColorScheme":
177
170
                                        base.ColorScheme = (string)args.NewValue;
178
171
                                        break;
197
190
                                case "UseAntiAliasing":
198
191
                                        base.UseAntiAliasing = (bool)args.NewValue;
199
192
                                        break;
 
193
                                case "DrawIndentationMarkers":
 
194
                                        base.DrawIndentationMarkers = (bool)args.NewValue;
 
195
                                        break;
 
196
                                case "EnableQuickDiff":
 
197
                                        base.EnableQuickDiff = (bool)args.NewValue;
 
198
                                        break;
200
199
                                }
201
200
                        } catch (Exception ex) {
202
201
                                LoggingService.LogError ("SourceEditorOptions error with property value for '" + (args.Key ?? "") + "'", ex);
213
212
                        this.underlineErrors = PropertyService.Get ("UnderlineErrors", true);
214
213
                        this.indentStyle = PropertyService.Get ("IndentStyle", IndentStyle.Smart);
215
214
                        base.ShowLineNumberMargin = PropertyService.Get ("ShowLineNumberMargin", true);
216
 
                        base.ShowFoldMargin = PropertyService.Get ("ShowFoldMargin", true);
217
 
                        base.ShowInvalidLines = PropertyService.Get ("ShowInvalidLines", false);
218
 
                        base.ShowTabs = PropertyService.Get ("ShowTabs", false);
219
 
                        base.ShowEolMarkers = PropertyService.Get ("ShowEolMarkers", false);
 
215
                        base.ShowFoldMargin = PropertyService.Get ("ShowFoldMargin", false);
220
216
                        base.HighlightCaretLine = PropertyService.Get ("HighlightCaretLine", false);
221
 
                        base.ShowSpaces = PropertyService.Get ("ShowSpaces", false);
222
217
                        base.EnableSyntaxHighlighting = PropertyService.Get ("EnableSyntaxHighlighting", true);
223
218
                        base.HighlightMatchingBracket = PropertyService.Get ("HighlightMatchingBracket", true);
224
219
                        base.ShowRuler = PropertyService.Get ("ShowRuler", false);
225
220
                        base.FontName = PropertyService.Get ("FontName", "Mono 10");
 
221
                        base.GutterFontName = PropertyService.Get ("GutterFontName", "");
226
222
                        base.ColorScheme = PropertyService.Get ("ColorScheme", "Default");
227
223
                        this.defaultRegionsFolding = PropertyService.Get ("DefaultRegionsFolding", false);
228
224
                        this.defaultCommentFolding = PropertyService.Get ("DefaultCommentFolding", true);
233
229
                        base.EnableAnimations = PropertyService.Get ("EnableAnimations", true);
234
230
                        base.UseAntiAliasing = PropertyService.Get ("UseAntiAliasing", true);
235
231
                        this.EnableHighlightUsages = PropertyService.Get ("EnableHighlightUsages", false);
 
232
                        base.DrawIndentationMarkers = PropertyService.Get ("DrawIndentationMarkers", false);
236
233
                        this.lineEndingConversion = PropertyService.Get ("LineEndingConversion", LineEndingConversion.Ask);
 
234
                        base.ShowWhitespaces = PropertyService.Get ("ShowWhitespaces", Mono.TextEditor.ShowWhitespaces.Never);
 
235
                        base.IncludeWhitespaces = PropertyService.Get ("IncludeWhitespaces", Mono.TextEditor.IncludeWhitespaces.All);
 
236
                        base.WrapLines = PropertyService.Get ("WrapLines", false);
 
237
                        base.EnableQuickDiff = PropertyService.Get ("EnableQuickDiff", false);
237
238
                }
238
239
                
239
240
                #region new options
243
244
                        set { CompletionTextEditorExtension.EnableAutoCodeCompletion.Set (value); }
244
245
                }
245
246
                
246
 
                public bool CompleteWithSpaceOrPunctuation {
247
 
                        get { return CompletionTextEditorExtension.CompleteWithSpaceOrPunctuation; }
248
 
                        set { CompletionTextEditorExtension.CompleteWithSpaceOrPunctuation.Set (value); }
249
 
                }
250
 
                
251
247
                bool defaultRegionsFolding;
252
248
                public bool DefaultRegionsFolding {
253
249
                        get {
566
562
                        }
567
563
                }
568
564
                
569
 
                public override bool ShowInvalidLines {
570
 
                        set {
571
 
                                PropertyService.Set ("ShowInvalidLines", value);
572
 
                                base.ShowInvalidLines = value;
573
 
                        }
574
 
                }
575
 
                
576
 
                public override bool ShowTabs {
577
 
                        set {
578
 
                                PropertyService.Set ("ShowTabs", value);
579
 
                                base.ShowTabs = value;
580
 
                        }
581
 
                }
582
 
                
583
 
                public override bool ShowEolMarkers {
584
 
                        set {
585
 
                                PropertyService.Set ("ShowEolMarkers", value);
586
 
                                base.ShowEolMarkers = value;
587
 
                        }
588
 
                }
589
 
                
590
565
                public override bool HighlightCaretLine {
591
566
                        set {
592
567
                                PropertyService.Set ("HighlightCaretLine", value);
594
569
                        }
595
570
                }
596
571
                
597
 
                public override bool ShowSpaces {
598
 
                        set {
599
 
                                PropertyService.Set ("ShowSpaces", value);
600
 
                                base.ShowSpaces = value;
601
 
                        }
602
 
                }
603
 
                
604
572
                public override bool EnableSyntaxHighlighting {
605
573
                        set {
606
574
                                PropertyService.Set ("EnableSyntaxHighlighting", value);
643
611
                        }
644
612
                }
645
613
 
 
614
                public override bool DrawIndentationMarkers {
 
615
                        set {
 
616
                                PropertyService.Set ("DrawIndentationMarkers", value);
 
617
                                base.DrawIndentationMarkers = value;
 
618
                        }
 
619
                }
 
620
 
 
621
                public override ShowWhitespaces ShowWhitespaces {
 
622
                        set {
 
623
                                PropertyService.Set ("ShowWhitespaces", value);
 
624
                                base.ShowWhitespaces = value;
 
625
                        }
 
626
                }
 
627
 
 
628
                public override IncludeWhitespaces IncludeWhitespaces {
 
629
                        set {
 
630
                                PropertyService.Set ("IncludeWhitespaces", value);
 
631
                                base.IncludeWhitespaces = value;
 
632
                        }
 
633
                }
 
634
 
 
635
                public override bool WrapLines {
 
636
                        set {
 
637
                                PropertyService.Set ("WrapLines", value);
 
638
                                base.WrapLines = value;
 
639
                        }
 
640
                }
 
641
 
 
642
                public override bool EnableQuickDiff {
 
643
                        set {
 
644
                                PropertyService.Set ("EnableQuickDiff", value);
 
645
                                base.EnableQuickDiff = value;
 
646
                        }
 
647
                }
 
648
 
646
649
                public override string FontName {
647
650
                        get {
648
651
                                return FontService.FilterFontName (FontService.GetUnderlyingFontName ("Editor"));
652
655
                        }
653
656
                }
654
657
                
 
658
                public override string GutterFontName {
 
659
                        get {
 
660
                                return FontService.FilterFontName (FontService.GetUnderlyingFontName ("Editor(Gutter)"));
 
661
                        }
 
662
                        set {
 
663
                                throw new InvalidOperationException ("Set font through font service");
 
664
                        }
 
665
                }
 
666
                
655
667
                public override string ColorScheme {
656
668
                        set {
657
669
                                string newColorScheme = !String.IsNullOrEmpty (value) ? value : "Default";