|
|
|
|
@ -7,6 +7,7 @@
@@ -7,6 +7,7 @@
|
|
|
|
|
|
|
|
|
|
using System; |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using System.Diagnostics; |
|
|
|
|
using System.IO; |
|
|
|
|
using System.Windows.Forms; |
|
|
|
|
|
|
|
|
|
@ -50,23 +51,26 @@ namespace ICSharpCode.SharpDevelop.Project.Commands
@@ -50,23 +51,26 @@ namespace ICSharpCode.SharpDevelop.Project.Commands
|
|
|
|
|
SolutionItemNode solutionItemNode = ProjectBrowserPad.Instance.SelectedNode as SolutionItemNode; |
|
|
|
|
if (solutionItemNode != null) { |
|
|
|
|
OpenWith(solutionItemNode.FileName); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FileNode fileNode = ProjectBrowserPad.Instance.SelectedNode as FileNode; |
|
|
|
|
if (fileNode != null) { |
|
|
|
|
OpenWith(fileNode.FileName); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ProjectNode projectNode = ProjectBrowserPad.Instance.SelectedNode as ProjectNode; |
|
|
|
|
if (projectNode != null) { |
|
|
|
|
OpenWith(projectNode.Project.FileName); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Shows the OpenWith dialog for the specified file.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static void OpenWith(string fileName) |
|
|
|
|
static void OpenWith(string fileName) |
|
|
|
|
{ |
|
|
|
|
var codons = DisplayBindingService.GetCodonsPerFileName(fileName); |
|
|
|
|
int defaultCodonIndex = codons.IndexOf(DisplayBindingService.GetDefaultCodonPerFileName(fileName)); |
|
|
|
|
@ -78,6 +82,41 @@ namespace ICSharpCode.SharpDevelop.Project.Commands
@@ -78,6 +82,41 @@ namespace ICSharpCode.SharpDevelop.Project.Commands
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Opens the containing folder in the clipboard.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class OpenFolderContainingFile : AbstractMenuCommand |
|
|
|
|
{ |
|
|
|
|
public override void Run() |
|
|
|
|
{ |
|
|
|
|
SolutionItemNode solutionItemNode = ProjectBrowserPad.Instance.SelectedNode as SolutionItemNode; |
|
|
|
|
if (solutionItemNode != null) { |
|
|
|
|
OpenContainingFolderInExplorer(solutionItemNode.FileName); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FileNode fileNode = ProjectBrowserPad.Instance.SelectedNode as FileNode; |
|
|
|
|
if (fileNode != null) { |
|
|
|
|
OpenContainingFolderInExplorer(fileNode.FileName); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ProjectNode projectNode = ProjectBrowserPad.Instance.SelectedNode as ProjectNode; |
|
|
|
|
if (projectNode != null) { |
|
|
|
|
OpenContainingFolderInExplorer(projectNode.Project.FileName); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void OpenContainingFolderInExplorer(string fileName) |
|
|
|
|
{ |
|
|
|
|
if (File.Exists(fileName)) { |
|
|
|
|
string folder = Path.GetDirectoryName(fileName); |
|
|
|
|
Process.Start(folder); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class ExcludeFileFromProject : AbstractMenuCommand |
|
|
|
|
{ |
|
|
|
|
public static void ExcludeFileNode(FileNode fileNode) |
|
|
|
|
|