Beispiel #1
0
 protected override void Execute(ThreadsCtxMenuContext context)
 {
     foreach (var t in context.SelectedItems)
     {
         t.IsSuspended = true;
     }
 }
Beispiel #2
0
 public override void Execute(ThreadsCtxMenuContext context)
 {
     foreach (var t in context.SelectedItems)
     {
         t.IsSuspended = false;
     }
 }
Beispiel #3
0
 internal static void GoTo(ThreadsCtxMenuContext context, bool newTab)
 {
     if (context.SelectedItems.Length == 0)
     {
         return;
     }
     GoTo(context.SelectedItems[0], newTab);
 }
Beispiel #4
0
        public override void Execute(ThreadsCtxMenuContext context)
        {
            var output = new StringBuilderTextColorOutput();

            foreach (var vm in context.SelectedItems)
            {
                var printer = new ThreadPrinter(output, debuggerSettings.UseHexadecimal, theDebugger.Value.Debugger);
                printer.WriteCurrent(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteId(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteManagedId(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteCategory(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteName(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteLocation(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WritePriority(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteAffinityMask(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteSuspended(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteProcess(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteAppDomain(vm);
                output.Write(BoxedTextColor.Text, "\t");
                printer.WriteUserState(vm);
                output.WriteLine();
            }
            var s = output.ToString();

            if (s.Length > 0)
            {
                try {
                    Clipboard.SetText(s);
                }
                catch (ExternalException) { }
            }
        }
Beispiel #5
0
        public override void Execute(ThreadsCtxMenuContext context)
        {
            var output = new NoSyntaxHighlightOutput();

            foreach (var vm in context.SelectedItems)
            {
                var printer = new ThreadPrinter(output, debuggerSettings.UseHexadecimal, theDebugger.Value.Debugger);
                printer.WriteCurrent(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteId(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteManagedId(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteCategory(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteName(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteLocation(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WritePriority(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteAffinityMask(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteSuspended(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteProcess(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteAppDomain(vm);
                output.Write("\t", TextTokenKind.Text);
                printer.WriteUserState(vm);
                output.WriteLine();
            }
            var s = output.ToString();

            if (s.Length > 0)
            {
                Clipboard.SetText(s);
            }
        }
Beispiel #6
0
        protected override void Execute(ThreadsCtxMenuContext context)
        {
            var output = new PlainTextOutput();

            foreach (var vm in context.SelectedItems)
            {
                var printer = new ThreadPrinter(output, DebuggerSettings.Instance.UseHexadecimal);
                printer.WriteCurrent(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteId(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteManagedId(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteCategory(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteName(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteLocation(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WritePriority(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteAffinityMask(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteSuspended(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteProcess(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteAppDomain(vm);
                output.Write('\t', TextTokenType.Text);
                printer.WriteUserState(vm);
                output.WriteLine();
            }
            var s = output.ToString();

            if (s.Length > 0)
            {
                Clipboard.SetText(s);
            }
        }
Beispiel #7
0
 public override bool IsEnabled(ThreadsCtxMenuContext context)
 {
     return(context.SelectedItems.Length > 0);
 }
Beispiel #8
0
 public override void Execute(ThreadsCtxMenuContext context)
 {
     threadsContent.Value.ListView.SelectAll();
 }
Beispiel #9
0
 protected override void Execute(ThreadsCtxMenuContext context)
 {
     DebuggerSettings.Instance.UseHexadecimal = !DebuggerSettings.Instance.UseHexadecimal;
 }
Beispiel #10
0
 protected override void Initialize(ThreadsCtxMenuContext context, MenuItem menuItem)
 {
     menuItem.IsChecked = DebuggerSettings.Instance.UseHexadecimal;
 }
Beispiel #11
0
 public override void Execute(ThreadsCtxMenuContext context)
 {
     //TODO:
 }
Beispiel #12
0
 public override void Execute(ThreadsCtxMenuContext context)
 {
     SwitchToThreadThreadsCtxMenuCommand.GoTo(stackFrameManager, fileTabManager, moduleLoader, context, true);
 }
Beispiel #13
0
 internal static bool CanGoToThread(ThreadsCtxMenuContext context)
 {
     return(context.SelectedItems.Length == 1);
 }
Beispiel #14
0
 public override void Execute(ThreadsCtxMenuContext context)
 {
     GoTo(stackFrameManager, fileTabManager, moduleLoader, context, false);
 }
Beispiel #15
0
 public override void Execute(ThreadsCtxMenuContext context)
 {
     debuggerSettings.UseHexadecimal = !debuggerSettings.UseHexadecimal;
 }
Beispiel #16
0
 protected override void Execute(ThreadsCtxMenuContext context)
 {
     GoTo(context, false);
 }
Beispiel #17
0
 protected override void Execute(ThreadsCtxMenuContext context)
 {
     //TODO:
 }
Beispiel #18
0
 protected override void Execute(ThreadsCtxMenuContext context)
 {
     SwitchToThreadThreadsCtxMenuCommand.GoTo(context, true);
 }
Beispiel #19
0
 public override bool IsChecked(ThreadsCtxMenuContext context)
 {
     return(debuggerSettings.UseHexadecimal);
 }
Beispiel #20
0
 public override void Execute(ThreadsCtxMenuContext context)
 {
     GoTo(moduleIdProvider, stackFrameService, documentTabService, moduleLoader, context, false);
 }
Beispiel #21
0
 public override bool IsEnabled(ThreadsCtxMenuContext context)
 {
     return(CanGoToThread(context));
 }
Beispiel #22
0
 public override bool IsEnabled(ThreadsCtxMenuContext context) => CanGoToThread(context);
Beispiel #23
0
 internal static void GoTo(Lazy <IStackFrameManager> stackFrameManager, IFileTabManager fileTabManager, Lazy <IModuleLoader> moduleLoader, ThreadsCtxMenuContext context, bool newTab)
 {
     if (context.SelectedItems.Length == 0)
     {
         return;
     }
     GoTo(fileTabManager, moduleLoader.Value, stackFrameManager.Value, context.SelectedItems[0], newTab);
 }
Beispiel #24
0
 internal static void GoTo(IModuleIdProvider moduleIdProvider, Lazy <IStackFrameService> stackFrameService, IDocumentTabService documentTabService, Lazy <IModuleLoader> moduleLoader, ThreadsCtxMenuContext context, bool newTab)
 {
     if (context.SelectedItems.Length == 0)
     {
         return;
     }
     GoTo(moduleIdProvider, documentTabService, moduleLoader.Value, stackFrameService.Value, context.SelectedItems[0], newTab);
 }
Beispiel #25
0
 public override bool IsEnabled(ThreadsCtxMenuContext context)
 {
     return(SwitchToThreadThreadsCtxMenuCommand.CanGoToThread(context));
 }
Beispiel #26
0
 public override void Execute(ThreadsCtxMenuContext context) => SwitchToThreadThreadsCtxMenuCommand.GoTo(moduleIdProvider, stackFrameService, documentTabService, moduleLoader, context, true);
Beispiel #27
0
 public override bool IsEnabled(ThreadsCtxMenuContext context)
 {
     return(false);           //TODO:
 }
Beispiel #28
0
 public override bool IsEnabled(ThreadsCtxMenuContext context) => context.SelectedItems.Any(t => !t.IsSuspended);
Beispiel #29
0
 public override bool IsEnabled(ThreadsCtxMenuContext context)
 {
     return(context.SelectedItems.Any(t => t.IsSuspended));
 }
Beispiel #30
0
 protected override bool IsEnabled(ThreadsCtxMenuContext context)
 {
     return(ThreadsControlCreator.ThreadsControlInstance.listView.Items.Count > 0);
 }