protected override void Initialize() { base.Initialize(); VSUtils.ForegroundThreadGuard.BindThread(); var componentModel = (IComponentModel)GetService(typeof(SComponentModel)); classificationColorManager = componentModel.DefaultExportProvider.GetExportedValue<ClassificationColorManager>(); shellService = GetService(typeof(SVsShell)) as IVsShell; if (shellService != null) ErrorHandler.ThrowOnFailure(shellService.AdviseBroadcastMessages(this, out broadcastEventCookie)); IServiceContainer serviceContainer = this; serviceContainer.AddService(typeof(GeneralOptionsPage), delegate { return GetDialogPage(typeof(GeneralOptionsPage)); }, promote:true); serviceContainer.AddService(typeof(FantomasOptionsPage), delegate { return GetDialogPage(typeof(FantomasOptionsPage)); }, promote:true); OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService; var shell = GetService(typeof(SVsUIShell)) as IVsUIShell; var logger = new Logger(ServiceProvider.GlobalProvider); if (mcs != null) { var newFolderMenu = new FolderMenuCommands(DTE.Value, mcs, shell); newFolderMenu.SetupCommands(); } }
protected override void Initialize() { base.Initialize(); VSUtils.ForegroundThreadGuard.BindThread(); var componentModel = (IComponentModel)GetService(typeof(SComponentModel)); classificationColorManager = componentModel.DefaultExportProvider.GetExportedValue<ClassificationColorManager>(); AdviseBroadcastMessages(); IServiceContainer serviceContainer = this; serviceContainer.AddService(typeof(GeneralOptionsPage), delegate { return GetDialogPage(typeof(GeneralOptionsPage)); }, promote: true); serviceContainer.AddService(typeof(FantomasOptionsPage), delegate { return GetDialogPage(typeof(FantomasOptionsPage)); }, promote: true); var generalOptions = GetService(typeof(GeneralOptionsPage)) as GeneralOptionsPage; if (generalOptions.FolderOrganizationEnabled) { SetupMenu(); RegisterPriorityCommandTarget(); } library = new FSharpLibrary(Navigation.PkgCmdConst.guidSymbolLibrary); library.LibraryCapabilities = (_LIB_FLAGS2)_LIB_FLAGS.LF_PROJECT; RegisterLibrary(); }
public FSharpReferenceTypeFormat(ClassificationColorManager colorManager) { DisplayName = "F# Types"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpReferenceType); ForegroundColor = colors.Foreground; BackgroundColor = colors.Background; }
public FSharpPatternCaseFormat(ClassificationColorManager colorManager) { DisplayName = "F# Patterns"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpPatternCase); ForegroundColor = colors.Foreground; BackgroundColor = colors.Background; }
public FSharpFunctionFormat(ClassificationColorManager colorManager) { DisplayName = "F# Functions / Methods"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpFunction); ForegroundColor = colors.Foreground; BackgroundColor = colors.Background; }
public FSharpMutableVarFormat(ClassificationColorManager colorManager) { DisplayName = "F# Mutable Variables / Reference Cells"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpMutableVar); ForegroundColor = colors.Foreground; BackgroundColor = colors.Background; }
public FSharpUnusedFormat(ClassificationColorManager colorManager) { DisplayName = "F# Unused Declarations"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpUnused); ForegroundColor = colors.Foreground; BackgroundColor = colors.Background; }
public FSharpPrintfFormat(ClassificationColorManager colorManager) { DisplayName = "F# Printf Format"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpPrintf); ForegroundColor = colors.Foreground; BackgroundColor = colors.Background; }
public FSharpEscapedFormat(ClassificationColorManager colorManager) { DisplayName = "F# Escaped Characters"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpEscaped); ForegroundColor = colors.Foreground; BackgroundColor = colors.Background; }
public FSharpOperatorFormat(ClassificationColorManager colorManager) { DisplayName = "F# Operators"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpOperator); ForegroundColor = colors.Foreground; BackgroundColor = colors.Background; }
public FSharpModuleFormat(ClassificationColorManager colorManager) { this.DisplayName = "F# Modules"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpModule); this.ForegroundColor = colors.Foreground; this.BackgroundColor = colors.Background; }
public FSharpQuotationFormat(ClassificationColorManager colorManager) { DisplayName = "F# Quotations"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpQuotation); ForegroundColor = colors.Foreground; BackgroundColor = colors.Background; ForegroundCustomizable = false; }
public SyntaxConstructClassifierProvider([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, ClassificationColorManager classificationColorManager) { this.serviceProvider = serviceProvider; this.classificationColorManager = classificationColorManager; // Receive notification for Visual Studio theme change shellEventListener = new ShellEventListener(this.serviceProvider); shellEventListener.Initialize(); shellEventListener.OnThemeChanged += UpdateTheme; }
public UnusedSymbolClassifierProvider( [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, ClassificationColorManager classificationColorManager, IClassificationTypeRegistryService classificationRegistry, ITextDocumentFactoryService textDocumentFactoryService, VSLanguageService fsharpVsLanguageService, ProjectFactory projectFactory) { _serviceProvider = serviceProvider; _classificationColorManager = classificationColorManager; _classificationRegistry = classificationRegistry; _textDocumentFactoryService = textDocumentFactoryService; _fsharpVsLanguageService = fsharpVsLanguageService; _projectFactory = projectFactory; // Receive notification for Visual Studio theme change VSColorTheme.ThemeChanged += UpdateTheme; }
public SyntaxConstructClassifierProvider( [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, ShellEventListener shellEventListener, ClassificationColorManager classificationColorManager, IClassificationTypeRegistryService classificationRegistry, ITextDocumentFactoryService textDocumentFactoryService, VSLanguageService fsharpVsLanguageService, ProjectFactory projectFactory) { _serviceProvider = serviceProvider; _classificationColorManager = classificationColorManager; _classificationRegistry = classificationRegistry; _textDocumentFactoryService = textDocumentFactoryService; _shellEventListener = shellEventListener; _fsharpVsLanguageService = fsharpVsLanguageService; _projectFactory = projectFactory; // Receive notification for Visual Studio theme change _shellEventListener.ThemeChanged += UpdateTheme; }
public FSharpPatternCaseFormat(ClassificationColorManager colorManager) { this.DisplayName = "F# Patterns"; this.ForegroundColor = colorManager.GetDefaultColor(ClassificationTypes.FSharpPatternCase); }
public FSharpEscapedFormat(ClassificationColorManager colorManager) { this.DisplayName = "F# Escaped Characters"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpEscaped); this.ForegroundColor = colors.Foreground; this.BackgroundColor = colors.Background; }
public FSharpUnusedFormat(ClassificationColorManager colorManager) { this.DisplayName = "F# Unused Declarations"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpUnused); this.ForegroundColor = colors.Foreground; this.BackgroundColor = colors.Background; }
public FSharpFunctionFormat(ClassificationColorManager colorManager) { this.DisplayName = "F# Functions / Methods"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpFunction); this.ForegroundColor = colors.Foreground; this.BackgroundColor = colors.Background; }
public FSharpMutableVarFormat(ClassificationColorManager colorManager) { this.DisplayName = "F# Mutable Variables / Reference Cells"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpMutableVar); this.ForegroundColor = colors.Foreground; this.BackgroundColor = colors.Background; }
public FSharpQuotationFormat(ClassificationColorManager colorManager) { this.DisplayName = "F# Quotations"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpQuotation); this.ForegroundColor = colors.Foreground; this.BackgroundColor = colors.Background; this.ForegroundCustomizable = false; }
public FSharpValueTypeFormat(ClassificationColorManager colorManager) { this.DisplayName = "F# Value Types"; var colors = colorManager.GetDefaultColors(ClassificationTypes.FSharpValueType); this.ForegroundColor = colors.Foreground; this.BackgroundColor = colors.Background; }
public FSharpReferenceTypeFormat(ClassificationColorManager colorManager) { this.DisplayName = "F# Types"; this.ForegroundColor = colorManager.GetDefaultColor(ClassificationTypes.FSharpReferenceType); }