public ScheduledFoldGenerator( IFoldGenerator foldGenerator, IFoldGenerationTimer timer) { this.foldGenerator = foldGenerator; this.timer = timer; GenerateFolds(); timer.Tick += TimerElapsed; timer.Start(); }
public ReactiveFoldGenerator( ITextEditor textEditor, IFoldGenerator foldGenerator) { _foldGenerator = foldGenerator; var textEditorAdapter = textEditor as AvalonEditTextEditorAdapter; GenerateFolds(); if (textEditorAdapter != null) textEditorAdapter.KeyPress += (sender, args) => { if (args.Key == Key.Enter) GenerateFolds(); }; }
public ReactiveFoldGenerator( ITextEditor textEditor, IFoldGenerator foldGenerator) { _foldGenerator = foldGenerator; var textEditorAdapter = textEditor as AvalonEditTextEditorAdapter; GenerateFolds(); if (textEditorAdapter != null) { textEditorAdapter.KeyPress += (sender, args) => { if (args.Key == Key.Enter) { GenerateFolds(); } } } ; }
void AddFakeFoldGeneratorToFactory() { fakeFoldGenerator = MockRepository.GenerateStub<IFoldGenerator>(); fakeFoldGeneratorFactory.Stub(factory => factory.CreateFoldGenerator(fakeTextEditorWithParseInformationFolding)) .Return(fakeFoldGenerator); }
void CreateScheduledFoldGenerator() { fakeTimer = MockRepository.GenerateStub <IFoldGenerationTimer>(); fakeFoldGenerator = MockRepository.GenerateStub <IFoldGenerator>(); scheduledFoldGenerator = new ScheduledFoldGenerator(fakeFoldGenerator, fakeTimer); }
void Attach(ITextEditorWithParseInformationFolding editor) { foldGenerator = foldGeneratorFactory.CreateFoldGenerator(editor); }
public ScheduledFoldGenerator(IFoldGenerator foldGenerator) : this(foldGenerator, new FoldGenerationTimer()) { }
void AddFakeFoldGeneratorToFactory() { fakeFoldGenerator = MockRepository.GenerateStub <IFoldGenerator>(); fakeFoldGeneratorFactory.Stub(factory => factory.CreateFoldGenerator(fakeTextEditorWithParseInformationFolding)) .Return(fakeFoldGenerator); }
void CreateScheduledFoldGenerator() { fakeTimer = MockRepository.GenerateStub<IFoldGenerationTimer>(); fakeFoldGenerator = MockRepository.GenerateStub<IFoldGenerator>(); scheduledFoldGenerator = new ScheduledFoldGenerator(fakeFoldGenerator, fakeTimer); }