diff options
Diffstat (limited to 'main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox')
3 files changed, 4 insertions, 6 deletions
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/CodeTemplateToolboxProvider.cs b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/CodeTemplateToolboxProvider.cs index bb48770836..5f2514e67b 100644 --- a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/CodeTemplateToolboxProvider.cs +++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/CodeTemplateToolboxProvider.cs @@ -29,6 +29,8 @@ using System; using MonoDevelop.Ide.CodeTemplates; using MonoDevelop.Ide; +using MonoDevelop.Ide.Gui.Content; +using MonoDevelop.Ide.Editor; namespace MonoDevelop.DesignerSupport.Toolbox { @@ -40,11 +42,9 @@ namespace MonoDevelop.DesignerSupport.Toolbox public System.Collections.Generic.IEnumerable<ItemToolboxNode> GetDynamicItems (IToolboxConsumer consumer) { - - MonoDevelop.Ide.Gui.Content.IExtensibleTextEditor editor - = consumer as MonoDevelop.Ide.Gui.Content.IExtensibleTextEditor; + var editor = consumer as IReadonlyTextDocument; if (editor != null) { - foreach (CodeTemplate ct in CodeTemplateService.GetCodeTemplatesForFile (editor.Name)) { + foreach (CodeTemplate ct in CodeTemplateService.GetCodeTemplatesForFile (editor.FileName)) { if (ct.CodeTemplateContext != CodeTemplateContext.Standard) continue; yield return new TemplateToolboxNode (ct) { diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/Toolbox.cs b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/Toolbox.cs index 49db886ca0..b7ab61e131 100644 --- a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/Toolbox.cs +++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/Toolbox.cs @@ -38,7 +38,6 @@ using MonoDevelop.Ide.Gui; using MonoDevelop.Components.Commands; using MonoDevelop.Components.Docking; using MonoDevelop.Ide; -using Mono.TextEditor; using MonoDevelop.Components; namespace MonoDevelop.DesignerSupport.Toolbox diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs index 65a771c0ef..19c9b6819e 100644 --- a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs +++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs @@ -32,7 +32,6 @@ using System.Collections.ObjectModel; using Gtk; using Pango; using Gdk; -using Mono.TextEditor; using MonoDevelop.Ide; using MonoDevelop.Components; |