Inheritance: IRHistory
コード例 #1
0
ファイル: RHistoryProvider.cs プロジェクト: Microsoft/RTVS
 public IRHistory CreateRHistory(IRInteractiveWorkflow interactiveWorkflow) {
     var contentType = _contentTypeRegistryService.GetContentType(RHistoryContentTypeDefinition.ContentType);
     var textBuffer = _textBufferFactory.CreateTextBuffer(contentType);
     var history = new RHistory(interactiveWorkflow, textBuffer, new FileSystem(), _settings, _editorOperationsFactory, _rtfBuilderService, () => RemoveRHistory(textBuffer));
     _histories[textBuffer] = history;
     return history;
 }
コード例 #2
0
        public IRHistory CreateRHistory(IRInteractiveWorkflow interactiveWorkflow)
        {
            var textBuffer = _textBufferFactory.CreateTextBuffer(_contentType);
            var history    = new RHistory(interactiveWorkflow, textBuffer, _fileSystem, _settings, _editorOperationsFactory, _rtfBuilderService, () => RemoveRHistory(textBuffer));

            _histories[textBuffer] = history;
            return(history);
        }
コード例 #3
0
ファイル: RHistoryProvider.cs プロジェクト: skrutsick/RTVS
        public IRHistory CreateRHistory(IRInteractiveWorkflowVisual interactiveWorkflow)
        {
            var contentType = _contentTypeRegistryService.GetContentType(RHistoryContentTypeDefinition.ContentType);
            var textBuffer  = _textBufferFactory.CreateTextBuffer(contentType);
            var history     = new RHistory(interactiveWorkflow, textBuffer, _fs, _settings, _editorOperationsFactory, _rtfBuilderService, () => RemoveRHistory(textBuffer));

            _histories[textBuffer] = history;
            return(history);
        }
コード例 #4
0
ファイル: RHistoryTests.cs プロジェクト: Microsoft/RTVS
        public void AddToHistory(string[] inputs, string expected) {
            var history = new RHistory(_interactiveWorkflow, _textBuffer, null, new RSettingsStub(), null, null, () => { });

            foreach (var input in inputs) {
                history.AddToHistory(input);
            }

            _textBuffer.CurrentSnapshot.GetText().Should().Be(expected);
        }
コード例 #5
0
 public RangeEntrySelector(RHistory history, bool isUp)
 {
     _history = history;
     _isUp    = isUp;
 }
コード例 #6
0
ファイル: RHistoryTests.cs プロジェクト: Microsoft/RTVS
        public void SelectHistoryEntry(bool isMultiline, string[] inputs, int lineToSelect, string expected) {
            var settings = new RSettingsStub { MultilineHistorySelection = isMultiline };
            var history = new RHistory(_interactiveWorkflow, _textBuffer, null, settings, null, null, () => { });

            foreach (var input in inputs) {
                history.AddToHistory(input);
            }

            history.SelectHistoryEntry(lineToSelect);

            history.GetSelectedText().Should().Be(expected);
            history.GetSelectedHistoryEntrySpans().Should().ContainSingle()
                .Which.GetText().Should().Be(expected);
        }
コード例 #7
0
 public SingleEntrySelector(RHistory history, bool isReversed)
 {
     _history    = history;
     _isReversed = isReversed;
 }
コード例 #8
0
 public IRHistory CreateRHistory(IRInteractiveWorkflow interactiveWorkflow) {
     var textBuffer = _textBufferFactory.CreateTextBuffer(_contentType);
     var history = new RHistory(interactiveWorkflow, textBuffer, _fileSystem, _settings, _editorOperationsFactory, _rtfBuilderService, () => RemoveRHistory(textBuffer));
     _histories[textBuffer] = history;
     return history;
 }