OutputWindowOptionsService(ITextViewOptionsGroupService textViewOptionsGroupService, IContentTypeRegistryService contentTypeRegistryService) { var group = textViewOptionsGroupService.GetGroup(PredefinedTextViewGroupNames.OutputWindow); group.TextViewOptionChanged += TextViewOptionsGroup_TextViewOptionChanged; Default = new OutputWindowOptions(group, contentTypeRegistryService.GetContentType(ContentTypes.Any)); }
CodeEditorOptionsService(ITextViewOptionsGroupService textViewOptionsGroupService, IContentTypeRegistryService contentTypeRegistryService, [ImportMany] IEnumerable <Lazy <CodeEditorOptionsDefinition, ICodeEditorOptionsDefinitionMetadata> > codeEditorOptionsDefinitions) { var group = textViewOptionsGroupService.GetGroup(PredefinedTextViewGroupNames.CodeEditor); Options = codeEditorOptionsDefinitions.Select(a => CodeEditorOptions.TryCreate(group, contentTypeRegistryService, a.Metadata)).OfType <CodeEditorOptions>().ToArray(); }
ReplOptionsService(ITextViewOptionsGroupService textViewOptionsGroupService, IContentTypeRegistryService contentTypeRegistryService, [ImportMany] IEnumerable <Lazy <ReplOptionsDefinition, IReplOptionsDefinitionMetadata> > replOptionsDefinitions) { var group = textViewOptionsGroupService.GetGroup(PredefinedTextViewGroupNames.REPL); Options = replOptionsDefinitions.Select(a => ReplOptions.TryCreate(group, contentTypeRegistryService, a.Metadata)).Where(a => a != null).ToArray(); }
DocumentViewerOptionsService(ITextViewOptionsGroupService textViewOptionsGroupService, IContentTypeRegistryService contentTypeRegistryService) { var group = textViewOptionsGroupService.GetGroup(PredefinedTextViewGroupNames.DocumentViewer); Default = new DocumentViewerOptions(group, contentTypeRegistryService.GetContentType(ContentTypes.Any)); }
ReplOptionsService(ITextViewOptionsGroupService textViewOptionsGroupService, IContentTypeRegistryService contentTypeRegistryService, [ImportMany] IEnumerable<Lazy<ReplOptionsDefinition, IReplOptionsDefinitionMetadata>> replOptionsDefinitions) { var group = textViewOptionsGroupService.GetGroup(PredefinedTextViewGroupNames.REPL); Options = replOptionsDefinitions.Select(a => ReplOptions.TryCreate(group, contentTypeRegistryService, a.Metadata)).Where(a => a != null).ToArray(); }