Skip to content

Commit d757112

Browse files
committed
IronPython and AvalonEdit Engine update
Added IronPython 2.7.7 DLLs and Engine Added standard library from python 2.7.7 installation Revised to use most recetn version of AvalonEdit from NuGet Adjusted code to conform to new AvalonEdit
1 parent b71e40c commit d757112

37 files changed

+185
-9352
lines changed

PythonConsoleControl/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[assembly: ComVisible(false)]
2121

2222
// The following GUID is for the ID of the typelib if this project is exposed to COM
23-
[assembly: Guid("b0b5fcfe-99e9-4b16-ba2d-18a595eada4f")]
23+
[assembly: Guid("799d3277-6903-4a58-bdf8-4984f92993d1")]
2424

2525
// Version information for an assembly consists of the following four values:
2626
//
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
35+
[assembly: AssemblyVersion("2017.0.0.0")]
36+
[assembly: AssemblyFileVersion("2017.0.0.0")]

PythonConsoleControl/PythonConsole.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ protected void OnPaste(object target, ExecutedRoutedEventArgs args)
308308
}
309309
else if (rectangular && textArea.Selection.IsEmpty)
310310
{
311-
if (!RectangleSelection.PerformRectangularPaste(textArea, textArea.Caret.Offset, text, false))
311+
if (!RectangleSelection.PerformRectangularPaste(textArea, textArea.Caret.Position, text, false))
312312
textEditor.Write(text, false);
313313
}
314314
else

PythonConsoleControl/PythonConsoleControl.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@
9191
<Prefer32Bit>false</Prefer32Bit>
9292
</PropertyGroup>
9393
<ItemGroup>
94-
<Reference Include="ICSharpCode.AvalonEdit">
95-
<HintPath>RequiredLibraries\AvalonEdit\ICSharpCode.AvalonEdit.dll</HintPath>
94+
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
95+
<HintPath>..\packages\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
9696
</Reference>
9797
<Reference Include="IronPython">
9898
<HintPath>..\RequiredLibraries\IronPython.dll</HintPath>
@@ -168,6 +168,9 @@
168168
<Install>true</Install>
169169
</BootstrapperPackage>
170170
</ItemGroup>
171+
<ItemGroup>
172+
<None Include="packages.config" />
173+
</ItemGroup>
171174
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
172175
<PropertyGroup>
173176
<PostBuildEvent>

PythonConsoleControl/PythonConsoleControl.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public IronPythonConsoleControl()
6161
IList<IVisualLineTransformer> transformers = pad.Control.TextArea.TextView.LineTransformers;
6262
for (int i = 0; i < transformers.Count; ++i)
6363
{
64-
if (transformers[i] is HighlightingColorizer) transformers[i] = new PythonConsoleHighlightingColorizer(pythonHighlighting.MainRuleSet, pad.Control.Document);
64+
if (transformers[i] is HighlightingColorizer) transformers[i] = new PythonConsoleHighlightingColorizer(pythonHighlighting, pad.Control.Document);
6565
}
6666
}
6767

PythonConsoleControl/PythonConsoleHighlightingColorizer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class PythonConsoleHighlightingColorizer : HighlightingColorizer
2727
/// Creates a new HighlightingColorizer instance.
2828
/// </summary>
2929
/// <param name="ruleSet">The root highlighting rule set.</param>
30-
public PythonConsoleHighlightingColorizer(HighlightingRuleSet ruleSet, TextDocument document)
30+
public PythonConsoleHighlightingColorizer(IHighlightingDefinition ruleSet, TextDocument document)
3131
: base(ruleSet)
3232
{
3333
if (document == null)

PythonConsoleControl/PythonEditingCommandHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ internal static void OnCut(object target, ExecutedRoutedEventArgs args)
8383
else
8484
{
8585
CopySelectedText(textArea);
86-
textArea.Selection.ReplaceSelectionWithText(textArea, string.Empty);
86+
textArea.Selection.ReplaceSelectionWithText(string.Empty);
8787
}
8888
textArea.Caret.BringCaretToView();
8989
args.Handled = true;
@@ -105,7 +105,7 @@ internal static void CopySelectedText(TextArea textArea)
105105
return;
106106
}
107107

108-
string text = textArea.Selection.GetText(textArea.Document);
108+
string text = textArea.Selection.GetText();
109109
text = TextUtilities.NormalizeNewLines(text, Environment.NewLine);
110110
//textArea.OnTextCopied(new TextEventArgs(text));
111111
}
@@ -173,7 +173,7 @@ internal static ExecutedRoutedEventHandler OnDelete(RoutedUICommand selectingCom
173173
// If nothing in the selection is deletable; then reset caret+selection
174174
// to the previous value. This prevents the caret from moving through read-only sections.
175175
textArea.Caret.Position = oldCaretPosition;
176-
textArea.Selection = Selection.Empty;
176+
//textArea.Selection = Selection.Empty;
177177
}
178178
}
179179
method = textAreaType.GetMethod("RemoveSelectedText", BindingFlags.Instance | BindingFlags.NonPublic);

PythonConsoleControl/PythonTextEditor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ private void PerformTextInput(string text)
145145
string newLine = TextUtilities.GetNewLineFromDocument(textArea.Document, textArea.Caret.Line);
146146
using (textArea.Document.RunUpdate())
147147
{
148-
textArea.Selection.ReplaceSelectionWithText(textArea, newLine);
148+
textArea.Selection.ReplaceSelectionWithText(newLine);
149149
}
150150
}
151151
else
152-
textArea.Selection.ReplaceSelectionWithText(textArea, text);
152+
textArea.Selection.ReplaceSelectionWithText(text);
153153
textArea.Caret.BringCaretToView();
154154
}
155155

@@ -238,7 +238,7 @@ public bool SelectionIsMultiline
238238
{
239239
get
240240
{
241-
return textArea.Selection.IsMultiline(textArea.Document);
241+
return textArea.Selection.IsMultiline;
242242
}
243243
}
244244

Binary file not shown.

0 commit comments

Comments
 (0)