private void ErrorList_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { ListViewItem item = sender as ListViewItem; CompileError error = item.Content as CompileError; if (error.IsActive) { // Позиционируем на позицию курсор CodeEditorView.SetCaretTo(error.File, error.BeginOffset); } e.Handled = true; } else if (e.Key == Key.Space) { ListViewItem item = sender as ListViewItem; CompileError obj = item.Content as CompileError; if (CodeEditorView.GetIfAnotherErrorColor(obj.ErrorType)) { CodeEditorView.UnSetAnotherErrorColor(obj.ErrorType); } else { CodeEditorView.SetAnotherErrorColor(obj.ErrorType); } Dict.DoPulse(); } }
private void ErrorItem_Selected(object sender, RoutedEventArgs e) { ListViewItem item = sender as ListViewItem; if (_needSetFocus) { Dispatcher.BeginInvoke(new Action(() => item.Focus())); // official hack! BAD! _needSetFocus = false; } var error = item.Content as CompileError; // Обязательно надо как минимум открыть вкладку // Позиционироваться ли там куда-то, это уже другой вопрос //CodeEditorView.OpenTab(error.File, false); if (error != null && error.IsActive && _needSetEditorFocus) { // Позиционируем на позицию курсор CodeEditorView.ScrollTo(error.File, error.BeginOffset); CodeEditorView.HighlightError(error.File, error); } _needSetEditorFocus = true; MainObject = item; //e.Handled = true; }
private void UserControl_LostFocus(object sender, RoutedEventArgs e) { //(listView1.Background as SolidColorBrush).Color = _IDEState.NotFocusedElementColor; CodeEditorView.UnHighlightError(); //e.Handled = false; }
public WindowsWindow(IEnumerable <CodeFile> files, CodeEditorView codeEditor) { _codeEditor = codeEditor; Files = files; InitializeComponent(); }
public void Init(CodeEditorView codeEditor) { Selected = _transparentBrush; _codeEditor = codeEditor; BookmarksConverter._codeEditor = codeEditor; }
public TextMarkerService(CodeEditorView editor) { if (editor == null) { throw new ArgumentNullException(nameof(editor)); } _document = editor.Document; _markers = new TextSegmentCollection <TextMarker>(_document); _textViews = new List <TextView>(); editor.ToolTipRequest += EditorOnToolTipRequest; }
private void CheckBox_Checked(object sender, RoutedEventArgs e) { e.Handled = true; var checkbox = sender as CheckBox; var err = checkbox.DataContext as CompileError; CodeEditorView.SetAnotherErrorColor(err.ErrorType); //UpdateCheckboxes(); Dict.DoPulse(); }
private void ErrorItem_UnSelected(object sender, RoutedEventArgs e) { ListViewItem item = sender as ListViewItem; CompileError error = item.Content as CompileError; if (error != null && error.IsActive && IsFocused) { CodeEditorView.UnHighlightError(); } //e.Handled = true; }
private void ErrorItem_DoubleClick(object sender, MouseButtonEventArgs e) { ListViewItem item = sender as ListViewItem; CompileError error = item.Content as CompileError; if (error.IsActive) { // Позиционируем на позицию курсор CodeEditorView.SetCaretTo(error.File, error.BeginOffset); } e.Handled = true; }
public void Init(CodeEditorView codeEditorView) { CodeEditorView = codeEditorView; _IDEState = Application.Current.Resources["IDEState"] as IDEState; listView1.DataContext = ErrorsListContainter; // Все манипуляции - через данные CheckboxConverter.CodeEditor = codeEditorView; // Если проект меняется, то все ошибки надо удалить // Иначе можно будет тыкать на ошибку, и переходитьвв неизвестно какой файл CodeProjectManager.Instance.CurrentProjectChanged += (sender, args) => ClearAllErrors(); MainObject = listView1; }
public void Init(CodeEditorView codeEditor) { _codeEditor = codeEditor; // Only 1 colum //ElementsGrid.ColumnDefinitions.Add(new ColumnDefinition(){Width = new GridLength(1, GridUnitType.Star)}); Background = new SolidColorBrush(Colors.Transparent); // Set base scroll viewer content Content = ElementsGrid; //stackPanel.Content = ElementsGrid; //stackPanel.Children.Add(ElementsGrid); UpdateGrid(); UpdateView(); }
public ContextActionsRenderer(CodeEditorView editor) { if (editor == null) throw new ArgumentNullException("editor"); this.editorView = editor; this.editorView.TextArea.Caret.PositionChanged += CaretPositionChanged; this.editorView.KeyDown += new KeyEventHandler(ContextActionsRenderer_KeyDown); providers.CollectionChanged += providers_CollectionChanged; editor.TextArea.TextView.ScrollOffsetChanged += ScrollChanged; this.delayMoveTimer = new DispatcherTimer() { Interval = TimeSpan.FromMilliseconds(delayMoveMilliseconds) }; this.delayMoveTimer.Stop(); this.delayMoveTimer.Tick += TimerMoveTick; SD.Workbench.ActiveViewContentChanged += WorkbenchSingleton_Workbench_ActiveViewContentChanged; }
public void Init(CodeEditorView codeEditorView) { Background = new SolidColorBrush(); _codeEditorView = codeEditorView; _codeEditorView.ActiveFileChanged += (sender, args) => UpdateSelections(); _codeEditorView.FileOpened += (sender, args) => UpdateSelections(); _codeEditorView.FileClosed += (sender, args) => UpdateSelections(); CodeProjectManager.Instance.CurrentProjectChanged += CurrentProjectChanged; UpdateTree(); // Для сортировки parent.Items.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending)); }
public ColorizeErrors(CodeEditorView codeEditorView) { _codeEditorView = codeEditorView; // Подписывамся на обновления цветов var state = Application.Current.Resources["IDEState"] as IDEState; UpdateColors(state); state.PropertyChanged += (sender, args) => { if (args.PropertyName == "EditorColor_ErrorB" || args.PropertyName == "EditorColor_ErrorF" || args.PropertyName == "EditorColor_SpecialErrorB" || args.PropertyName == "EditorColor_SpecialErrorF") { UpdateColors(state); } }; }
public ContextActionsRenderer(CodeEditorView editor) { if (editor == null) { throw new ArgumentNullException("editor"); } this.editorView = editor; this.editorView.TextArea.Caret.PositionChanged += CaretPositionChanged; this.editorView.KeyDown += new KeyEventHandler(ContextActionsRenderer_KeyDown); providers.CollectionChanged += providers_CollectionChanged; editor.TextArea.TextView.ScrollOffsetChanged += ScrollChanged; this.delayMoveTimer = new DispatcherTimer() { Interval = TimeSpan.FromMilliseconds(delayMoveMilliseconds) }; this.delayMoveTimer.Stop(); this.delayMoveTimer.Tick += TimerMoveTick; SD.Workbench.ActiveViewContentChanged += WorkbenchSingleton_Workbench_ActiveViewContentChanged; }
public void Init(CodeEditorView codeEditorView) { _CodeEditorView = codeEditorView; }
public HiddenDefinitionRenderer(CodeEditorView editorView) { this.editor = editorView; control = new HiddenDefinitionControl(); WorkbenchSingleton.Workbench.ActiveContentChanged += WorkbenchSingleton_Workbench_ActiveContentChanged; }
public void Init(CodeEditorView codeEditor) { _codeEditor = codeEditor; BookmarksConverter._codeEditor = codeEditor; }
public HiddenDefinitionRenderer(CodeEditorView editorView) { this.editor = editorView; }
public HiddenDefinitionRenderer(CodeEditorView editorView) { this.editor = editorView; control = new HiddenDefinitionControl(); WorkbenchSingleton.Workbench.ActiveContentChanged += WorkbenchSingleton_Workbench_ActiveContentChanged; }
public void Init(CodeEditorView codeEditorView, ErrorsListView errorsListView, MainWindowView mainWindowView) { _codeEditorView = codeEditorView; _errorsListView = errorsListView; _mainWindowView = mainWindowView; }
public ColorizeColorSegments(CodeEditorView codeEditorView) { _codeEditorView = codeEditorView; }
public void Init(CodeEditorView codeEditor) { _codeEditor = codeEditor; MainObject = treeView; }
public static AltaxoCompilationResultWithAssembly GetCompilation(CodeEditorView editControl, string scriptClassName) { var factory = new CompilationFactorySimple(editControl.Adapter.Workspace, null, null, new System.Reflection.Assembly[] { typeof(object).Assembly }); return(factory.GetCompilation(editControl.Document.Text, scriptClassName)); }
private void CBCodeEditorItem_Selected(object sender, RoutedEventArgs e) { CodeEditorView codeeditor = new CodeEditorView(); codeeditor.Show(); }
public HiddenDefinitionRenderer(CodeEditorView editorView) { this.editor = editorView; }