~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DisassemblyView.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
using System.Text;
33
33
using MonoDevelop.Core;
34
34
using MonoDevelop.Ide.Gui;
 
35
using MonoDevelop.Ide.Gui.Content;
35
36
using MonoDevelop.Components.Commands;
36
37
using MonoDevelop.Ide.Commands;
37
38
using TextEditor = Mono.TextEditor.TextEditor;
38
39
using Mono.TextEditor;
39
40
using Mono.Debugging.Client;
 
41
using Mono.TextEditor.Highlighting;
40
42
 
41
43
namespace MonoDevelop.Debugger
42
44
{
43
 
        public class DisassemblyView: AbstractViewContent
 
45
        public class DisassemblyView: AbstractViewContent, IClipboardHandler
44
46
        {
45
47
                Gtk.ScrolledWindow sw;
46
48
                Mono.TextEditor.TextEditor editor;
66
68
                        editor.Document.ReadOnly = true;
67
69
                        
68
70
                        editor.Options = new MonoDevelop.Ide.Gui.CommonTextEditorOptions () {
69
 
                                ShowEolMarkers = false,
70
 
                                ShowInvalidLines = false,
71
71
                                ShowLineNumberMargin = false,
72
72
                        };
73
73
                        
354
354
                        var cf = DebuggingService.CurrentFrame;
355
355
                        ci.Enabled =  cf != null && addressLines.ContainsKey (GetAddrId (cf.Address, cf.AddressSpace));
356
356
                }
 
357
 
 
358
                #region IClipboardHandler implementation
 
359
 
 
360
                void IClipboardHandler.Cut ()
 
361
                {
 
362
                        throw new NotSupportedException ();
 
363
                }
 
364
 
 
365
                void IClipboardHandler.Copy ()
 
366
                {
 
367
                        editor.RunAction (ClipboardActions.Copy);
 
368
                }
 
369
 
 
370
                void IClipboardHandler.Paste ()
 
371
                {
 
372
                        throw new NotSupportedException ();
 
373
                }
 
374
 
 
375
                void IClipboardHandler.Delete ()
 
376
                {
 
377
                        throw new NotSupportedException ();
 
378
                }
 
379
 
 
380
                void IClipboardHandler.SelectAll ()
 
381
                {
 
382
                        editor.RunAction (SelectionActions.SelectAll);
 
383
                }
 
384
 
 
385
                bool IClipboardHandler.EnableCut {
 
386
                        get { return false; }
 
387
                }
 
388
 
 
389
                bool IClipboardHandler.EnableCopy {
 
390
                        get { return !editor.SelectionRange.IsEmpty; }
 
391
                }
 
392
 
 
393
                bool IClipboardHandler.EnablePaste {
 
394
                        get { return false; }
 
395
                }
 
396
 
 
397
                bool IClipboardHandler.EnableDelete {
 
398
                        get { return false; }
 
399
                }
 
400
 
 
401
                bool IClipboardHandler.EnableSelectAll {
 
402
                        get { return true; }
 
403
                }
 
404
 
 
405
                #endregion
357
406
        }
358
407
        
359
 
        class AsmLineMarker: TextMarker
 
408
        class AsmLineMarker: TextLineMarker
360
409
        {
361
410
                public override ChunkStyle GetStyle (ChunkStyle baseStyle)
362
411
                {
363
412
                        ChunkStyle st = new ChunkStyle (baseStyle);
364
 
                        st.CairoColor = new Cairo.Color (125, 125, 125);
 
413
                        st.Foreground = new Cairo.Color (125, 125, 125);
365
414
                        return st;
366
415
                }
367
416
        }