示例#1
0
 internal void SetLanguageAsIronRuby()
 {
     try
     {
         Engine = RunTime.GetEngine("rb");
         Directory.SetCurrentDirectory(Config.RootDir);
         PluginEditorTE.SetHighlighting("Ruby");
         PluginEditorTE.Refresh();
         CheckSyntax();
         CurrentLanguage = "rb";
     }
     catch (Exception Exp)
     {
         IronUI.ShowPluginCompilerError("Error Changing Language: " + Exp.Message);
     }
 }
示例#2
0
        private void PluginEditor_Load(object sender, EventArgs e)
        {
            PluginEditorTE.ShowTabs         = false;
            PluginEditorTE.ShowEOLMarkers   = false;
            PluginEditorTE.ShowSpaces       = false;
            PluginEditorTE.ShowInvalidLines = false;
            PluginEditorTE.TabIndent        = 2;

            Directory.SetCurrentDirectory(Config.RootDir);
            HighlightingManager.Manager.AddSyntaxModeFileProvider(new EditorSyntaxModesProvider());

            PluginEditorTE.SetHighlighting("Python");
            ScriptRuntimeSetup Setup = new ScriptRuntimeSetup();

            Setup.LanguageSetups.Add(IronRuby.Ruby.CreateRubySetup());
            Setup.LanguageSetups.Add(IronPython.Hosting.Python.CreateLanguageSetup(null));
            RunTime = new ScriptRuntime(Setup);
            Engine  = RunTime.GetEngine("py");
            APIDoc.BuildPluginEditorTrees();
            PluginEditorTE.ActiveTextAreaControl.TextArea.KeyUp += new System.Windows.Forms.KeyEventHandler(this.PluginEditorTE_KeyUp);
            PluginEditorTE.Document.DocumentChanged             += new DocumentEventHandler(this.PluginEditorTE_Change);
        }