diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2014-11-20 19:39:12 +0300 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2014-11-20 19:39:12 +0300 |
commit | 499cc5c67b2a822f7c92ce969848fb750a0d5b50 (patch) | |
tree | 250ff6521773f0037286dfaef3abf0fe316c875b /main/src/addins/MonoDevelop.HexEditor | |
parent | a1656ddf9316d6f441018365b50729bc4a2bdde3 (diff) | |
parent | fed6e4be43cbc107beca77af223a62ca88c5076f (diff) |
Merge branch 'master' into xs6-editor
Conflicts:
main/external/debugger-libs
main/external/fsharpbinding
main/external/xwt
main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpCompletionTextEditorExtension.cs
main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpTextEditorIndentation.cs
main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs
main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/TypeSystemProvider.cs
main/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs
main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs
main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/IAssemblyBrowserNodeBuilder.cs
main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomTypeNodeBuilder.cs
main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebugCommands.cs
main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs
main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoringService.cs
main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/BehaviorPanel.cs
main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.addin.xml
main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/AbstractUsagesExtension.cs
main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs
main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorOptions.cs
main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs
main/src/addins/Xml/Editor/BaseXmlEditorExtension.cs
main/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj
main/src/core/MonoDevelop.Ide/AssemblyInfo.cs
main/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml
main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/Command.cs
main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs
main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResult.cs
main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs
main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/CodeDomFileDescriptionTemplate.cs
main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs
main/tests/UnitTests/MonoDevelop.CSharpBinding/CSharpTextEditorIndentationTests.cs
Diffstat (limited to 'main/src/addins/MonoDevelop.HexEditor')
-rw-r--r-- | main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Rendering/TextEditorMargin.cs | 2 | ||||
-rw-r--r-- | main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs | 19 |
2 files changed, 13 insertions, 8 deletions
diff --git a/main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Rendering/TextEditorMargin.cs b/main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Rendering/TextEditorMargin.cs index 4a376c3fea..da22d92f36 100644 --- a/main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Rendering/TextEditorMargin.cs +++ b/main/src/addins/MonoDevelop.HexEditor/Mono.MHex.Rendering/TextEditorMargin.cs @@ -71,7 +71,7 @@ namespace Mono.MHex.Rendering for (int i = 0; i < lineBytes.Length; i++) { byte b = lineBytes[i]; char ch = (char)b; - if (b < 128 && (Char.IsLetterOrDigit (ch) || Char.IsPunctuation (ch))) { + if (!char.IsControl (ch)) { sb.Append (ch); } else { sb.Append ("."); diff --git a/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs b/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs index b3c73ed53a..d07ade48be 100644 --- a/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs +++ b/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs @@ -82,12 +82,16 @@ namespace MonoDevelop.HexEditor public override Widget GetVisualizerWidget (ObjectValue val) { - hexEditor = new Mono.MHex.HexEditor (); + var options = DebuggingService.DebuggerSession.EvaluationOptions.Clone (); + options.AllowTargetInvoke = true; + options.ChunkRawStrings = true; IBuffer buffer = null; + hexEditor = new Mono.MHex.HexEditor (); + if (val.TypeName != "string") { - var raw = (RawValueArray) val.GetRawValue (); + var raw = (RawValueArray) val.GetRawValue (options); switch (val.TypeName) { case "sbyte[]": @@ -101,10 +105,7 @@ namespace MonoDevelop.HexEditor break; } } else { - var ops = DebuggingService.DebuggerSession.EvaluationOptions.Clone (); - ops.ChunkRawStrings = true; - - buffer = new RawStringBuffer ((RawValueString) val.GetRawValue (ops)); + buffer = new RawStringBuffer ((RawValueString) val.GetRawValue (options)); } hexEditor.HexEditorData.Buffer = buffer; @@ -120,13 +121,17 @@ namespace MonoDevelop.HexEditor public override bool StoreValue (ObjectValue val) { + var options = DebuggingService.DebuggerSession.EvaluationOptions.Clone (); + options.AllowTargetInvoke = true; + switch (val.TypeName) { case "byte[]": // HACK: make sure to load the full byte stream... long length = hexEditor.HexEditorData.Length; + hexEditor.HexEditorData.GetBytes (length - 1, 1); - val.SetRawValue (hexEditor.HexEditorData.Bytes); + val.SetRawValue (hexEditor.HexEditorData.Bytes, options); return true; default: return false; |