<commit_before>/*
	Dataphor
	© Copyright 2000-2008 Alphora
	This file is licensed under a modified BSD-license which can be found here: http://dataphor.org/dataphor_license.txt
*/
using System;
using System.Threading;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.IO;
using System.Xml;
using System.Data;
using System.Text;

using SD = ICSharpCode.TextEditor;

using Alphora.Dataphor.DAE;
using Alphora.Dataphor.DAE.Client;
using Alphora.Dataphor.DAE.Runtime.Data;
using Alphora.Dataphor.DAE.Client.Provider;
using Alphora.Dataphor.Dataphoria.Designers;
using Alphora.Dataphor.Frontend.Client.Windows;

using Syncfusion.Windows.Forms.Tools;
using WeifenLuo.WinFormsUI.Docking;

namespace Alphora.Dataphor.Dataphoria.TextEditor
{
	/// <summary> D4 text editor. </summary>
	public partial class D4Editor : TextEditor, IErrorSource
	{

		private Alphora.Dataphor.Dataphoria.TextEditor.ResultPanel FResultPanel;

        private ToolStripMenuItem FScriptMenu;
        private ToolStripMenuItem FExecuteMenuItem;
        private ToolStripMenuItem FExecuteLineMenuItem;
        private ToolStripMenuItem FPrepareLineMenuItem;
        private ToolStripMenuItem FSelectBlockMenuItem;
        private ToolStripMenuItem FPriorBlockMenuItem;
        private ToolStripMenuItem FNextBlockMenuItem;
        private ToolStripMenuItem FPrepareMenuItem;
        private ToolStripMenuItem FAnalyzeMenuItem;
        private ToolStripMenuItem FAnalyzeLineMenuItem;
        private ToolStripMenuItem FInjectMenuItem;
        private ToolStripMenuItem FExecuteSchemaMenuItem;
        private ToolStripMenuItem FExportDataMenuItem;
        private ToolStripMenuItem FExecuteBothMenuItem;
        private ToolStripMenuItem FShowResultsMenuItem;
        private ToolStripMenuItem FExportMenu;
        private ToolStripMenuItem FCancelMenuItem;

        protected DockContent FDockContentResultPanel;


		public D4Editor() : base()	// dummy constructor for SyncFusion's MDI menu merging
		{
			InitializeComponent();
            InitializeDocking();
		}

		public D4Editor(IDataphoria ADataphoria, string ADesignerID) : base(ADataphoria, ADesignerID)
		{
			InitializeComponent();

            InitializeDocking();



			FTextEdit.EditActions[Keys.Shift | Keys.Control | Keys.OemQuestion] = new ToggleBlockDelimiter();
			FTextEdit.EditActions[Keys.Control | Keys.Oemcomma] = new PriorBlock();
			FTextEdit.EditActions[Keys.Control | Keys.OemPeriod] = new NextBlock();
			FTextEdit.EditActions[Keys.Shift | Keys.Control | Keys.Oemcomma] = new SelectPriorBlock();
			FTextEdit.EditActions[Keys.Shift | Keys.Control | Keys.OemPeriod] = new SelectNextBlock();

			FResultPanel.BeginningFind += new EventHandler(BeginningFind);
			FResultPanel.ReplacementsPerformed += new ReplacementsPerformedHandler(ReplacementsPerformed);
			FResultPanel.TextNotFound += new EventHandler(TextNotFound);
		}

        private void InitializeDocking()
        {
            this.FResultPanel = new Alphora.Dataphor.Dataphoria.TextEditor.ResultPanel();

            // 
            // FResultPanel
            // 
            this.FResultPanel.BackColor = System.Drawing.SystemColors.Control;
            this.FResultPanel.CausesValidation = false;
            this.FResultPanel.EnableFolding = false;
            //this.FResultPanel.Encoding = ((System.Text.Encoding)(resources.GetObject("FResultPanel.Encoding")));
            this.FResultPanel.IndentStyle = ICSharpCode.TextEditor.Document.IndentStyle.Auto;
            this.FResultPanel.IsIconBarVisible = false;
            this.FResultPanel.Location = new System.Drawing.Point(1, 21);<commit_msg>InitializeExtendendMenu(); called in constructors<commit_after>/*
	Dataphor
	© Copyright 2000-2008 Alphora
	This file is licensed under a modified BSD-license which can be found here: http://dataphor.org/dataphor_license.txt
*/
using System;
using System.Threading;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.IO;
using System.Xml;
using System.Data;
using System.Text;

using SD = ICSharpCode.TextEditor;

using Alphora.Dataphor.DAE;
using Alphora.Dataphor.DAE.Client;
using Alphora.Dataphor.DAE.Runtime.Data;
using Alphora.Dataphor.DAE.Client.Provider;
using Alphora.Dataphor.Dataphoria.Designers;
using Alphora.Dataphor.Frontend.Client.Windows;

using Syncfusion.Windows.Forms.Tools;
using WeifenLuo.WinFormsUI.Docking;

namespace Alphora.Dataphor.Dataphoria.TextEditor
{
	/// <summary> D4 text editor. </summary>
	public partial class D4Editor : TextEditor, IErrorSource
	{

		private Alphora.Dataphor.Dataphoria.TextEditor.ResultPanel FResultPanel;

        private ToolStripMenuItem FScriptMenu;
        private ToolStripMenuItem FExecuteMenuItem;
        private ToolStripMenuItem FExecuteLineMenuItem;
        private ToolStripMenuItem FPrepareLineMenuItem;
        private ToolStripMenuItem FSelectBlockMenuItem;
        private ToolStripMenuItem FPriorBlockMenuItem;
        private ToolStripMenuItem FNextBlockMenuItem;
        private ToolStripMenuItem FPrepareMenuItem;
        private ToolStripMenuItem FAnalyzeMenuItem;
        private ToolStripMenuItem FAnalyzeLineMenuItem;
        private ToolStripMenuItem FInjectMenuItem;
        private ToolStripMenuItem FExecuteSchemaMenuItem;
        private ToolStripMenuItem FExportDataMenuItem;
        private ToolStripMenuItem FExecuteBothMenuItem;
        private ToolStripMenuItem FShowResultsMenuItem;
        private ToolStripMenuItem FExportMenu;
        private ToolStripMenuItem FCancelMenuItem;

        protected DockContent FDockContentResultPanel;


		public D4Editor() : base()	// dummy constructor for SyncFusion's MDI menu merging
		{
			InitializeComponent();
            InitializeDocking();
            InitializeExtendendMenu();
		}

		public D4Editor(IDataphoria ADataphoria, string ADesignerID) : base(ADataphoria, ADesignerID)
		{
			InitializeComponent();

            InitializeDocking();

            InitializeExtendendMenu();

			FTextEdit.EditActions[Keys.Shift | Keys.Control | Keys.OemQuestion] = new ToggleBlockDelimiter();
			FTextEdit.EditActions[Keys.Control | Keys.Oemcomma] = new PriorBlock();
			FTextEdit.EditActions[Keys.Control | Keys.OemPeriod] = new NextBlock();
			FTextEdit.EditActions[Keys.Shift | Keys.Control | Keys.Oemcomma] = new SelectPriorBlock();
			FTextEdit.EditActions[Keys.Shift | Keys.Control | Keys.OemPeriod] = new SelectNextBlock();

			FResultPanel.BeginningFind += new EventHandler(BeginningFind);
			FResultPanel.ReplacementsPerformed += new ReplacementsPerformedHandler(ReplacementsPerformed);
			FResultPanel.TextNotFound += new EventHandler(TextNotFound);
		}

        private void InitializeDocking()
        {
            this.FResultPanel = new Alphora.Dataphor.Dataphoria.TextEditor.ResultPanel();

            // 
            // FResultPanel
            // 
            this.FResultPanel.BackColor = System.Drawing.SystemColors.Control;
            this.FResultPanel.CausesValidation = false;
            this.FResultPanel.EnableFolding = false;
            //this.FResultPanel.Encoding = ((System.Text.Encoding)(resources.GetObject("FResultPanel.Encoding")));
            this.FResultPanel.IndentStyle = ICSharpCode.TextEditor.Document.IndentStyle.Auto;
            this.FResultPanel.IsIconBarVisible = false;
            this.FResultPanel.Location = new System.Drawing.Point(1, 21);
{'fraction_non_alphanumeric': 0.07914825231016473, 'fraction_numerical': 0.004017677782241864, 'mean_word_length': 3.884238064094179, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2877762', 'n_tokens_mistral': 2163, 'n_tokens_neox': 2121, 'n_words': 414}