Beispiel #1
0
 public override void EditLabels()
 {
     if (!CanEditLabels)
     {
         return;
     }
     foreach (var vm in codeBreakpointsVM.AllItems)
     {
         vm.ClearEditingValueProperties();
     }
     if (SelectedItems.Count == 1)
     {
         SelectedItems[0].LabelsEditableValue.IsEditingValue = true;
     }
     else
     {
         var newLabels = messageBoxService.Ask <string>(dnSpy_Debugger_Resources.EditLabelsMsgBoxLabel, SelectedItems[0].GetLabelsString(), dnSpy_Debugger_Resources.EditLabelsTitle);
         if (newLabels != null)
         {
             var labelsColl = CodeBreakpointVM.CreateLabelsCollection(newLabels);
             dbgCodeBreakpointsService.Value.Modify(SelectedItems.Select(a => {
                 var bm          = a.CodeBreakpoint;
                 var settings    = bm.Settings;
                 settings.Labels = labelsColl;
                 return(new DbgCodeBreakpointAndSettings(bm, settings));
             }).ToArray());
         }
     }
 }
Beispiel #2
0
        internal void WriteLabels(IDbgTextWriter output, CodeBreakpointVM vm)
        {
            bool needSep = false;

            foreach (var label in vm.CodeBreakpoint.Labels ?? emptyLabels)
            {
                if (needSep)
                {
                    output.Write(DbgTextColor.Text, LabelsSeparatorString);
                    output.Write(DbgTextColor.Text, " ");
                }
                needSep = true;
                output.Write(DbgTextColor.Text, label);
            }
        }
Beispiel #3
0
 internal void WriteModule(IDbgTextWriter output, CodeBreakpointVM vm) => vm.BreakpointLocationFormatter.WriteModule(output);
Beispiel #4
0
 internal void WriteWhenHit(IDbgTextWriter output, CodeBreakpointVM vm) => vm.Context.BreakpointConditionsFormatter.Write(output, vm.CodeBreakpoint.Trace);
Beispiel #5
0
 internal void WriteFilter(IDbgTextWriter output, CodeBreakpointVM vm) => vm.Context.BreakpointConditionsFormatter.Write(output, vm.CodeBreakpoint.Filter);
Beispiel #6
0
 internal void WriteHitCount(IDbgTextWriter output, CodeBreakpointVM vm) => vm.Context.BreakpointConditionsFormatter.Write(output, vm.CodeBreakpoint.HitCount, vm.Context.DbgCodeBreakpointHitCountService.GetHitCount(vm.CodeBreakpoint));
Beispiel #7
0
 internal void WriteName(IDbgTextWriter output, CodeBreakpointVM vm) => vm.BreakpointLocationFormatter.WriteName(output, vm.Context.BreakpointLocationFormatterOptions);
Beispiel #8
0
 internal void WriteCondition(ITextColorWriter output, CodeBreakpointVM vm) => vm.Context.BreakpointConditionsFormatter.Write(output, vm.CodeBreakpoint.Condition);