From 0317bc10f4bc6afcb8d02a782c827716a6958c89 Mon Sep 17 00:00:00 2001 From: Ed Harvey Date: Tue, 7 Jun 2016 12:04:22 +1000 Subject: [PATCH] Sorting/Grouping of context menu entries --- ILSpy/TreeNodes/Analyzer/AnalyzeContextMenuEntry.cs | 2 +- ILSpy/TreeNodes/Analyzer/RemoveAnalyzeContextMenuEntry.cs | 2 +- ILSpy/TreeNodes/AssemblyTreeNode.cs | 6 +++--- ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ILSpy/TreeNodes/Analyzer/AnalyzeContextMenuEntry.cs b/ILSpy/TreeNodes/Analyzer/AnalyzeContextMenuEntry.cs index b9154ead7..23e5dceb2 100644 --- a/ILSpy/TreeNodes/Analyzer/AnalyzeContextMenuEntry.cs +++ b/ILSpy/TreeNodes/Analyzer/AnalyzeContextMenuEntry.cs @@ -24,7 +24,7 @@ using Mono.Cecil; namespace ICSharpCode.ILSpy.TreeNodes.Analyzer { - [ExportContextMenuEntryAttribute(Header = "Analyze", Icon = "images/Search.png")] + [ExportContextMenuEntry(Header = "Analyze", Icon = "images/Search.png", Category = "Analyze", Order = 100)] internal sealed class AnalyzeContextMenuEntry : IContextMenuEntry { public bool IsVisible(TextViewContext context) diff --git a/ILSpy/TreeNodes/Analyzer/RemoveAnalyzeContextMenuEntry.cs b/ILSpy/TreeNodes/Analyzer/RemoveAnalyzeContextMenuEntry.cs index 3bcbe782f..908c95888 100644 --- a/ILSpy/TreeNodes/Analyzer/RemoveAnalyzeContextMenuEntry.cs +++ b/ILSpy/TreeNodes/Analyzer/RemoveAnalyzeContextMenuEntry.cs @@ -20,7 +20,7 @@ using System.Linq; namespace ICSharpCode.ILSpy.TreeNodes.Analyzer { - [ExportContextMenuEntryAttribute(Header = "Remove", Icon = "images/Delete.png")] + [ExportContextMenuEntry(Header = "Remove", Icon = "images/Delete.png", Category = "Analyze", Order = 200)] internal sealed class RemoveAnalyzeContextMenuEntry : IContextMenuEntry { public bool IsVisible(TextViewContext context) diff --git a/ILSpy/TreeNodes/AssemblyTreeNode.cs b/ILSpy/TreeNodes/AssemblyTreeNode.cs index ce5b11bd4..b7c256507 100644 --- a/ILSpy/TreeNodes/AssemblyTreeNode.cs +++ b/ILSpy/TreeNodes/AssemblyTreeNode.cs @@ -293,7 +293,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } } - [ExportContextMenuEntryAttribute(Header = "_Remove", Icon = "images/Delete.png")] + [ExportContextMenuEntry(Header = "_Remove", Icon = "images/Delete.png")] sealed class RemoveAssembly : IContextMenuEntry { public bool IsVisible(TextViewContext context) @@ -350,7 +350,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } } - [ExportContextMenuEntry(Header = "_Load Dependencies")] + [ExportContextMenuEntry(Header = "_Load Dependencies", Category = "Dependencies")] sealed class LoadDependencies : IContextMenuEntry { public bool IsVisible(TextViewContext context) @@ -381,7 +381,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } } - [ExportContextMenuEntry(Header = "_Add To Main List")] + [ExportContextMenuEntry(Header = "_Add To Main List", Category = "Dependencies")] sealed class AddToMainList : IContextMenuEntry { public bool IsVisible(TextViewContext context) diff --git a/ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs b/ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs index 8660b1a6c..8632ee213 100644 --- a/ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs +++ b/ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs @@ -26,7 +26,7 @@ using ICSharpCode.ILSpy.TreeNodes.Analyzer; namespace ICSharpCode.ILSpy.TreeNodes { - [ExportContextMenuEntryAttribute(Header = "Search MSDN...", Icon = "images/SearchMsdn.png")] + [ExportContextMenuEntry(Header = "Search MSDN...", Icon = "images/SearchMsdn.png", Order = 9999)] internal sealed class SearchMsdnContextMenuEntry : IContextMenuEntry { private static string msdnAddress = "http://msdn.microsoft.com/en-us/library/{0}";