public IconBarMargin(ITextEditorUIContext uiContext, ITextLineObjectManager textLineObjectManager, IImageManager imageManager, IThemeManager themeManager) { this.uiContext = uiContext; this.textLineObjectManager = textLineObjectManager; this.imageManager = imageManager; this.themeManager = themeManager; }
StackFrameManager(ITheDebugger theDebugger, IFileTabManager fileTabManager, ITextLineObjectManager textLineObjectManager, Lazy<IModuleLoader> moduleLoader, ITextEditorUIContextManager textEditorUIContextManager) { this.theDebugger = theDebugger; this.fileTabManager = fileTabManager; this.textLineObjectManager = textLineObjectManager; this.moduleLoader = moduleLoader; textEditorUIContextManager.Add(OnTextEditorUIContextEvent, TextEditorUIContextManagerConstants.ORDER_DEBUGGER_CALLSTACK); theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; theDebugger.ProcessRunning += TheDebugger_ProcessRunning; }
StackFrameManager(ITheDebugger theDebugger, IFileTabManager fileTabManager, ITextLineObjectManager textLineObjectManager, Lazy <IModuleLoader> moduleLoader, ITextEditorUIContextManager textEditorUIContextManager) { this.theDebugger = theDebugger; this.fileTabManager = fileTabManager; this.textLineObjectManager = textLineObjectManager; this.moduleLoader = moduleLoader; textEditorUIContextManager.Add(OnTextEditorUIContextEvent, TextEditorUIContextManagerConstants.ORDER_DEBUGGER_CALLSTACK); theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; theDebugger.ProcessRunning += TheDebugger_ProcessRunning; }
public TextMarkerService(TextEditorControl textView, ITextEditorUIContextImpl uiContext, ITextLineObjectManager textLineObjectManager) { this.textEditorControl = textView; this.uiContext = uiContext; this.textLineObjectManager = textLineObjectManager; uiContext.NewTextContent += TextEditorUIContext_NewTextContent; TextView.DocumentChanged += TextView_DocumentChanged; textLineObjectManager.OnListModified += TextLineObjectManager_OnListModified; OnDocumentChanged(); }
TextEditorUIContextCreator(IThemeManager themeManager, IImageManager imageManager, IWpfCommandManager wpfCommandManager, IMenuManager menuManager, ICodeToolTipManager codeToolTipManager, ITextEditorSettings textEditorSettings, ITextLineObjectManager textLineObjectManager, ITextEditorUIContextManagerImpl textEditorUIContextManagerImpl, IIconBarCommandManager iconBarCommandManager) { this.themeManager = themeManager; this.imageManager = imageManager; this.wpfCommandManager = wpfCommandManager; this.menuManager = menuManager; this.codeToolTipManager = codeToolTipManager; this.textEditorSettings = textEditorSettings; this.textLineObjectManager = textLineObjectManager; this.textEditorUIContextManagerImpl = textEditorUIContextManagerImpl; this.iconBarCommandManager = iconBarCommandManager; }
BreakpointManager(ITextLineObjectManager textLineObjectManager, IFileTabManager fileTabManager, ITheDebugger theDebugger, IMessageBoxManager messageBoxManager, ISerializedDnModuleCreator serializedDnModuleCreator) { this.textLineObjectManager = textLineObjectManager; this.fileTabManager = fileTabManager; this.theDebugger = theDebugger; this.messageBoxManager = messageBoxManager; this.serializedDnModuleCreator = serializedDnModuleCreator; textLineObjectManager.OnListModified += MarkedTextLinesManager_OnListModified; foreach (var bp in Breakpoints) { InitializeDebuggerBreakpoint(bp); } fileTabManager.FileCollectionChanged += FileTabManager_FileCollectionChanged; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; if (theDebugger.IsDebugging) { AddDebuggerBreakpoints(); } }
public TextEditorControl(IThemeManager themeManager, ToolTipHelper toolTipHelper, ITextEditorSettings textEditorSettings, ITextEditorUIContextImpl uiContext, ITextEditorHelper textEditorHelper, ITextLineObjectManager textLineObjectManager, IImageManager imageManager, IIconBarCommandManager iconBarCommandManager) { this.references = new TextSegmentCollection <ReferenceSegment>(); this.themeManager = themeManager; this.toolTipHelper = toolTipHelper; this.textEditorSettings = textEditorSettings; this.textEditorHelper = textEditorHelper; InitializeComponent(); this.textEditorSettings.PropertyChanged += TextEditorSettings_PropertyChanged; themeManager.ThemeChanged += ThemeManager_ThemeChanged; textEditor = new NewTextEditor(themeManager); this.toolTipHelper.Initialize(TextEditor); RemoveCommands(TextEditor); newTextEditor.Content = TextEditor; TextEditor.IsReadOnly = true; TextEditor.ShowLineNumbers = true; TextEditor.Options.RequireControlModifierForHyperlinkClick = false; referenceElementGenerator = new ReferenceElementGenerator(JumpToReference, a => true); // Add the ref elem generator first in case one of the refs looks like a http link etc TextEditor.TextArea.TextView.ElementGenerators.Insert(0, referenceElementGenerator); this.uiElementGenerator = new UIElementGenerator(); textEditor.TextArea.TextView.ElementGenerators.Add(uiElementGenerator); TextEditor.SetBinding(FontFamilyProperty, new Binding { Source = textEditorSettings, Path = new PropertyPath("FontFamily"), Mode = BindingMode.OneWay, }); TextEditor.SetBinding(FontSizeProperty, new Binding { Source = textEditorSettings, Path = new PropertyPath("FontSize"), Mode = BindingMode.OneWay, }); TextEditor.SetBinding(ICSharpCode.AvalonEdit.TextEditor.WordWrapProperty, new Binding { Source = textEditorSettings, Path = new PropertyPath("WordWrap"), Mode = BindingMode.OneWay, }); iconBarMargin = new IconBarMargin(uiContext, textLineObjectManager, imageManager, themeManager); iconBarCommandManager.Initialize(iconBarMargin); TextEditor.TextArea.LeftMargins.Insert(0, iconBarMargin); TextEditor.TextArea.TextView.VisualLinesChanged += (s, e) => iconBarMargin.InvalidateVisual(); textMarkerService = new TextMarkerService(this, uiContext, textLineObjectManager); TextEditor.TextArea.TextView.BackgroundRenderers.Add(textMarkerService); TextEditor.TextArea.TextView.LineTransformers.Add(textMarkerService); searchPanel = SearchPanel.Install(TextEditor.TextArea); searchPanel.RegisterCommands(this.CommandBindings); searchPanel.Localization = new AvalonEditSearchPanelLocalization(); TextEditor.TextArea.Caret.PositionChanged += Caret_PositionChanged; TextEditor.TextArea.MouseRightButtonDown += (s, e) => TextEditor.GoToMousePosition(); InputBindings.Add(new KeyBinding(new RelayCommand(a => MoveReference(true)), Key.Tab, ModifierKeys.None)); InputBindings.Add(new KeyBinding(new RelayCommand(a => MoveReference(false)), Key.Tab, ModifierKeys.Shift)); InputBindings.Add(new KeyBinding(new RelayCommand(a => MoveToNextDefinition(true)), Key.Down, ModifierKeys.Alt)); InputBindings.Add(new KeyBinding(new RelayCommand(a => MoveToNextDefinition(false)), Key.Up, ModifierKeys.Alt)); InputBindings.Add(new KeyBinding(new RelayCommand(a => FollowReference()), Key.F12, ModifierKeys.None)); InputBindings.Add(new KeyBinding(new RelayCommand(a => FollowReference()), Key.Enter, ModifierKeys.None)); InputBindings.Add(new KeyBinding(new RelayCommand(a => FollowReferenceNewTab()), Key.F12, ModifierKeys.Control)); InputBindings.Add(new KeyBinding(new RelayCommand(a => FollowReferenceNewTab()), Key.Enter, ModifierKeys.Control)); InputBindings.Add(new KeyBinding(new RelayCommand(a => ClearMarkedReferencesAndToolTip()), Key.Escape, ModifierKeys.None)); this.AddHandler(GotKeyboardFocusEvent, new KeyboardFocusChangedEventHandler(OnGotKeyboardFocus), true); this.AddHandler(LostKeyboardFocusEvent, new KeyboardFocusChangedEventHandler(OnLostKeyboardFocus), true); OnHighlightCurrentLineChanged(); OnShowLineNumbersChanged(); OnAutoHighlightRefsChanged(); }
IconBarCommandManager(IMenuManager menuManager, ITextLineObjectManager textLineObjectManager, [ImportMany] IEnumerable<Lazy<IIconBarCommand>> iconBarCommands) { this.menuManager = menuManager; this.textLineObjectManager = textLineObjectManager; this.iconBarCommands = iconBarCommands.ToArray(); }
public GuidObjectsCreator(ITextLineObjectManager textLineObjectManager) { this.textLineObjectManager = textLineObjectManager; }
BreakpointManager(ITextLineObjectManager textLineObjectManager, IFileTabManager fileTabManager, ITheDebugger theDebugger, IMessageBoxManager messageBoxManager, ISerializedDnModuleCreator serializedDnModuleCreator) { this.textLineObjectManager = textLineObjectManager; this.fileTabManager = fileTabManager; this.theDebugger = theDebugger; this.messageBoxManager = messageBoxManager; this.serializedDnModuleCreator = serializedDnModuleCreator; textLineObjectManager.OnListModified += MarkedTextLinesManager_OnListModified; foreach (var bp in Breakpoints) InitializeDebuggerBreakpoint(bp); fileTabManager.FileCollectionChanged += FileTabManager_FileCollectionChanged; theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged; if (theDebugger.IsDebugging) AddDebuggerBreakpoints(); }
public TextEditorControl(IThemeManager themeManager, ToolTipHelper toolTipHelper, ITextEditorSettings textEditorSettings, ITextEditorUIContextImpl uiContext, ITextEditorHelper textEditorHelper, ITextLineObjectManager textLineObjectManager, IImageManager imageManager, IIconBarCommandManager iconBarCommandManager) { this.references = new TextSegmentCollection <ReferenceSegment>(); this.themeManager = themeManager; this.toolTipHelper = toolTipHelper; this.textEditorSettings = textEditorSettings; this.textEditorHelper = textEditorHelper; InitializeComponent(); this.textEditorSettings.PropertyChanged += TextEditorSettings_PropertyChanged; themeManager.ThemeChanged += ThemeManager_ThemeChanged; textEditor = new NewTextEditor(themeManager, textEditorSettings); this.toolTipHelper.Initialize(TextEditor); RemoveCommands(TextEditor); newTextEditor.Content = TextEditor; TextEditor.IsReadOnly = true; TextEditor.ShowLineNumbers = true; referenceElementGenerator = new ReferenceElementGenerator(JumpToReference, a => true); // Add the ref elem generator first in case one of the refs looks like a http link etc TextEditor.TextArea.TextView.ElementGenerators.Insert(0, referenceElementGenerator); this.uiElementGenerator = new UIElementGenerator(); textEditor.TextArea.TextView.ElementGenerators.Add(uiElementGenerator); iconBarMargin = new IconBarMargin(uiContext, textLineObjectManager, imageManager, themeManager); iconBarCommandManager.Initialize(iconBarMargin); TextEditor.TextArea.LeftMargins.Insert(0, iconBarMargin); TextEditor.TextArea.TextView.VisualLinesChanged += (s, e) => iconBarMargin.InvalidateVisual(); textMarkerService = new TextMarkerService(this, uiContext, textLineObjectManager); TextEditor.TextArea.TextView.BackgroundRenderers.Add(textMarkerService); TextEditor.TextArea.TextView.LineTransformers.Add(textMarkerService); TextEditor.TextArea.Caret.PositionChanged += Caret_PositionChanged; InputBindings.Add(new KeyBinding(new RelayCommand(a => MoveReference(true)), Key.Tab, ModifierKeys.None)); InputBindings.Add(new KeyBinding(new RelayCommand(a => MoveReference(false)), Key.Tab, ModifierKeys.Shift)); InputBindings.Add(new KeyBinding(new RelayCommand(a => MoveReference(true)), Key.Down, ModifierKeys.Control | ModifierKeys.Shift)); InputBindings.Add(new KeyBinding(new RelayCommand(a => MoveReference(false)), Key.Up, ModifierKeys.Control | ModifierKeys.Shift)); InputBindings.Add(new KeyBinding(new RelayCommand(a => MoveToNextDefinition(true)), Key.Down, ModifierKeys.Alt)); InputBindings.Add(new KeyBinding(new RelayCommand(a => MoveToNextDefinition(false)), Key.Up, ModifierKeys.Alt)); InputBindings.Add(new KeyBinding(new RelayCommand(a => FollowReference()), Key.F12, ModifierKeys.None)); InputBindings.Add(new KeyBinding(new RelayCommand(a => FollowReference()), Key.Enter, ModifierKeys.None)); InputBindings.Add(new KeyBinding(new RelayCommand(a => FollowReferenceNewTab()), Key.F12, ModifierKeys.Control)); InputBindings.Add(new KeyBinding(new RelayCommand(a => FollowReferenceNewTab()), Key.Enter, ModifierKeys.Control)); InputBindings.Add(new KeyBinding(new RelayCommand(a => ClearMarkedReferencesAndToolTip()), Key.Escape, ModifierKeys.None)); TextEditor.OnShowLineNumbersChanged(); OnAutoHighlightRefsChanged(); }
IconBarCommandManager(IMenuManager menuManager, ITextLineObjectManager textLineObjectManager, [ImportMany] IEnumerable <Lazy <IIconBarCommand> > iconBarCommands) { this.menuManager = menuManager; this.textLineObjectManager = textLineObjectManager; this.iconBarCommands = iconBarCommands.ToArray(); }