diff --git a/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.addin b/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.addin
index 4d7ad92c6b..5115ddb504 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.addin
+++ b/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.addin
@@ -14,7 +14,7 @@
-
+
-
+
+
+
+
+
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/ClassBrowserSupport.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/ClassBrowserSupport.cs
index c64f58d09a..dd9c069aed 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Pads/ClassBrowserSupport.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/ClassBrowserSupport.cs
@@ -4,6 +4,7 @@
using System;
using System.IO;
using Debugger;
+using ICSharpCode.Core.Presentation;
using ICSharpCode.NRefactory;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.SharpDevelop.Dom;
@@ -137,7 +138,10 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
public override void ShowContextMenu()
{
- // Don't show context menu as for usual AssemblyTreeNodes.
+ var assemblyModel = this.Model as IAssemblyModel;
+ if (assemblyModel != null) {
+ var ctx = MenuService.ShowContextMenu(null, assemblyModel, "/SharpDevelop/Services/DebuggerService/ModuleContextMenu");
+ }
}
static IAssemblyModel CreateAssemblyModel(Module module)
@@ -151,4 +155,30 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
return model;
}
}
+
+ ///
+ /// RunAssemblyWithDebuggerCommand.
+ ///
+ class AddModuleToWorkspaceCommand : SimpleCommand
+ {
+ public override bool CanExecute(object parameter)
+ {
+ IAssemblyModel assemblyModel = parameter as IAssemblyModel;
+ return (assemblyModel != null) && assemblyModel.Context.IsValid;
+ }
+
+ public override void Execute(object parameter)
+ {
+ var classBrowser = SD.GetService();
+ var modelFactory = SD.GetService();
+ if ((classBrowser != null) && (modelFactory != null)) {
+ IAssemblyModel assemblyModel = (IAssemblyModel) parameter;
+
+ // Create a new copy of this assembly model
+ IAssemblyModel newAssemblyModel = modelFactory.SafelyCreateAssemblyModelFromFile(assemblyModel.Context.Location);
+ if (newAssemblyModel != null)
+ classBrowser.AssemblyList.Assemblies.Add(newAssemblyModel);
+ }
+ }
+ }
}