Пример #1
0
 CommonTextEditorOptions(MonoDevelop.Ide.Gui.Content.TextStylePolicy currentPolicy)
 {
     UpdateStylePolicy(currentPolicy);
     MonoDevelop.Ide.Editor.DefaultSourceEditorOptions.Instance.Changed += delegate(object sender, EventArgs e) {
         OnChanged(e);
     };
 }
Пример #2
0
 DefaultSourceEditorOptions(MonoDevelop.Ide.Gui.Content.TextStylePolicy currentPolicy)
 {
     LoadAllPrefs();
     UpdateStylePolicy(currentPolicy);
     PropertyService.PropertyChanged += UpdatePreferences;
     FontService.RegisterFontChangedCallback("Editor", UpdateFont);
     FontService.RegisterFontChangedCallback("MessageBubbles", UpdateFont);
 }
Пример #3
0
 void UpdateStylePolicy(MonoDevelop.Ide.Gui.Content.TextStylePolicy currentPolicy)
 {
     this.defaultEolMarker          = TextStylePolicy.GetEolMarker(currentPolicy.EolMarker);
     base.TabsToSpaces              = currentPolicy.TabsToSpaces;             // PropertyService.Get ("TabsToSpaces", false);
     base.IndentationSize           = currentPolicy.TabWidth;                 //PropertyService.Get ("TabIndent", 4);
     base.RulerColumn               = currentPolicy.FileWidth;                //PropertyService.Get ("RulerColumn", 80);
     base.AllowTabsAfterNonTabs     = !currentPolicy.NoTabsAfterNonTabs;      //PropertyService.Get ("AllowTabsAfterNonTabs", true);
     base.RemoveTrailingWhitespaces = currentPolicy.RemoveTrailingWhitespace; //PropertyService.Get ("RemoveTrailingWhitespaces", true);
 }
 internal void UpdateStylePolicy(MonoDevelop.Ide.Gui.Content.TextStylePolicy currentPolicy)
 {
     if (currentPolicy == this.currentPolicy)
     {
         return;
     }
     this.currentPolicy    = currentPolicy;
     rulerColumn           = currentPolicy.FileWidth;           //PropertyService.Get ("RulerColumn", 80);
     allowTabsAfterNonTabs = !currentPolicy.NoTabsAfterNonTabs; //PropertyService.Get ("AllowTabsAfterNonTabs", true);
     OnChanged(EventArgs.Empty);
 }
Пример #5
0
        public ITextEditorOptions WithTextStyle(MonoDevelop.Ide.Gui.Content.TextStylePolicy policy)
        {
            if (policy == null)
            {
                throw new ArgumentNullException("policy");
            }
            var result = (DefaultSourceEditorOptions)MemberwiseClone();

            result.UpdateStylePolicy(policy);
            result.Changed = null;
            return(result);
        }
 DefaultSourceEditorOptions(MonoDevelop.Ide.Gui.Content.TextStylePolicy currentPolicy)
 {
     LoadAllPrefs();
     UpdateStylePolicy(currentPolicy);
     PropertyService.PropertyChanged += UpdatePreferences;
 }