예제 #1
0
        public ScheduledFoldGenerator(
            IFoldGenerator foldGenerator,
            IFoldGenerationTimer timer)
        {
            this.foldGenerator = foldGenerator;
            this.timer         = timer;

            GenerateFolds();
            timer.Tick += TimerElapsed;
            timer.Start();
        }
예제 #2
0
		public ScheduledFoldGenerator(
			IFoldGenerator foldGenerator,
			IFoldGenerationTimer timer)
		{
			this.foldGenerator = foldGenerator;
			this.timer = timer;
			
			GenerateFolds();
			timer.Tick += TimerElapsed;
			timer.Start();
		}
예제 #3
0
        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();
            };
        }
예제 #4
0
        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);
 }
예제 #7
0
		void Attach(ITextEditorWithParseInformationFolding editor)
		{
			foldGenerator = foldGeneratorFactory.CreateFoldGenerator(editor);
		}
예제 #8
0
 public ScheduledFoldGenerator(IFoldGenerator foldGenerator)
     : this(foldGenerator, new FoldGenerationTimer())
 {
 }
 void Attach(ITextEditorWithParseInformationFolding editor)
 {
     foldGenerator = foldGeneratorFactory.CreateFoldGenerator(editor);
 }
예제 #10
0
		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);
		}