//TODO: allow opening a specific addin and path public static Document Open (AddinRegistry registry, object selection = null) { foreach (var doc in IdeApp.Workbench.Documents) { var content = doc.GetContent<AddinBrowserViewContent> (); if (content != null && content.widget.TreeView.Registry == registry) { content.WorkbenchWindow.SelectWindow (); if (selection != null) { content.widget.TreeView.SelectObject (selection); } return doc; } } var newContent = new AddinBrowserViewContent (registry); if (selection != null) { newContent.widget.TreeView.SelectObject (selection); } return IdeApp.Workbench.OpenDocument (newContent, true); }
//TODO: allow opening a specific addin and path public static Document Open(AddinRegistry registry, object selection = null) { foreach (var doc in IdeApp.Workbench.Documents) { var content = doc.GetContent <AddinBrowserViewContent> (); if (content != null && content.widget.TreeView.Registry == registry) { content.WorkbenchWindow.SelectWindow(); if (selection != null) { content.widget.TreeView.SelectObject(selection); } return(doc); } } var newContent = new AddinBrowserViewContent(registry); if (selection != null) { newContent.widget.TreeView.SelectObject(selection); } return(IdeApp.Workbench.OpenDocument(newContent, true)); }
public override MonoDevelop.Ide.Gui.Document ShowDocument() { return(AddinBrowserViewContent.Open(registry)); }
public override Task <Ide.Gui.Document> ShowDocument() { return(AddinBrowserViewContent.Open(registry)); }
public override Task <MonoDevelop.Ide.Gui.Document> ShowDocument() { return(Task.FromResult(AddinBrowserViewContent.Open(registry))); }