~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Commands/ShowFunctions.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using System.Collections.Generic;
 
6
using System.Linq;
 
7
using System.Windows.Controls;
 
8
 
 
9
using ICSharpCode.Core;
 
10
using ICSharpCode.Profiler.AddIn.Views;
 
11
using ICSharpCode.Profiler.Controller;
 
12
using ICSharpCode.Profiler.Controls;
 
13
using ICSharpCode.SharpDevelop;
 
14
 
 
15
namespace ICSharpCode.Profiler.AddIn.Commands
 
16
{
 
17
        /// <summary>
 
18
        /// Description of ShowFunctions
 
19
        /// </summary>
 
20
        public class ShowFunctions : ProfilerMenuCommand
 
21
        {
 
22
                /// <summary>
 
23
                /// Starts the command
 
24
                /// </summary>
 
25
                public override void Run()
 
26
                {
 
27
                        var selectedItem = GetSelectedItems().FirstOrDefault();
 
28
                        if (selectedItem != null)
 
29
                                Parent.CreateTab(string.Format(StringParser.Parse("${res:AddIns.Profiler.Commands.ShowFunctions.TabTitle}"), selectedItem.GetSignature()),
 
30
                                                 "from f in Functions where f.Signature == \"" + selectedItem.GetSignature() + "\" select f");
 
31
                }
 
32
        }
 
33
}