public void ActivateItem(int n) { var member = memberList[n]; MonoDevelop.Ide.Gui.Content.IExtensibleTextEditor extEditor = document.GetContent <MonoDevelop.Ide.Gui.Content.IExtensibleTextEditor> (); if (extEditor != null) { extEditor.SetCaretTo(Math.Max(1, member.NameLocation.Line), member.NameLocation.Column); } }
void JumpTo(int line, int column) { MonoDevelop.Ide.Gui.Content.IExtensibleTextEditor extEditor = IdeApp.Workbench.ActiveDocument.GetContent <MonoDevelop.Ide.Gui.Content.IExtensibleTextEditor> (); if (extEditor != null) { extEditor.SetCaretTo(Math.Max(1, line), column); } }
public System.Collections.Generic.IEnumerable <ItemToolboxNode> GetDynamicItems(IToolboxConsumer consumer) { MonoDevelop.Ide.Gui.Content.IExtensibleTextEditor editor = consumer as MonoDevelop.Ide.Gui.Content.IExtensibleTextEditor; if (editor != null) { foreach (CodeTemplate ct in CodeTemplateService.GetCodeTemplatesForFile(editor.Name)) { if (ct.CodeTemplateContext != CodeTemplateContext.Standard) { continue; } yield return(new TemplateToolboxNode(ct) { Category = category, Icon = ImageService.GetPixbuf("md-template", Gtk.IconSize.Menu) }); } } yield break; }