public IVsWindowFrame CreateAndOpenReadme(string text) { Microsoft.VisualStudio.OLE.Interop.IServiceProvider serviceProvider; IVsUIHierarchy vsUIHierarchy; uint num; IVsWindowFrame vsWindowFrame; string tempFilename = EditorIntegration.GetTempFilename("readme", "txt"); File.WriteAllText(tempFilename, text); IVsUIShellOpenDocument service = (IVsUIShellOpenDocument)this.VisualStudio.ServiceProvider.GetService(typeof(SVsUIShellOpenDocument)); Guid textViewGuid = VSConstants.LOGVIEWID.TextView_guid; if (!NativeMethods.Succeeded(service.OpenDocumentViaProject(tempFilename, ref textViewGuid, out serviceProvider, out vsUIHierarchy, out num, out vsWindowFrame))) { return(null); } vsUIHierarchy.SetProperty(num, -2057, true); if (NativeMethods.Succeeded(vsWindowFrame.Show())) { return(vsWindowFrame); } return(null); }
public NotificationActivator(EditorIntegration editorIntegration, string filePath) { this._editorIntegration = editorIntegration; this._filePath = filePath; }