Beispiel #1
0
        public static void OpenFileInPreviewTab(IServiceProvider serviceProvider, string file)
        {
            IVsNewDocumentStateContext newDocumentStateContext = null;

            try
            {
                IVsUIShellOpenDocument3 openDoc3 = DartPackage.GetGlobalService <SVsUIShellOpenDocument>() as IVsUIShellOpenDocument3;

                Guid reason = VSConstants.NewDocumentStateReason.Navigation;
                newDocumentStateContext = openDoc3.SetNewDocumentState((uint)__VSNEWDOCUMENTSTATE.NDS_Provisional, ref reason);

                VsShellUtilities.OpenDocument(serviceProvider, file);
            }
            finally
            {
                if (newDocumentStateContext != null)
                {
                    newDocumentStateContext.Restore();
                }
            }
        }
Beispiel #2
0
 internal DartErrorListProvider(DartPackage package)
 {
     errorProvider = new ErrorListProvider(package);
 }
Beispiel #3
0
 public static IComponentModel GetComponentModel()
 {
     return((IComponentModel)DartPackage.GetGlobalService(typeof(SComponentModel)));
 }