public DynamoPythonScriptEditorTextOptions()
 {
     if (TextOptions == null)
     {
         TextOptions = new ICSharpCode.AvalonEdit.TextEditorOptions();
     }
 }
Example #2
0
        public MvvmTextEditor()
        {
            ShowLineNumbers = true;

            Options = new ICSharpCode.AvalonEdit.TextEditorOptions {
                IndentationSize     = 4,
                ConvertTabsToSpaces = true,
                ShowTabs            = true,
                ShowSpaces          = true,
            };
        }
Example #3
0
        public void UpdateEditorConfig()
        {
            _Editor.FontFamily = new FontFamily(Configuration.TextEditor.FontFamily);
            _Editor.FontSize   = Configuration.TextEditor.FontSize;
            _Editor.Completion = EditorViewModel.Completion;

            ICSharpCode.AvalonEdit.TextEditorOptions options = new ICSharpCode.AvalonEdit.TextEditorOptions()
            {
                ConvertTabsToSpaces = Configuration.TextEditor.ConvertTabsToSpaces,
                IndentationSize     = Configuration.TextEditor.TabSize,
                EnableTextDragDrop  = true,
            };
            _Editor.Options = options;
        }
Example #4
0
        public static IDictionary <AstNode, ISegment> WriteNode(StringWriter writer, AstNode node, CSharpFormattingOptions policy, ICSharpCode.AvalonEdit.TextEditorOptions options)
        {
            var formatter = new SegmentTrackingOutputFormatter(writer);

            formatter.IndentationString = options.IndentationString;
            var visitor = new CSharpOutputVisitor(formatter, policy);

            node.AcceptVisitor(visitor);
            return(formatter.Segments);
        }
Example #5
0
        public void UpdateEditorConfig()
        {
            _Editor.FontFamily = new FontFamily(Configuration.TextEditor.FontFamily);
            _Editor.FontSize = Configuration.TextEditor.FontSize;
            _Editor.Completion = EditorViewModel.Completion;

            ICSharpCode.AvalonEdit.TextEditorOptions options = new ICSharpCode.AvalonEdit.TextEditorOptions()
            {
                ConvertTabsToSpaces = Configuration.TextEditor.ConvertTabsToSpaces,
                IndentationSize = Configuration.TextEditor.TabSize,
                EnableTextDragDrop = true,
            };
            _Editor.Options = options;
        }