[mapguide-commits] r7158 - in trunk/Tools/Maestro: Maestro.AddIn.Scripting Maestro.AddIn.Scripting/Commands Maestro.AddIn.Scripting/Lang/Python Maestro.AddIn.Scripting/Properties Maestro.AddIn.Scripting/Resources Maestro.AddIn.Scripting/Services Maestro.AddIn.Scripting/UI Thirdparty/IronPython-2.7.1/Lib Thirdparty/SharpDevelop/ICSharpCode.TextEditor Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Resources Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Src/Document/LineManager Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Src/Gui/CompletionWindow

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Oct 26 09:44:22 PDT 2012


Author: jng
Date: 2012-10-26 09:44:21 -0700 (Fri, 26 Oct 2012)
New Revision: 7158

Added:
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Resources/cross-script.png
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/ScriptingConfigProperties.cs
   trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Resources/Python.xshd
Removed:
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Resources/Python.xshd
Modified:
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Commands/StartupCommand.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/CommandLineHistory.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/IMemberProvider.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/ITextEditor.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonConsole.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonConsoleCompletionDataProvider.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonConsoleHost.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonOutputStream.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/TextEditor.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Maestro.AddIn.Scripting.csproj
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Properties/Resources.resx
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/Services/ScriptingClasses.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonPreferences.Designer.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonPreferences.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.Designer.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.cs
   trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.resx
   trunk/Tools/Maestro/Thirdparty/IronPython-2.7.1/Lib/site.py
   trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/ICSharpCode.TextEditor.csproj
   trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Resources/SyntaxModes.xml
   trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Src/Document/LineManager/LineManager.cs
   trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/CodeCompletionWindow.cs
Log:
#2161: Complete the IronPython REPL replacement. Expose a new IronPython module paths setting which points to the Python stdlib, which is included with this addin. The helper was disabled in site.py of the stdlib because it clobbers the stream redirection that renders the "help" built-in that is defined by IronPython useless.

Other changes includes:
 - Change the font of auto-completion items in the IronPython REPL
 - Move the Python syntax file to the ICSharpCode.TextEditor project, this allows us to specify the highlighting by name

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Commands/StartupCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Commands/StartupCommand.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Commands/StartupCommand.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -23,7 +23,7 @@
             Workbench.WorkbenchInitialized += (sender, e) =>
             {
                 var mgr = ServiceRegistry.GetService<ViewContentManager>();
-                if (Props.Get(IronPythonPreferences.ShowIronPythonConsole, true))
+                if (Props.Get(ScriptingConfigProperties.ShowIronPythonConsole, ScriptingConfigProperties.DefaultShowIronPythonConsole))
                     mgr.OpenContent<IronPythonRepl>(ViewRegion.Bottom);
             };
         }

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/CommandLineHistory.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/CommandLineHistory.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/CommandLineHistory.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -39,7 +39,7 @@
     /// <summary>
     /// Stores the command line history for the PythonConsole.
     /// </summary>
-    public class CommandLineHistory
+    internal class CommandLineHistory
     {
         List<string> lines = new List<string>();
         int position;

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/IMemberProvider.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/IMemberProvider.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/IMemberProvider.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -39,7 +39,7 @@
     /// <summary>
     /// Returns member names or global names for the python console command line.
     /// </summary>
-    public interface IMemberProvider
+    internal interface IMemberProvider
     {
         IList<string> GetMemberNames(string name);
 

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/ITextEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/ITextEditor.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/ITextEditor.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -45,7 +45,7 @@
     /// all the methods will be called on another thread not the main UI thread and will therefore need to
     /// be invoked.
     /// </summary>
-    public interface ITextEditor
+    internal interface ITextEditor
     {
         /// <summary>
         /// Fired when a key is pressed but before any text has been added to the text editor.

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonConsole.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonConsole.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonConsole.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -41,7 +41,7 @@
 
 namespace Maestro.AddIn.Scripting.Lang.Python
 {
-    public class PythonConsole : IConsole, IDisposable, IMemberProvider
+    internal class PythonConsole : IConsole, IDisposable, IMemberProvider
     {
         ITextEditor textEditor;
         int lineReceivedEventIndex = 0; // The index into the waitHandles array where the lineReceivedEvent is stored.
@@ -53,6 +53,8 @@
         CommandLine commandLine;
         CommandLineHistory commandLineHistory = new CommandLineHistory();
 
+        public CommandLine CommandLine { get { return this.commandLine; } }
+
         public PythonConsole(ITextEditor textEditor, CommandLine commandLine)
         {
             waitHandles = new WaitHandle[] { lineReceivedEvent, disposedEvent };
@@ -77,12 +79,16 @@
         {
             get
             {
+            #if DEBUG
                 Console.WriteLine("PythonConsole.Output get");
+            #endif
                 return null;
             }
             set
             {
+            #if DEBUG
                 Console.WriteLine("PythonConsole.Output set");
+            #endif
             }
         }
 
@@ -90,12 +96,16 @@
         {
             get
             {
+            #if DEBUG
                 Console.WriteLine("PythonConsole.ErrorOutput get");
+            #endif
                 return null;
             }
             set
             {
+            #if DEBUG
                 Console.WriteLine("PythonConsole.ErrorOutput get");
+            #endif
             }
         }
 
@@ -118,8 +128,9 @@
         /// </summary>
         public string ReadLine(int autoIndentSize)
         {
+        #if DEBUG
             Console.WriteLine("PythonConsole.ReadLine(): autoIndentSize: " + autoIndentSize);
-
+        #endif
             string indent = String.Empty;
             if (autoIndentSize > 0)
             {
@@ -130,7 +141,9 @@
             string line = ReadLineFromTextEditor();
             if (line != null)
             {
+            #if DEBUG
                 Console.WriteLine("ReadLine: " + indent + line);
+            #endif
                 return indent + line;
             }
             return null;
@@ -141,8 +154,9 @@
         /// </summary>
         public void Write(string text, Style style)
         {
+        #if DEBUG
             Console.WriteLine("PythonConsole.Write(text, style): " + text);
-
+        #endif
             textEditor.Write(text);
 
             if (style == Style.Prompt)

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonConsoleCompletionDataProvider.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonConsoleCompletionDataProvider.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonConsoleCompletionDataProvider.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -42,7 +42,7 @@
     /// <summary>
     /// Provides code completion for the Python Console window.
     /// </summary>
-    public class PythonConsoleCompletionDataProvider : ICompletionDataProvider
+    internal class PythonConsoleCompletionDataProvider : ICompletionDataProvider
     {
         IMemberProvider memberProvider;
 
@@ -68,7 +68,7 @@
         public ICompletionData[] GenerateCompletionData(string line)
         {
             List<DefaultCompletionData> items = new List<DefaultCompletionData>();
-
+            //TODO: Breaks down on compound python expressions
             string name = GetName(line);
             if (!String.IsNullOrEmpty(name))
             {

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonConsoleHost.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonConsoleHost.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonConsoleHost.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -29,10 +29,13 @@
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 // 
 #endregion
+using ICSharpCode.Core;
 using IronPython.Hosting;
 using IronPython.Runtime;
 using Maestro.AddIn.Scripting.Services;
+using Maestro.AddIn.Scripting.UI;
 using Microsoft.Scripting.Hosting;
+using Microsoft.Scripting.Hosting.Providers;
 using Microsoft.Scripting.Hosting.Shell;
 using System;
 using System.Collections.Generic;
@@ -45,12 +48,14 @@
     /// <summary>
     /// Hosts the python console.
     /// </summary>
-    public class PythonConsoleHost : ConsoleHost, IDisposable
+    internal class PythonConsoleHost : ConsoleHost, IDisposable
     {
         Thread thread;
         ITextEditor textEditor;
         PythonConsole pythonConsole;
 
+        public PythonConsole Console { get { return pythonConsole; } }
+
         public PythonConsoleHost(ITextEditor textEditor)
         {
             this.textEditor = textEditor;
@@ -93,6 +98,35 @@
             return new PythonOptionsParser();
         }
 
+        protected override ScriptRuntimeSetup CreateRuntimeSetup()
+        {
+            ScriptRuntimeSetup srs = ScriptRuntimeSetup.ReadConfiguration();
+            var paths = PropertyService.Get(ScriptingConfigProperties.IronPythonModulePath, ScriptingConfigProperties.DefaultIronPythonModulePath).Split(';');
+            if (srs.LanguageSetups.Count > 0)
+            {
+                foreach (var langSetup in srs.LanguageSetups)
+                {
+                    if (langSetup.FileExtensions.Contains(".py")) //NOXLATE
+                    {
+                        langSetup.Options["SearchPaths"] = paths; //NOXLATE
+                    }
+                }
+            }
+            else
+            {
+                srs.Options["SearchPaths"] = paths; //NOXLATE
+            }
+            return srs;
+        }
+
+        protected override void ExecuteInternal()
+        {
+            var pc = HostingHelpers.GetLanguageContext(Engine) as PythonContext;
+            pc.SetModuleState(typeof(ScriptEngine), Engine);
+            ScriptHostSetup.SetupGlobalScope(Engine, pc);
+            base.ExecuteInternal();
+        }
+
         /// <remarks>
         /// After the engine is created the standard output is replaced with our custom Stream class so we
         /// can redirect the stdout to the text editor window.
@@ -103,9 +137,6 @@
         {
             SetOutput(new PythonOutputStream(textEditor));
             pythonConsole = new PythonConsole(textEditor, commandLine);
-
-            engine.Runtime.Globals.SetVariable("app", new HostApplication());
-
             return pythonConsole;
         }
 

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonOutputStream.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonOutputStream.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/PythonOutputStream.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -37,7 +37,7 @@
 
 namespace Maestro.AddIn.Scripting.Lang.Python
 {
-    public class PythonOutputStream : Stream
+    internal class PythonOutputStream : Stream
     {
         ITextEditor textEditor;
 

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/TextEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/TextEditor.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Lang/Python/TextEditor.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -40,7 +40,7 @@
 
 namespace Maestro.AddIn.Scripting.Lang.Python
 {
-    public class TextEditor : ITextEditor
+    internal class TextEditor : ITextEditor
     {
         delegate string GetLineInvoker(int index);
         delegate void WriteInvoker(string text, Color color);

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Maestro.AddIn.Scripting.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Maestro.AddIn.Scripting.csproj	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Maestro.AddIn.Scripting.csproj	2012-10-26 16:44:21 UTC (rev 7158)
@@ -21,6 +21,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <DocumentationFile>..\out\Debug\AddIns\Scripting\Maestro.AddIn.Scripting.XML</DocumentationFile>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
@@ -83,6 +84,7 @@
       <DesignTime>True</DesignTime>
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
+    <Compile Include="ScriptingConfigProperties.cs" />
     <Compile Include="Services\ScriptingClasses.cs" />
     <Compile Include="Strings.Designer.cs">
       <AutoGen>True</AutoGen>
@@ -106,8 +108,8 @@
     <Content Include="Manifest.addin">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <None Include="Resources\cross-script.png" />
     <None Include="Resources\block.png" />
-    <None Include="Resources\Python.xshd" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\Maestro.Base\Maestro.Base.csproj">
@@ -156,7 +158,11 @@
       <DependentUpon>IronPythonRepl.cs</DependentUpon>
     </EmbeddedResource>
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PostBuildEvent>xcopy /S /Y /I "$(SolutionDir)..\Thirdparty\IronPython-2.7.1\Lib" "$(SolutionDir)$(OutDir)Lib"</PostBuildEvent>
+  </PropertyGroup>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Properties/Resources.Designer.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Properties/Resources.Designer.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -71,12 +71,12 @@
         }
         
         /// <summary>
-        ///   Looks up a localized resource of type System.Byte[].
+        ///   Looks up a localized resource of type System.Drawing.Bitmap.
         /// </summary>
-        internal static byte[] Python {
+        internal static System.Drawing.Bitmap cross_script {
             get {
-                object obj = ResourceManager.GetObject("Python", resourceCulture);
-                return ((byte[])(obj));
+                object obj = ResourceManager.GetObject("cross-script", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
             }
         }
     }

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Properties/Resources.resx	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Properties/Resources.resx	2012-10-26 16:44:21 UTC (rev 7158)
@@ -121,7 +121,7 @@
   <data name="block" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\block.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="Python" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Resources\Python.xshd;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  <data name="cross-script" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\cross-script.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
 </root>
\ No newline at end of file

Deleted: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Resources/Python.xshd
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Resources/Python.xshd	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Resources/Python.xshd	2012-10-26 16:44:21 UTC (rev 7158)
@@ -1,100 +0,0 @@
-<SyntaxDefinition name="Python" extensions=".py">
-	
-	<Properties>
-		<Property name="LineComment" value="#"/>
-	</Properties>
-	
-	<Digits name="Digits" color="DarkBlue"/>
-
-	<RuleSets>
-		<RuleSet ignorecase="false">
-			
-			<Delimiters>()[]{}@,:.`=;+-*/% &|^><</Delimiters>
-			
-			<Span name="Char" stopateol="true" color="Magenta" escapecharacter="\">
-				<Begin>'</Begin>
-				<End>'</End>
-			</Span>
-			
-			<Span name="DocComment" color="Green">
-				<Begin>"""</Begin>
-				<End>"""</End>
-			</Span>
-			
-			<Span name="LineComment" stopateol="true" color="Green">
-				<Begin>#</Begin>
-			</Span>
-			
-			<Span name="String" stopateol="true" color="Blue" escapecharacter="\">
-				<Begin>"</Begin>
-				<End>"</End>
-			</Span>
-			
-			<MarkPrevious bold="true" color="MidnightBlue">(</MarkPrevious>
-
-			<KeyWords name="BuiltInStatements" bold="true" color="MidnightBlue">
-				<Key word="assert"/>
-				<Key word="del"/>
-				<Key word="exec"/>
-				<Key word="global"/>
-				<Key word="lambda"/>
-				<Key word="print"/>
-			</KeyWords>
-			
-			<KeyWords name="ClassStatement" color="Blue" bold="true">
-				<Key word="class"/>
-			</KeyWords>
-			
-			<KeyWords name="ExceptionHandlingStatements" bold="true" color="Teal">
-				<Key word="except"/>
-				<Key word="finally"/>
-				<Key word="raise"/>
-				<Key word="try"/>
-			</KeyWords>
-			
-			<KeyWords name="FunctionDefinition" bold="true" color="Blue">
-				<Key word="def"/>
-			</KeyWords>
-			
-			<KeyWords name="Imports" bold="true" color="Green">
-				<Key word="import"/>
-				<Key word="from"/>
-			</KeyWords>
-			
-			<KeyWords name="IterationStatements" bold="true" color="Blue">
-				<Key word="for"/>
-				<Key word="in"/>
-				<Key word="while"/>
-			</KeyWords>
-			
-			<KeyWords name="JumpStatements" color="Navy">
-				<Key word="break"/>
-				<Key word="continue"/>
-				<Key word="yield"/>
-				<Key word="return"/>
-			</KeyWords>
-		
-			<KeyWords name="OperatorStatements" bold="true" color="DarkCyan">
-				<Key word="and"/>
-				<Key word="as"/>
-				<Key word="is"/>
-				<Key word="not"/>
-				<Key word="or"/>
-			</KeyWords>
-			
-			<KeyWords name="PassStatement" color="Gray">
-				<Key word="pass"/>
-			</KeyWords>			
-		
-			<KeyWords name="SelectionStatements" bold="true" color="Blue">
-				<Key word="elif"/>
-				<Key word="else"/>
-				<Key word="if"/>
-			</KeyWords>
-		
-			<KeyWords name="WithStatement" color="DarkViolet">
-				<Key word="with"/>
-			</KeyWords>
-		</RuleSet>
-	</RuleSets>
-</SyntaxDefinition>

Added: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Resources/cross-script.png
===================================================================
(Binary files differ)


Property changes on: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Resources/cross-script.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/Tools/Maestro/Maestro.AddIn.Scripting/ScriptingConfigProperties.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/ScriptingConfigProperties.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/ScriptingConfigProperties.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -0,0 +1,61 @@
+#region Disclaimer / License
+// Copyright (C) 2012, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using ICSharpCode.Core;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using Props = ICSharpCode.Core.PropertyService;
+
+namespace Maestro.AddIn.Scripting
+{
+    /// <summary>
+    /// Scripting AddIn configuration properties
+    /// </summary>
+    public static class ScriptingConfigProperties
+    {
+        /// <summary>
+        /// Default IronPython module path
+        /// </summary>
+        public static string DefaultIronPythonModulePath
+        {
+            get { return Path.Combine(FileUtility.ApplicationRootPath, "AddIns\\Scripting\\Lib"); } //NOXLATE
+        }
+
+        /// <summary>
+        /// Show the IronPython console by default
+        /// </summary>
+        public static bool DefaultShowIronPythonConsole
+        {
+            get { return true; }
+        }
+
+        /// <summary>
+        /// IronPython module path (property name)
+        /// </summary>
+        public const string IronPythonModulePath = "Scripting.IronPythonModulePaths"; //NOXLATE
+
+        /// <summary>
+        /// Show the IronPython console (property name)
+        /// </summary>
+        public const string ShowIronPythonConsole = "Scripting.ShowIronPythonConsole"; //NOXLATE
+    }
+}

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Services/ScriptingClasses.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Services/ScriptingClasses.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Services/ScriptingClasses.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -29,10 +29,33 @@
 using System.IO;
 using Maestro.Editors.Common;
 using Microsoft.Scripting.Hosting.Shell;
+using Microsoft.Scripting.Runtime;
+using Microsoft.Scripting.Hosting;
+using Maestro.AddIn.Scripting.UI;
 
 namespace Maestro.AddIn.Scripting.Services
 {
+    public static class ScriptHostSetup
+    {
+        internal static void SetupGlobalScope(ScriptEngine engine, LanguageContext context)
+        {
+            var global = context.GetScope(null);
+            context.ScopeSetVariable(global, ScriptGlobals.HostApp, new HostApplication());
+        }
+    }
+
     /// <summary>
+    /// Python built-ins injected into the Maestro IronPython REPL
+    /// </summary>
+    public static class ScriptGlobals
+    {
+        /// <summary>
+        /// The Host Application
+        /// </summary>
+        public const string HostApp = "app"; //NOXLATE
+    }
+
+    /// <summary>
     /// A simplified helper class that is exposed to python scripts to provide
     /// convenience functionality or to workaround concepts that don't cleanly
     /// translate to IronPython (eg. Generics)
@@ -138,5 +161,34 @@
         {
             ErrorDialog.Show(ex);
         }
+
+        /// <summary>
+        /// Opens the default editor for the specified resource
+        /// </summary>
+        /// <param name="conn"></param>
+        /// <param name="resourceId"></param>
+        public void OpenEditor(IServerConnection conn, string resourceId)
+        {
+            Action action = () =>
+            {
+                var siteExp = this.MainWindow.ActiveSiteExplorer;
+                var omgr = ServiceRegistry.GetService<OpenResourceManager>();
+                omgr.Open(resourceId, conn, false, siteExp);
+            };
+            if (this.MainWindow.InvokeRequired)
+                this.MainWindow.Invoke(action);
+            else
+                action();
+        }
+
+        /// <summary>
+        /// Invokes the specified method on the UI thread. Methods that interact with the UI or create UI components
+        /// must be done on this thread
+        /// </summary>
+        /// <param name="method"></param>
+        public void UIInvoke(Delegate method)
+        {
+            this.MainWindow.Invoke(method);
+        }
     }
 }

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonPreferences.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonPreferences.Designer.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonPreferences.Designer.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -29,6 +29,8 @@
         private void InitializeComponent()
         {
             this.chkShowOnStartup = new System.Windows.Forms.CheckBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.txtModulePaths = new System.Windows.Forms.TextBox();
             this.SuspendLayout();
             // 
             // chkShowOnStartup
@@ -41,13 +43,33 @@
             this.chkShowOnStartup.Text = "Show on Startup";
             this.chkShowOnStartup.UseVisualStyleBackColor = true;
             // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(22, 54);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(108, 13);
+            this.label1.TabIndex = 1;
+            this.label1.Text = "Python Module Paths";
+            // 
+            // txtModulePaths
+            // 
+            this.txtModulePaths.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtModulePaths.Location = new System.Drawing.Point(149, 51);
+            this.txtModulePaths.Name = "txtModulePaths";
+            this.txtModulePaths.Size = new System.Drawing.Size(273, 20);
+            this.txtModulePaths.TabIndex = 2;
+            // 
             // IronPythonPreferences
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.txtModulePaths);
+            this.Controls.Add(this.label1);
             this.Controls.Add(this.chkShowOnStartup);
             this.Name = "IronPythonPreferences";
-            this.Size = new System.Drawing.Size(193, 66);
+            this.Size = new System.Drawing.Size(448, 103);
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -56,5 +78,7 @@
         #endregion
 
         private System.Windows.Forms.CheckBox chkShowOnStartup;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox txtModulePaths;
     }
 }

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonPreferences.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonPreferences.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonPreferences.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -30,7 +30,7 @@
 
 namespace Maestro.AddIn.Scripting.UI
 {
-    public partial class IronPythonPreferences : UserControl, IPreferenceSheet
+    internal partial class IronPythonPreferences : UserControl, IPreferenceSheet
     {
         public IronPythonPreferences()
         {
@@ -41,8 +41,10 @@
         {
             base.OnLoad(e);
 
-            var bShow = Props.Get(ShowIronPythonConsole, true);
+            var bShow = Props.Get(ScriptingConfigProperties.ShowIronPythonConsole, ScriptingConfigProperties.DefaultShowIronPythonConsole);
             chkShowOnStartup.Checked = bShow;
+
+            txtModulePaths.Text = Props.Get(ScriptingConfigProperties.IronPythonModulePath, ScriptingConfigProperties.DefaultIronPythonModulePath);
         }
 
         public string Title
@@ -55,15 +57,18 @@
             get { return this; }
         }
 
-        public const string ShowIronPythonConsole = "Scripting.ShowIronPythonConsole";//to support newline for textbox use
+        
 
         public bool ApplyChanges()
         {
             bool restart = false;
 
-            if (Apply(ShowIronPythonConsole, chkShowOnStartup.Checked))
+            if (Apply(ScriptingConfigProperties.ShowIronPythonConsole, chkShowOnStartup.Checked))
                 restart = true;
 
+            if (Apply(ScriptingConfigProperties.IronPythonModulePath, txtModulePaths.Text))
+                restart = true;
+
             return restart;
         }
 
@@ -78,7 +83,8 @@
 
         public void ApplyDefaults()
         {
-            Props.Set(ShowIronPythonConsole, true);
+            Props.Set(ScriptingConfigProperties.ShowIronPythonConsole, ScriptingConfigProperties.DefaultShowIronPythonConsole);
+            Props.Set(ScriptingConfigProperties.IronPythonModulePath, ScriptingConfigProperties.DefaultIronPythonModulePath);
         }
     }
 }

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.Designer.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.Designer.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -29,30 +29,58 @@
         private void InitializeComponent()
         {
             this.textEditorControl = new ICSharpCode.TextEditor.TextEditorControl();
+            this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+            this.btnClear = new System.Windows.Forms.ToolStripButton();
+            this.toolStrip1.SuspendLayout();
             this.SuspendLayout();
             // 
             // textEditorControl
             // 
             this.textEditorControl.Dock = System.Windows.Forms.DockStyle.Fill;
             this.textEditorControl.IsReadOnly = false;
-            this.textEditorControl.Location = new System.Drawing.Point(0, 0);
+            this.textEditorControl.Location = new System.Drawing.Point(0, 25);
             this.textEditorControl.Name = "textEditorControl";
-            this.textEditorControl.Size = new System.Drawing.Size(594, 299);
+            this.textEditorControl.Size = new System.Drawing.Size(594, 274);
             this.textEditorControl.TabIndex = 0;
             // 
+            // toolStrip1
+            // 
+            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.btnClear});
+            this.toolStrip1.Location = new System.Drawing.Point(0, 0);
+            this.toolStrip1.Name = "toolStrip1";
+            this.toolStrip1.Size = new System.Drawing.Size(594, 25);
+            this.toolStrip1.TabIndex = 1;
+            this.toolStrip1.Text = "toolStrip1";
+            // 
+            // btnClear
+            // 
+            this.btnClear.Image = global::Maestro.AddIn.Scripting.Properties.Resources.cross_script;
+            this.btnClear.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnClear.Name = "btnClear";
+            this.btnClear.Size = new System.Drawing.Size(54, 22);
+            this.btnClear.Text = "Clear";
+            this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
+            // 
             // IronPythonRepl
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Controls.Add(this.textEditorControl);
+            this.Controls.Add(this.toolStrip1);
             this.Name = "IronPythonRepl";
             this.Size = new System.Drawing.Size(594, 299);
+            this.toolStrip1.ResumeLayout(false);
+            this.toolStrip1.PerformLayout();
             this.ResumeLayout(false);
+            this.PerformLayout();
 
         }
 
         #endregion
 
         private ICSharpCode.TextEditor.TextEditorControl textEditorControl;
+        private System.Windows.Forms.ToolStrip toolStrip1;
+        private System.Windows.Forms.ToolStripButton btnClear;
     }
 }

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -7,12 +7,14 @@
 using System.Text;
 using System.Windows.Forms;
 using Maestro.Shared.UI;
+using ICSharpCode.TextEditor.Document;
+using System.IO;
 
 namespace Maestro.AddIn.Scripting.UI
 {
     using Lang.Python;
 
-    public partial class IronPythonRepl : SingletonViewContent
+    internal partial class IronPythonRepl : SingletonViewContent
     {
         private TextEditor textEditor;
         private PythonConsoleHost host;
@@ -22,8 +24,13 @@
             InitializeComponent();
             textEditorControl.CreateControl();
 
-            //TODO: Setup python syntax highlighting
+            textEditorControl.ShowVRuler = false;
+            textEditorControl.ShowHRuler = false;
 
+            //Our ICSharpCode.TextEditor has been modified to include the Python syntax file
+            //allowing us to do this
+            textEditorControl.SetHighlighting("Python"); //NOXLATE
+
             this.Title = this.Description = Strings.Title_IronPython_Console;
             this.Disposed += OnDisposed;
 
@@ -41,8 +48,18 @@
         {
             get
             {
-                return ViewRegion.Bottom;
+                return ViewRegion.Bottom | ViewRegion.Floating;
             }
         }
+
+        private void btnClear_Click(object sender, EventArgs e)
+        {
+            textEditorControl.Text = string.Empty;
+            var con = host.Console;
+            var cmdline = con.CommandLine;
+            //HACK: Should be a way to get this from IronPython
+            con.Write(">>> ", Microsoft.Scripting.Hosting.Shell.Style.Prompt);
+            textEditorControl.Refresh();
+        }
     }
 }

Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.resx	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/UI/IronPythonRepl.resx	2012-10-26 16:44:21 UTC (rev 7158)
@@ -117,4 +117,7 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/Thirdparty/IronPython-2.7.1/Lib/site.py
===================================================================
--- trunk/Tools/Maestro/Thirdparty/IronPython-2.7.1/Lib/site.py	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Thirdparty/IronPython-2.7.1/Lib/site.py	2012-10-26 16:44:21 UTC (rev 7158)
@@ -552,7 +552,8 @@
         setBEGINLIBPATH()
     setquit()
     setcopyright()
-    sethelper()
+    # This interfers with IronPython's helper, so it's disabled
+    #sethelper()
     aliasmbcs()
     setencoding()
     execsitecustomize()

Modified: trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/ICSharpCode.TextEditor.csproj
===================================================================
--- trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/ICSharpCode.TextEditor.csproj	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/ICSharpCode.TextEditor.csproj	2012-10-26 16:44:21 UTC (rev 7158)
@@ -222,12 +222,7 @@
     <Compile Include="Src\Document\HighlightingStrategy\SpanStack.cs" />
     <Compile Include="Src\Util\WeakCollection.cs" />
     <EmbeddedResource Include="Resources\Patch-Mode.xshd" />
+    <EmbeddedResource Include="Resources\Python.xshd" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\TreeViewAdv\Aga.Controls\Aga.Controls.csproj">
-      <Project>{E73BB233-D88B-44A7-A98F-D71EE158381D}</Project>
-      <Name>Aga.Controls</Name>
-    </ProjectReference>
-  </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
 </Project>
\ No newline at end of file

Added: trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Resources/Python.xshd
===================================================================
--- trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Resources/Python.xshd	                        (rev 0)
+++ trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Resources/Python.xshd	2012-10-26 16:44:21 UTC (rev 7158)
@@ -0,0 +1,100 @@
+<SyntaxDefinition name="Python" extensions=".py">
+	
+	<Properties>
+		<Property name="LineComment" value="#"/>
+	</Properties>
+	
+	<Digits name="Digits" color="DarkBlue"/>
+
+	<RuleSets>
+		<RuleSet ignorecase="false">
+			
+			<Delimiters>()[]{}@,:.`=;+-*/% &|^><</Delimiters>
+			
+			<Span name="Char" stopateol="true" color="Magenta" escapecharacter="\">
+				<Begin>'</Begin>
+				<End>'</End>
+			</Span>
+			
+			<Span name="DocComment" color="Green">
+				<Begin>"""</Begin>
+				<End>"""</End>
+			</Span>
+			
+			<Span name="LineComment" stopateol="true" color="Green">
+				<Begin>#</Begin>
+			</Span>
+			
+			<Span name="String" stopateol="true" color="Blue" escapecharacter="\">
+				<Begin>"</Begin>
+				<End>"</End>
+			</Span>
+			
+			<MarkPrevious bold="true" color="MidnightBlue">(</MarkPrevious>
+
+			<KeyWords name="BuiltInStatements" bold="true" color="MidnightBlue">
+				<Key word="assert"/>
+				<Key word="del"/>
+				<Key word="exec"/>
+				<Key word="global"/>
+				<Key word="lambda"/>
+				<Key word="print"/>
+			</KeyWords>
+			
+			<KeyWords name="ClassStatement" color="Blue" bold="true">
+				<Key word="class"/>
+			</KeyWords>
+			
+			<KeyWords name="ExceptionHandlingStatements" bold="true" color="Teal">
+				<Key word="except"/>
+				<Key word="finally"/>
+				<Key word="raise"/>
+				<Key word="try"/>
+			</KeyWords>
+			
+			<KeyWords name="FunctionDefinition" bold="true" color="Blue">
+				<Key word="def"/>
+			</KeyWords>
+			
+			<KeyWords name="Imports" bold="true" color="Green">
+				<Key word="import"/>
+				<Key word="from"/>
+			</KeyWords>
+			
+			<KeyWords name="IterationStatements" bold="true" color="Blue">
+				<Key word="for"/>
+				<Key word="in"/>
+				<Key word="while"/>
+			</KeyWords>
+			
+			<KeyWords name="JumpStatements" color="Navy">
+				<Key word="break"/>
+				<Key word="continue"/>
+				<Key word="yield"/>
+				<Key word="return"/>
+			</KeyWords>
+		
+			<KeyWords name="OperatorStatements" bold="true" color="DarkCyan">
+				<Key word="and"/>
+				<Key word="as"/>
+				<Key word="is"/>
+				<Key word="not"/>
+				<Key word="or"/>
+			</KeyWords>
+			
+			<KeyWords name="PassStatement" color="Gray">
+				<Key word="pass"/>
+			</KeyWords>			
+		
+			<KeyWords name="SelectionStatements" bold="true" color="Blue">
+				<Key word="elif"/>
+				<Key word="else"/>
+				<Key word="if"/>
+			</KeyWords>
+		
+			<KeyWords name="WithStatement" color="DarkViolet">
+				<Key word="with"/>
+			</KeyWords>
+		</RuleSet>
+	</RuleSets>
+</SyntaxDefinition>

Modified: trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Resources/SyntaxModes.xml
===================================================================
--- trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Resources/SyntaxModes.xml	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Resources/SyntaxModes.xml	2012-10-26 16:44:21 UTC (rev 7158)
@@ -42,6 +42,10 @@
 	<Mode file       = "PHP-Mode.xshd"
 	      name       = "PHP"
 	      extensions = ".php"/>
+
+  <Mode file       = "Python.xshd"
+	      name       = "Python"
+	      extensions = ".py"/>
 	
 	<Mode file       = "Tex-Mode.xshd"
 	      name       = "TeX"

Modified: trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Src/Document/LineManager/LineManager.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Src/Document/LineManager/LineManager.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Src/Document/LineManager/LineManager.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -323,7 +323,7 @@
 							}
 						}
 						#if DATACONSISTENCYTEST
-						Debug.Assert(false, "Found lone \\r, data consistency problems?");
+						//Debug.Assert(false, "Found lone \\r, data consistency problems?");
 						#endif
 						goto case '\n';
 					case '\n':

Modified: trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/CodeCompletionWindow.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/CodeCompletionWindow.cs	2012-10-26 08:49:03 UTC (rev 7157)
+++ trunk/Tools/Maestro/Thirdparty/SharpDevelop/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/CodeCompletionWindow.cs	2012-10-26 16:44:21 UTC (rev 7158)
@@ -29,7 +29,13 @@
 		int endOffset;
 		DeclarationViewWindow declarationViewWindow = null;
 		Rectangle workingScreen;
-		
+
+        public Font CompletionItemFont
+        {
+            get { return codeCompletionListView.Font; }
+            set { codeCompletionListView.Font = value; }
+        }
+
 		public static CodeCompletionWindow ShowCompletionWindow(Form parent, TextEditorControl control, string fileName, ICompletionDataProvider completionDataProvider, char firstChar)
 		{
 			return ShowCompletionWindow(parent, control, fileName, completionDataProvider, firstChar, true, true);
@@ -64,6 +70,7 @@
 			}
 			
 			codeCompletionListView = new CodeCompletionListView(completionData);
+            codeCompletionListView.Font = new System.Drawing.Font(FontFamily.GenericMonospace, codeCompletionListView.Font.Size);
 			codeCompletionListView.ImageList = completionDataProvider.ImageList;
 			codeCompletionListView.Dock = DockStyle.Fill;
 			codeCompletionListView.SelectedItemChanged += new EventHandler(CodeCompletionListViewSelectedItemChanged);



More information about the mapguide-commits mailing list