//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));
        }
Пример #3
0
 public override MonoDevelop.Ide.Gui.Document ShowDocument()
 {
     return(AddinBrowserViewContent.Open(registry));
 }
Пример #4
0
 public override Task <Ide.Gui.Document> ShowDocument()
 {
     return(AddinBrowserViewContent.Open(registry));
 }
Пример #5
0
 public override Task <MonoDevelop.Ide.Gui.Document> ShowDocument()
 {
     return(Task.FromResult(AddinBrowserViewContent.Open(registry)));
 }