diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2013-08-22 19:14:06 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2013-08-22 19:15:59 +0400 |
commit | 2fffaaf2ffed67b3381595a3eabb2ca8199c52ba (patch) | |
tree | 7f71108c48854fcf2a1a40815910b0d235f91a83 /main/src/addins/MonoDevelop.HexEditor | |
parent | f3c24797b1d6a5be2270b72223b8522b0e7115a1 (diff) |
[HexEditor] User the new debugger visualizer api
Diffstat (limited to 'main/src/addins/MonoDevelop.HexEditor')
-rw-r--r-- | main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs b/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs index 1fdf19d4b2..1a1ae4dadf 100644 --- a/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs +++ b/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorVisualizer.cs @@ -36,7 +36,7 @@ using Mono.MHex.Data; namespace MonoDevelop.HexEditor { - public class HexEditorVisualizer : IValueVisualizer + public class HexEditorVisualizer : ValueVisualizer { Mono.MHex.HexEditor hexEditor; @@ -46,11 +46,11 @@ namespace MonoDevelop.HexEditor #region IValueVisualizer implementation - public string Name { + public override string Name { get { return GettextCatalog.GetString ("HexEdit"); } } - public bool CanVisualize (ObjectValue val) + public override bool CanVisualize (ObjectValue val) { switch (val.TypeName) { case "sbyte[]": return true; @@ -61,6 +61,17 @@ namespace MonoDevelop.HexEditor } } + public override bool IsDefaultVisualizer (ObjectValue val) + { + switch (val.TypeName) { + case "sbyte[]": + case "byte[]": return true; + case "char[]": + case "string": return false; + default: return false; + } + } + void SetHexEditorOptions () { hexEditor.Options.FontName = MonoDevelop.SourceEditor.DefaultSourceEditorOptions.Instance.FontName; @@ -68,7 +79,7 @@ namespace MonoDevelop.HexEditor hexEditor.Repaint (); } - public Widget GetVisualizerWidget (ObjectValue val) + public override Widget GetVisualizerWidget (ObjectValue val) { hexEditor = new Mono.MHex.HexEditor (); @@ -111,7 +122,7 @@ namespace MonoDevelop.HexEditor return scrollWidget; } - public bool StoreValue (ObjectValue val) + public override bool StoreValue (ObjectValue val) { switch (val.TypeName) { case "byte[]": @@ -122,7 +133,7 @@ namespace MonoDevelop.HexEditor } } - public bool CanEdit (ObjectValue val) + public override bool CanEdit (ObjectValue val) { switch (val.TypeName) { case "byte[]": return true; |