~ubuntu-branches/ubuntu/vivid/monodevelop/vivid-proposed

« back to all changes in this revision

Viewing changes to src/tools/mdmonitor/TimeLineView.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2014-10-09 14:09:23 UTC
  • mfrom: (10.3.5)
  • Revision ID: package-import@ubuntu.com-20141009140923-s0d22u5f9kg8jvds
Tags: 5.5.0.227-1
* [b2c8331] Imported Upstream version 5.5.0.227 (Closes: #754316)
* [d210995] Delete obsolete patches
* [1b59ae1] Clear patch fizz, via quilt refresh
* [3dd147d] Fix error in configure.in which applies for tarball builds but 
  not git builds when running autoreconf
* [21c2a57] Remove Metacity references for good
* [3331661] Ensure NUnit 2.6.3 is installed
* [fd85c88] Build-depend on NuGet
* [a1ae116] Add WebKit to build dependencies, for Xwt moduleref resolution
* [9b4cf12] Since the GDB addin is integrated now, declare it in 
  debian/control
* [6231562] Correct NUnit links
* [3d2b693] Fix NuGet addin, by copying libs locally
* [74bf9a8] Don't symlink unused Mocks NUnit assembly
* [ade52b2] Ensure IKVM.Reflection is built with default (4.5) profile

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
using MonoDevelop.Core.Instrumentation;
32
32
using MonoDevelop.Components;
33
33
using System.Linq;
 
34
using Mono.TextEditor;
34
35
 
35
36
namespace Mono.Instrumentation.Monitor
36
37
{
181
182
                
182
183
                void FillTimerTraces (IEnumerable<TimerTrace> traces, List<CounterValueInfo> list, DateTime startTime, DateTime endTime)
183
184
                {
184
 
                        if (traces.Count () == 0) {
 
185
                        if (!traces.Any ()) {
185
186
                                GetValues (list, startTime, endTime, false, false);
186
187
                        } else {
187
188
                                GetValues (list, startTime, traces.First ().Timestamp, false, false);
267
268
                                                i++;
268
269
                                        }
269
270
                                        list.RemoveRange (n + 1, i - n - 1);
270
 
                                        val.CanExpand = (i > n + 1) || (val.TimerTraces.Count() > 0);
 
271
                                        val.CanExpand = (i > n + 1) || (val.TimerTraces.Any ());
271
272
                                } else
272
273
                                        val.Duration = list [n + 1].Time - val.Time;
273
274
                        }
367
368
                        
368
369
                        ctx.NewPath ();
369
370
                        ctx.Rectangle (markerX, ytop + baseTime + 0.5, MarkerWidth/2, ((mainValue.Duration.TotalMilliseconds * scale) / 1000));
370
 
                        HslColor hsl = Style.Foreground (Gtk.StateType.Normal);
 
371
                        Mono.TextEditor.HslColor hsl = Style.Foreground (Gtk.StateType.Normal);
371
372
                        hsl.L = 0.8;
372
 
                        ctx.Color = hsl;
 
373
                        ctx.SetSourceColor (hsl);
373
374
                        ctx.Fill ();
374
375
                        
375
376
                        // Draw values
392
393
                                int y = ytop + (int) (n * scale) + baseTime;
393
394
                                ctx.MoveTo (markerX, y + 0.5);
394
395
                                ctx.LineTo (markerX + MarkerWidth, y + 0.5);
395
 
                                ctx.Color = Style.Foreground (Gtk.StateType.Normal).ToCairoColor ();
 
396
                                ctx.SetSourceColor (Style.Foreground (Gtk.StateType.Normal).ToCairoColor ());
396
397
                                ctx.Stroke ();
397
398
                                
398
399
                                y += 2;
464
465
                                ctx.NewPath ();
465
466
                                double dx = val == focusedValue ? 0 : 2;
466
467
                                ctx.Rectangle (lx + 0.5 + dx - SelectedValuePadding, ytime + 0.5, LineEndWidth - dx*2 + SelectedValuePadding, ((val.Duration.TotalMilliseconds * scale) / 1000));
467
 
                                HslColor hsl = color;
 
468
                                Mono.TextEditor.HslColor hsl = color;
468
469
                                hsl.L = val == focusedValue ? 0.9 : 0.8;
469
 
                                ctx.Color = hsl;
 
470
                                ctx.SetSourceColor (hsl);
470
471
                                ctx.Fill ();
471
472
                        }
472
473
                        
476
477
                        ctx.LineTo (lx + LineEndWidth + 0.5, ytime + 0.5);
477
478
                        ctx.LineTo (tx - 3 - LineEndWidth + 0.5, ty + (th / 2) + 0.5);
478
479
                        ctx.LineTo (tx + indent - 3 + 0.5, ty + (th / 2) + 0.5);
479
 
                        ctx.Color = color.ToCairoColor ();
 
480
                        ctx.SetSourceColor (color.ToCairoColor ());
480
481
                        ctx.Stroke ();
481
482
                        
482
483
                        // Expander
522
523
                        ctx.LineWidth = 1;
523
524
                        ctx.Rectangle (ex, ey, ExpanderSize, ExpanderSize);
524
525
                        if (hilight)
525
 
                                ctx.Color = Style.Background (Gtk.StateType.Normal).ToCairoColor ();
 
526
                                ctx.SetSourceColor (Style.Background (Gtk.StateType.Normal).ToCairoColor ());
526
527
                        else
527
 
                                ctx.Color = Style.White.ToCairoColor ();
 
528
                                ctx.SetSourceColor (Style.White.ToCairoColor ());
528
529
                        ctx.FillPreserve ();
529
 
                        ctx.Color = Style.Foreground (Gtk.StateType.Normal).ToCairoColor ();
 
530
                        ctx.SetSourceColor (Style.Foreground (Gtk.StateType.Normal).ToCairoColor ());
530
531
                        ctx.Stroke ();
531
532
                        ctx.NewPath ();
532
533
                        ctx.MoveTo (ex + 2, ey + (ExpanderSize/2));