|
|
|
@ -434,4 +434,69 @@ namespace ICSharpCode.ILSpy.TreeNodes
@@ -434,4 +434,69 @@ namespace ICSharpCode.ILSpy.TreeNodes
|
|
|
|
|
MainWindow.Instance.CurrentAssemblyList.RefreshSave(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[ExportContextMenuEntry(Header = "_Open Containing Folder", Category = "Shell")] |
|
|
|
|
sealed class OpenContainingFolder : IContextMenuEntry |
|
|
|
|
{ |
|
|
|
|
public bool IsVisible(TextViewContext context) |
|
|
|
|
{ |
|
|
|
|
if (context.SelectedTreeNodes == null) |
|
|
|
|
return false; |
|
|
|
|
return context.SelectedTreeNodes |
|
|
|
|
.All(n => n is AssemblyTreeNode a && File.Exists(a.LoadedAssembly.FileName)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public bool IsEnabled(TextViewContext context) |
|
|
|
|
{ |
|
|
|
|
if (context.SelectedTreeNodes == null) |
|
|
|
|
return false; |
|
|
|
|
return context.SelectedTreeNodes |
|
|
|
|
.All(n => n is AssemblyTreeNode a && File.Exists(a.LoadedAssembly.FileName)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void Execute(TextViewContext context) |
|
|
|
|
{ |
|
|
|
|
if (context.SelectedTreeNodes == null) |
|
|
|
|
return; |
|
|
|
|
foreach (var node in context.SelectedTreeNodes.OfType<AssemblyTreeNode>()) { |
|
|
|
|
var path = node.LoadedAssembly.FileName; |
|
|
|
|
if (File.Exists(path)) { |
|
|
|
|
MainWindow.ExecuteCommand("explorer.exe", $"/select,\"{path}\""); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[ExportContextMenuEntry(Header = "_Open Command Line Here", Category = "Shell")] |
|
|
|
|
sealed class OpenCmdHere : IContextMenuEntry |
|
|
|
|
{ |
|
|
|
|
public bool IsVisible(TextViewContext context) |
|
|
|
|
{ |
|
|
|
|
if (context.SelectedTreeNodes == null) |
|
|
|
|
return false; |
|
|
|
|
return context.SelectedTreeNodes |
|
|
|
|
.All(n => n is AssemblyTreeNode a && File.Exists(a.LoadedAssembly.FileName)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public bool IsEnabled(TextViewContext context) |
|
|
|
|
{ |
|
|
|
|
if (context.SelectedTreeNodes == null) |
|
|
|
|
return false; |
|
|
|
|
return context.SelectedTreeNodes |
|
|
|
|
.All(n => n is AssemblyTreeNode a && File.Exists(a.LoadedAssembly.FileName)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void Execute(TextViewContext context) |
|
|
|
|
{ |
|
|
|
|
if (context.SelectedTreeNodes == null) |
|
|
|
|
return; |
|
|
|
|
foreach (var node in context.SelectedTreeNodes.OfType<AssemblyTreeNode>()) { |
|
|
|
|
var path = Path.GetDirectoryName(node.LoadedAssembly.FileName); |
|
|
|
|
if (Directory.Exists(path)) { |
|
|
|
|
MainWindow.ExecuteCommand("cmd.exe", $"/k \"cd {path}\""); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|