Ejemplo n.º 1
0
 BookmarkSerializerServiceImpl(Lazy <ISettingsServiceFactory> settingsServiceFactory, Lazy <BookmarkLocationSerializerService> bookmarkLocationSerializerService, IPickSaveFilename pickSaveFilename, IMessageBoxService messageBoxService)
 {
     this.settingsServiceFactory            = settingsServiceFactory;
     this.bookmarkLocationSerializerService = bookmarkLocationSerializerService;
     this.pickSaveFilename  = pickSaveFilename;
     this.messageBoxService = messageBoxService;
 }
Ejemplo n.º 2
0
 DbgCodeBreakpointSerializerServiceImpl(Lazy <ISettingsServiceFactory> settingsServiceFactory, Lazy <DbgCodeLocationSerializerService> dbgCodeLocationSerializerService, IPickSaveFilename pickSaveFilename, IMessageBoxService messageBoxService)
 {
     this.settingsServiceFactory           = settingsServiceFactory;
     this.dbgCodeLocationSerializerService = dbgCodeLocationSerializerService;
     this.pickSaveFilename  = pickSaveFilename;
     this.messageBoxService = messageBoxService;
 }
Ejemplo n.º 3
0
 ModuleBreakpointsOperationsImpl(IModuleBreakpointsVM moduleBreakpointsVM, DebuggerSettings debuggerSettings, Lazy <DbgModuleBreakpointsService> dbgModuleBreakpointsService, Lazy <ISettingsServiceFactory> settingsServiceFactory, IPickSaveFilename pickSaveFilename, IPickFilename pickFilename, IMessageBoxService messageBoxService)
 {
     this.moduleBreakpointsVM         = moduleBreakpointsVM;
     this.debuggerSettings            = debuggerSettings;
     this.dbgModuleBreakpointsService = dbgModuleBreakpointsService;
     this.settingsServiceFactory      = settingsServiceFactory;
     this.pickSaveFilename            = pickSaveFilename;
     this.pickFilename      = pickFilename;
     this.messageBoxService = messageBoxService;
 }
Ejemplo n.º 4
0
 ReplEditorProvider(IDsTextEditorFactoryService dsTextEditorFactoryService, IContentTypeRegistryService contentTypeRegistryService, ITextBufferFactoryService textBufferFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IClassificationTypeRegistryService classificationTypeRegistryService, IThemeClassificationTypeService themeClassificationTypeService, IPickSaveFilename pickSaveFilename)
 {
     this.dsTextEditorFactoryService        = dsTextEditorFactoryService;
     this.contentTypeRegistryService        = contentTypeRegistryService;
     this.textBufferFactoryService          = textBufferFactoryService;
     this.editorOperationsFactoryService    = editorOperationsFactoryService;
     this.editorOptionsFactoryService       = editorOptionsFactoryService;
     this.classificationTypeRegistryService = classificationTypeRegistryService;
     this.themeClassificationTypeService    = themeClassificationTypeService;
     this.pickSaveFilename = pickSaveFilename;
 }
Ejemplo n.º 5
0
		ReplEditorProvider(IDsTextEditorFactoryService dsTextEditorFactoryService, IContentTypeRegistryService contentTypeRegistryService, ITextBufferFactoryService textBufferFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IClassificationTypeRegistryService classificationTypeRegistryService, IThemeClassificationTypeService themeClassificationTypeService, IPickSaveFilename pickSaveFilename, ITextViewUndoManagerProvider textViewUndoManagerProvider) {
			this.dsTextEditorFactoryService = dsTextEditorFactoryService;
			this.contentTypeRegistryService = contentTypeRegistryService;
			this.textBufferFactoryService = textBufferFactoryService;
			this.editorOperationsFactoryService = editorOperationsFactoryService;
			this.editorOptionsFactoryService = editorOptionsFactoryService;
			this.classificationTypeRegistryService = classificationTypeRegistryService;
			this.themeClassificationTypeService = themeClassificationTypeService;
			this.pickSaveFilename = pickSaveFilename;
			this.textViewUndoManagerProvider = textViewUndoManagerProvider;
		}
Ejemplo n.º 6
0
        public ReplEditor(ReplEditorOptions options, IDsTextEditorFactoryService dsTextEditorFactoryService, IContentTypeRegistryService contentTypeRegistryService, ITextBufferFactoryService textBufferFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IClassificationTypeRegistryService classificationTypeRegistryService, IThemeClassificationTypeService themeClassificationTypeService, IPickSaveFilename pickSaveFilename)
        {
            this.dispatcher       = Dispatcher.CurrentDispatcher;
            this.pickSaveFilename = pickSaveFilename;
            options = options?.Clone() ?? new ReplEditorOptions();
            options.CreateGuidObjects     = CommonGuidObjectsProvider.Create(options.CreateGuidObjects, new GuidObjectsProvider(this));
            this.PrimaryPrompt            = options.PrimaryPrompt;
            this.SecondaryPrompt          = options.SecondaryPrompt;
            this.subBuffers               = new List <ReplSubBuffer>();
            this.cachedColorsList         = new CachedColorsList();
            TextClassificationType        = classificationTypeRegistryService.GetClassificationType(ThemeClassificationTypeNames.Text);
            ReplPrompt1ClassificationType = classificationTypeRegistryService.GetClassificationType(ThemeClassificationTypeNames.ReplPrompt1);
            ReplPrompt2ClassificationType = classificationTypeRegistryService.GetClassificationType(ThemeClassificationTypeNames.ReplPrompt2);

            var contentType = contentTypeRegistryService.GetContentType(options.ContentType, options.ContentTypeString) ?? textBufferFactoryService.TextContentType;
            var textBuffer  = textBufferFactoryService.CreateTextBuffer(contentType);

            CachedColorsListTaggerProvider.AddColorizer(textBuffer, cachedColorsList);
            var roles           = dsTextEditorFactoryService.CreateTextViewRoleSet(options.Roles);
            var textView        = dsTextEditorFactoryService.CreateTextView(textBuffer, roles, editorOptionsFactoryService.GlobalOptions, options);
            var wpfTextViewHost = dsTextEditorFactoryService.CreateTextViewHost(textView, false);

            this.wpfTextViewHost = wpfTextViewHost;
            this.wpfTextView     = wpfTextViewHost.TextView;
            ReplEditorUtils.AddInstance(this, wpfTextView);
            wpfTextView.Options.SetOptionValue(DefaultWpfViewOptions.AppearanceCategory, AppearanceCategoryConstants.REPL);
            wpfTextView.Options.SetOptionValue(DefaultTextViewOptions.DragDropEditingId, false);
            //TODO: ReplEditorOperations doesn't support virtual space
            wpfTextView.Options.SetOptionValue(DefaultTextViewOptions.UseVirtualSpaceId, false);
            //TODO: Support box selection
            wpfTextView.Options.SetOptionValue(DefaultDsTextViewOptions.AllowBoxSelectionId, false);
            wpfTextView.Options.OptionChanged         += Options_OptionChanged;
            wpfTextView.TextBuffer.ChangedLowPriority += TextBuffer_ChangedLowPriority;
            wpfTextView.Closed += WpfTextView_Closed;
            this.wpfTextView.TextBuffer.Changed += TextBuffer_Changed;
            AddNewDocument();
            WriteOffsetOfPrompt(null, true);
            ReplEditorOperations              = new ReplEditorOperations(this, wpfTextView, editorOperationsFactoryService);
            wpfTextView.VisualElement.Loaded += WpfTextView_Loaded;
            UpdateRefreshScreenOnChange();
            CustomLineNumberMargin.SetOwner(wpfTextView, new ReplCustomLineNumberMarginOwner(this, themeClassificationTypeService));
        }
Ejemplo n.º 7
0
        OutputManager(IEditorOperationsFactoryService editorOperationsFactoryService, ILogEditorProvider logEditorProvider, OutputManagerSettingsImpl outputManagerSettingsImpl, IPickSaveFilename pickSaveFilename, IMenuManager menuManager, [ImportMany] IEnumerable <Lazy <IOutputManagerListener, IOutputManagerListenerMetadata> > outputManagerListeners)
        {
            this.editorOperationsFactoryService = editorOperationsFactoryService;
            this.logEditorProvider         = logEditorProvider;
            this.outputManagerSettingsImpl = outputManagerSettingsImpl;
            this.prevSelectedGuid          = outputManagerSettingsImpl.SelectedGuid;
            this.pickSaveFilename          = pickSaveFilename;
            this.menuManager   = menuManager;
            this.outputBuffers = new ObservableCollection <OutputBufferVM>();
            this.outputBuffers.CollectionChanged += OutputBuffers_CollectionChanged;

            var listeners = outputManagerListeners.OrderBy(a => a.Metadata.Order).ToArray();

            Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Send, new Action(() => {
                foreach (var lazy in outputManagerListeners)
                {
                    var l = lazy.Value;
                }
            }));
        }
Ejemplo n.º 8
0
		public ReplEditor(ReplEditorOptions options, IDsTextEditorFactoryService dsTextEditorFactoryService, IContentTypeRegistryService contentTypeRegistryService, ITextBufferFactoryService textBufferFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IClassificationTypeRegistryService classificationTypeRegistryService, IThemeClassificationTypeService themeClassificationTypeService, IPickSaveFilename pickSaveFilename, ITextViewUndoManagerProvider textViewUndoManagerProvider) {
			dispatcher = Dispatcher.CurrentDispatcher;
			this.pickSaveFilename = pickSaveFilename;
			options = options?.Clone() ?? new ReplEditorOptions();
			options.CreateGuidObjects = CommonGuidObjectsProvider.Create(options.CreateGuidObjects, new GuidObjectsProvider(this));
			PrimaryPrompt = options.PrimaryPrompt;
			SecondaryPrompt = options.SecondaryPrompt;
			subBuffers = new List<ReplSubBuffer>();
			cachedColorsList = new CachedColorsList();
			TextClassificationType = classificationTypeRegistryService.GetClassificationType(ThemeClassificationTypeNames.Text);
			ReplPrompt1ClassificationType = classificationTypeRegistryService.GetClassificationType(ThemeClassificationTypeNames.ReplPrompt1);
			ReplPrompt2ClassificationType = classificationTypeRegistryService.GetClassificationType(ThemeClassificationTypeNames.ReplPrompt2);

			var contentType = contentTypeRegistryService.GetContentType(options.ContentType, options.ContentTypeString) ?? textBufferFactoryService.TextContentType;
			var textBuffer = textBufferFactoryService.CreateTextBuffer(contentType);
			CachedColorsListTaggerProvider.AddColorizer(textBuffer, cachedColorsList);
			var roles = dsTextEditorFactoryService.CreateTextViewRoleSet(options.Roles);
			var textView = dsTextEditorFactoryService.CreateTextView(textBuffer, roles, editorOptionsFactoryService.GlobalOptions, options);
			var wpfTextViewHost = dsTextEditorFactoryService.CreateTextViewHost(textView, false);
			this.wpfTextViewHost = wpfTextViewHost;
			wpfTextView = wpfTextViewHost.TextView;
			textViewUndoManager = textViewUndoManagerProvider.GetTextViewUndoManager(wpfTextView);
			ReplEditorUtils.AddInstance(this, wpfTextView);
			wpfTextView.Options.SetOptionValue(DefaultWpfViewOptions.AppearanceCategory, AppearanceCategoryConstants.TextEditor);
			wpfTextView.Options.SetOptionValue(DefaultTextViewOptions.DragDropEditingId, false);
			//TODO: ReplEditorOperations doesn't support virtual space
			wpfTextView.Options.SetOptionValue(DefaultTextViewOptions.UseVirtualSpaceId, false);
			//TODO: Support box selection
			wpfTextView.Options.SetOptionValue(DefaultDsTextViewOptions.AllowBoxSelectionId, false);
			wpfTextView.Options.OptionChanged += Options_OptionChanged;
			wpfTextView.TextBuffer.ChangedLowPriority += TextBuffer_ChangedLowPriority;
			wpfTextView.Closed += WpfTextView_Closed;
			wpfTextView.TextBuffer.Changed += TextBuffer_Changed;
			AddNewDocument();
			WriteOffsetOfPrompt(null, true);
			ReplEditorOperations = new ReplEditorOperations(this, wpfTextView, editorOperationsFactoryService);
			wpfTextView.VisualElement.Loaded += WpfTextView_Loaded;
			UpdateRefreshScreenOnChange();
			CustomLineNumberMargin.SetOwner(wpfTextView, new ReplCustomLineNumberMarginOwner(this, themeClassificationTypeService));
		}
Ejemplo n.º 9
0
 ModulesSaver(IAppWindow appWindow, IMessageBoxService messageBoxService, IPickSaveFilename pickSaveFilename)
 {
     this.appWindow         = appWindow;
     this.messageBoxService = messageBoxService;
     this.pickSaveFilename  = pickSaveFilename;
 }
Ejemplo n.º 10
0
		OutputService(IOutputWindowOptionsService outputWindowOptionsService, IEditorOperationsFactoryService editorOperationsFactoryService, ILogEditorProvider logEditorProvider, OutputServiceSettingsImpl outputServiceSettingsImpl, IPickSaveFilename pickSaveFilename, IMenuService menuService, [ImportMany] IEnumerable<Lazy<IOutputServiceListener, IOutputServiceListenerMetadata>> outputServiceListeners) {
			this.outputWindowOptionsService = outputWindowOptionsService;
			outputWindowOptionsService.OptionChanged += OutputWindowOptionsService_OptionChanged;
			this.editorOperationsFactoryService = editorOperationsFactoryService;
			this.logEditorProvider = logEditorProvider;
			this.outputServiceSettingsImpl = outputServiceSettingsImpl;
			prevSelectedGuid = outputServiceSettingsImpl.SelectedGuid;
			this.pickSaveFilename = pickSaveFilename;
			this.menuService = menuService;
			outputBuffers = new ObservableCollection<OutputBufferVM>();
			outputBuffers.CollectionChanged += OutputBuffers_CollectionChanged;

			var listeners = outputServiceListeners.OrderBy(a => a.Metadata.Order).ToArray();
			Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Send, new Action(() => {
				foreach (var lazy in outputServiceListeners) {
					var l = lazy.Value;
				}
			}));
		}