public static ILanguage GetLanguage(String key) { var model = new SComponentModel(); var factory = model.GetService <ILanguageFactory>(); return(factory.TryCreateLanguage(key)); }
public PresentationModeCommand(VsfPackage package, OleMenuCommandService omcs) : base(package, omcs) { var model = new SComponentModel(); this.state = model.GetService <IPresentationModeState>(); Initialize(new Guid(Guids.guidVsfViewCmdSet), PkgCmdIdList.cmdidPresentationMode); }
public ObfuscateTextCommand(VsfPackage package, OleMenuCommandService omcs) : base(package, omcs) { Initialize(new Guid(Guids.guidVsfViewCmdSet), PkgCmdIdList.cmdidObfuscateText); SComponentModel model = new SComponentModel(); this.telemetry = model.GetService <IVsfTelemetry>(); }
protected override void Dispose(bool disposing) { var model = new SComponentModel(); var ps = model.GetService <IPresentationModeState>(); if (disposing && ps.PresentationModeTurnedOn) { ps.TurnOff(notifyChanges: false); } base.Dispose(disposing); }
public static ITextView GetCurrentView() { var textManager = (IVsTextManager) ServiceProvider.GlobalProvider.GetService(typeof(SVsTextManager)); IVsTextView textView; int hr = textManager.GetActiveView(1, null, out textView); CheckError(hr, "GetActiveView"); var componentModel = new SComponentModel(); var factory = componentModel.GetService<IVsEditorAdaptersFactoryService>(); return factory.GetWpfTextView(textView); }
public static bool SupportsOutlines(ITextView view) { var componentModel = new SComponentModel(); var outliningService = componentModel.GetService <IOutliningManagerService>(); if (outliningService == null) { return(false); } var outliningManager = outliningService.GetOutliningManager(view); return(outliningManager != null && outliningManager.Enabled); }
public static ITextView GetCurrentView() { var textManager = (IVsTextManager) ServiceProvider.GlobalProvider.GetService(typeof(SVsTextManager)); int hr = textManager.GetActiveView(1, null, out IVsTextView textView); CheckError(hr, "GetActiveView"); var componentModel = new SComponentModel(); var factory = componentModel.GetService <IVsEditorAdaptersFactoryService>(); return(factory.GetWpfTextView(textView)); }
public static ITextView GetCurrentView() { var textManager = (IVsTextManager) ServiceProvider.GlobalProvider.GetService(typeof(SVsTextManager)); int hr = textManager.GetActiveView(1, null, out IVsTextView textView); if (hr != Constants.S_OK || textView == null) { return(null); } var componentModel = new SComponentModel(); var factory = componentModel.GetService <IVsEditorAdaptersFactoryService>(); return(factory.GetWpfTextView(textView)); }
public static bool SupportsOutlines(ITextView view) { var componentModel = new SComponentModel(); var outliningService = componentModel.GetService<IOutliningManagerService>(); if ( outliningService == null ) { return false; } var outliningManager = outliningService.GetOutliningManager(view); return outliningManager != null && outliningManager.Enabled; }
private static ILogger GetLogger() { var model = new SComponentModel(); return(model.GetService <ILogger>()); }
public static IVsfSettings GetSettings() { var model = new SComponentModel(); return(model.GetService <IVsfSettings>()); }
public static T GetService <T>() { var model = new SComponentModel(); return(model.GetService <T>()); }
public static IVsfSettings GetSettings() { var model = new SComponentModel(); return model.GetService<IVsfSettings>(); }
public static ILanguage GetLanguage(String key) { var model = new SComponentModel(); var factory = model.GetService<ILanguageFactory>(); return factory.TryCreateLanguage(key); }