/* Function: AddPriorityChangeWatcher * Adds an object to be notified about changes to the database. Ones added with this function will receive * change notifications before ones that aren't. This can be called both before and after <Start()>. */ public void AddPriorityChangeWatcher(IChangeWatcher watcher) { lock (changeWatchers) { changeWatchers.Insert(0, watcher); } }
public CodeEditor() { CodeEditorOptions.Instance.PropertyChanged += CodeEditorOptions_Instance_PropertyChanged; CustomizedHighlightingColor.ActiveColorsChanged += CustomizedHighlightingColor_ActiveColorsChanged; ParserService.ParseInformationUpdated += ParserServiceParseInformationUpdated; this.FlowDirection = FlowDirection.LeftToRight; // code editing is always left-to-right this.CommandBindings.Add(new CommandBinding(SharpDevelopRoutedCommands.SplitView, OnSplitView)); textMarkerService = new TextMarkerService(this); iconBarManager = new IconBarManager(); changeWatcher = new DefaultChangeWatcher(); primaryTextEditor = CreateTextEditor(); primaryTextEditorAdapter = (CodeEditorAdapter)primaryTextEditor.TextArea.GetService(typeof(ITextEditor)); Debug.Assert(primaryTextEditorAdapter != null); activeTextEditor = primaryTextEditor; this.Document = primaryTextEditor.Document; primaryTextEditor.SetBinding(TextEditor.DocumentProperty, new Binding("Document") { Source = this }); this.ColumnDefinitions.Add(new ColumnDefinition()); this.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); this.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star), MinHeight = minRowHeight }); SetRow(primaryTextEditor, 1); this.Children.Add(primaryTextEditor); }
public ChangeMarkerMargin(IChangeWatcher changeWatcher) { this.changeWatcher = changeWatcher; this.hoverLogic = new MouseHoverLogic(this); this.hoverLogic.MouseHover += delegate(object sender, MouseEventArgs e) { DisplayTooltip(e); }; changeWatcher.ChangeOccurred += ChangeOccurred; }
public ChangeMarkerMargin(IChangeWatcher changeWatcher) { this.changeWatcher = changeWatcher; this.hoverLogic = new MouseHoverLogic(this); this.hoverLogic.MouseHover += delegate(object sender, MouseEventArgs e) { DisplayTooltip(e); }; changeWatcher.ChangeOccurred += ChangeOccurred; }
/* Function: AddChangeWatcher * Adds an object to be notified about changes to the database. This can be called both before and after * <Start()>. */ public void AddChangeWatcher(IChangeWatcher watcher) { lock (changeWatchers) { changeWatchers.Add(watcher); } }
public CodeEditor() { CodeEditorOptions.Instance.PropertyChanged += CodeEditorOptions_Instance_PropertyChanged; CustomizedHighlightingColor.ActiveColorsChanged += CustomizedHighlightingColor_ActiveColorsChanged; SD.ParserService.ParseInformationUpdated += ParserServiceParseInformationUpdated; this.FlowDirection = FlowDirection.LeftToRight; // code editing is always left-to-right this.document = new TextDocument(); var documentServiceContainer = document.GetRequiredService <IServiceContainer>(); textMarkerService = new TextMarkerService(document); documentServiceContainer.AddService(typeof(ITextMarkerService), textMarkerService); iconBarManager = new IconBarManager(); documentServiceContainer.AddService(typeof(IBookmarkMargin), iconBarManager); if (CodeEditorOptions.Instance.EnableChangeMarkerMargin) { changeWatcher = new DefaultChangeWatcher(); } primaryTextEditor = CreateTextEditor(); primaryTextEditorAdapter = (CodeEditorAdapter)primaryTextEditor.TextArea.GetService(typeof(ITextEditor)); Debug.Assert(primaryTextEditorAdapter != null); this.ColumnDefinitions.Add(new ColumnDefinition()); this.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); this.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star), MinHeight = minRowHeight }); SetRow(primaryTextEditor, 1); this.Children.Add(primaryTextEditor); }
public TrackBackground(EnhancedScrollBar enhanchedScrollBar) { this.editor = enhanchedScrollBar.editor; this.textMarkerService = enhanchedScrollBar.textMarkerService; this.changeWatcher = enhanchedScrollBar.changeWatcher; textMarkerService.RedrawRequested += textMarkerService_RedrawRequested; }
/* Function: AddPriorityChangeWatcher * Adds an object to be notified about changes to the index. Ones added with this function will receive change * notifications before ones that aren't. This can be called both before and after <Start()>. */ public void AddPriorityChangeWatcher(IChangeWatcher watcher) { accessLock.EnterWriteLock(); try { changeWatchers.Insert(0, watcher); } finally { accessLock.ExitWriteLock(); } }
// Group: SearchIndex.IChangeWatcher Functions // __________________________________________________________________________ /* Function: AddChangeWatcher * Adds an object to be notified about changes to the index. This can be called both before and after <Start()>. */ public void AddChangeWatcher(IChangeWatcher watcher) { accessLock.EnterWriteLock(); try { changeWatchers.Add(watcher); } finally { accessLock.ExitWriteLock(); } }
public StreamStoreConfigRepository( IStreamStore streamStore, string streamId = Constants.DefaultStreamName, IConfigurationSettingsHooks messageHooks = null, IChangeWatcher changeWatcher = null) { _streamStore = streamStore; _streamId = streamId; _changeWatcher = changeWatcher; _messageHooks = messageHooks ?? new NoOpHooks(); _changeWatcher = changeWatcher ?? new SubscriptionBasedChangeWatcher(_streamStore, _streamId, _messageHooks); }
public EnhancedScrollBar(TextEditor editor, TextMarkerService textMarkerService, IChangeWatcher changeWatcher) { if (editor == null) throw new ArgumentNullException("editor"); this.editor = editor; this.textMarkerService = textMarkerService; this.changeWatcher = changeWatcher; editor.Loaded += editor_Loaded; if (editor.IsLoaded) { editor_Loaded(null, null); } }
/* Function: RemoveChangeWatcher * Removes a watcher so that they're no longer notified of changes to the database. It doesn't matter which * function you used to add it with. This can be called both before and after <Start()>. */ public void RemoveChangeWatcher(IChangeWatcher watcher) { lock (changeWatchers) { for (int i = 0; i < changeWatchers.Count; i++) { if ((object)watcher == (object)changeWatchers[i]) { changeWatchers.RemoveAt(i); return; } } } }
public EnhancedScrollBar(TextEditor editor, TextMarkerService textMarkerService, IChangeWatcher changeWatcher) { if (editor == null) { throw new ArgumentNullException("editor"); } this.editor = editor; this.textMarkerService = textMarkerService; this.changeWatcher = changeWatcher; editor.Loaded += editor_Loaded; if (editor.IsLoaded) { editor_Loaded(null, null); } }
/* Function: RemoveChangeWatcher * Removes a watcher so that they're no longer notified of changes to the index. It doesn't matter which function * you used to add it with. This can be called both before and after <Start()>. */ public void RemoveChangeWatcher(IChangeWatcher watcher) { accessLock.EnterWriteLock(); try { for (int i = 0; i < changeWatchers.Count; i++) { if ((object)watcher == (object)changeWatchers[i]) { changeWatchers.RemoveAt(i); return; } } } finally { accessLock.ExitWriteLock(); } }
public ChangeMarkerMargin(IChangeWatcher changeWatcher) { this.changeWatcher = changeWatcher; changeWatcher.ChangeOccurred += ChangeOccurred; }
public CodeEditor() { CodeEditorOptions.Instance.PropertyChanged += CodeEditorOptions_Instance_PropertyChanged; CustomizedHighlightingColor.ActiveColorsChanged += CustomizedHighlightingColor_ActiveColorsChanged; ParserService.ParseInformationUpdated += ParserServiceParseInformationUpdated; this.FlowDirection = FlowDirection.LeftToRight; // code editing is always left-to-right this.CommandBindings.Add(new CommandBinding(SharpDevelopRoutedCommands.SplitView, OnSplitView)); textMarkerService = new TextMarkerService(this); iconBarManager = new IconBarManager(); changeWatcher = new DefaultChangeWatcher(); primaryTextEditor = CreateTextEditor(); primaryTextEditorAdapter = (CodeEditorAdapter)primaryTextEditor.TextArea.GetService(typeof(ITextEditor)); Debug.Assert(primaryTextEditorAdapter != null); activeTextEditor = primaryTextEditor; this.Document = primaryTextEditor.Document; primaryTextEditor.SetBinding(TextEditor.DocumentProperty, new Binding("Document") { Source = this }); this.ColumnDefinitions.Add(new ColumnDefinition()); this.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); this.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star), MinHeight = minRowHeight }); SetRow(primaryTextEditor, 1); this.Children.Add(primaryTextEditor); }
public CodeEditor() { CodeEditorOptions.Instance.PropertyChanged += CodeEditorOptions_Instance_PropertyChanged; CustomizedHighlightingColor.ActiveColorsChanged += CustomizedHighlightingColor_ActiveColorsChanged; SD.ParserService.ParseInformationUpdated += ParserServiceParseInformationUpdated; this.FlowDirection = FlowDirection.LeftToRight; // code editing is always left-to-right this.document = new TextDocument(); var documentServiceContainer = document.GetRequiredService<IServiceContainer>(); textMarkerService = new TextMarkerService(document); documentServiceContainer.AddService(typeof(ITextMarkerService), textMarkerService); iconBarManager = new IconBarManager(); documentServiceContainer.AddService(typeof(IBookmarkMargin), iconBarManager); if (CodeEditorOptions.Instance.EnableChangeMarkerMargin) { changeWatcher = new DefaultChangeWatcher(); } primaryTextEditor = CreateTextEditor(); primaryTextEditorAdapter = (CodeEditorAdapter)primaryTextEditor.TextArea.GetService(typeof(ITextEditor)); Debug.Assert(primaryTextEditorAdapter != null); this.ColumnDefinitions.Add(new ColumnDefinition()); this.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); this.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star), MinHeight = minRowHeight }); SetRow(primaryTextEditor, 1); this.Children.Add(primaryTextEditor); }
public TrackBackground(EnhancedScrollBar enhanchedScrollBar) { this.editor = enhanchedScrollBar.editor; this.textMarkerService = enhanchedScrollBar.textMarkerService; this.changeWatcher = enhanchedScrollBar.changeWatcher; textMarkerService.RedrawRequested += textMarkerService_RedrawRequested; }
/* Function: AddChangeWatcher * Adds an object that wants to be notified whenever files change. */ public void AddChangeWatcher(IChangeWatcher watcher) { lock (accessLock) { changeWatchers.Add(watcher); } }