From a8603ccefd9edf1a50760a668e43b029c86d9ab7 Mon Sep 17 00:00:00 2001 From: HelioGuilherme66 Date: Mon, 20 Jul 2026 02:29:54 +0100 Subject: [PATCH 1/3] Fix nav from Tree in same test suite. Fix first start no language set --- src/robotide/editor/texteditor.py | 20 ++++++++++--------- .../lib/compat/pygments/robotframework.py | 5 +++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/robotide/editor/texteditor.py b/src/robotide/editor/texteditor.py index 0c3242feb..92eac60c2 100644 --- a/src/robotide/editor/texteditor.py +++ b/src/robotide/editor/texteditor.py @@ -557,15 +557,16 @@ def _should_process_data_changed_message(message): def on_tree_selection(self, message): if not self.is_focused(): return - # print(f"DEBUG: texteditor.py TextEditorPlugin on_tree_selection ENTER {message=} type={type(message.item)}") + print(f"DEBUG: texteditor.py TextEditorPlugin on_tree_selection ENTER {message=} type={type(message.item)}") self._editor.store_position() # self.jump = True if self.is_focused(): next_datafile_controller = message.item and message.item.datafile_controller if self._editor.datafile_controller == message.item.datafile_controller == next_datafile_controller: - # print(f"DEBUG: OnTreeSelection Same FILE item type={type(message.item)}\n" - # f"value of {self._save_flag=}") + print(f"DEBUG: OnTreeSelection Same FILE item type={type(message.item)}\n" + f"value of {self._save_flag=}") self._editor.locate_tree_item(message.item) + self._editor.store_position() self.jump = True return if self._editor.dirty and not self._apply_txt_changes_to_model(auto=False): @@ -576,13 +577,13 @@ def on_tree_selection(self, message): if next_datafile_controller: self.jump = True self._open_data_for_controller(next_datafile_controller) - # print(f"DEBUG: OnTreeSelection OTHER FILE item type={type(message.item)}\n" - # f"value of {self._save_flag=}") + print(f"DEBUG: OnTreeSelection OTHER FILE item type={type(message.item)}\n" + f"value of {self._save_flag=}") wx.CallAfter(self._editor.locate_tree_item, message.item) self._set_read_only(message) self._editor.set_editor_caret_position() - else: - self._editor.GetFocus(None) + # else: + # self._editor.GetFocus(None) def _set_read_only(self, message): if not isinstance(message, bool): @@ -1197,7 +1198,7 @@ def set_editor_caret_position(self): return position = self._position self.source_editor.SetFocus() - # print(f"DEBUG: texteditor.py SourceEditor set_editor_caret_position position={position}") + print(f"DEBUG: texteditor.py SourceEditor set_editor_caret_position position={position}") if position: self.source_editor.SetCurrentPos(position) self.source_editor.SetSelection(self.restore_start_pos, self.restore_end_pos) @@ -2923,7 +2924,8 @@ def on_update_ui(self, evt): self.BraceBadLight(brace_at_caret) else: self.BraceHighlight(brace_at_caret, brace_opposite) - self.stylizer.stylize() + if self.GetLength() > 1: # Was calling stylize before loading document + self.stylizer.stylize() def _show_keyword_details(self, value, coords=None): """ diff --git a/src/robotide/lib/compat/pygments/robotframework.py b/src/robotide/lib/compat/pygments/robotframework.py index 9eecaa579..8216e450f 100644 --- a/src/robotide/lib/compat/pygments/robotframework.py +++ b/src/robotide/lib/compat/pygments/robotframework.py @@ -315,9 +315,10 @@ def __init__(self, template_setter=None, new_lang=None): pass else: self.new_lang = new_lang - if self.new_lang is None: + if self.new_lang is None or isinstance(self.new_lang, list) : self.new_lang = Language.from_name('En') - # print(f"DEBUG: robotframework.py Setting self.new_lang={self.new_lang}\n") + # print(f"DEBUG: robotframework.py Setting self.new_lang={self.new_lang}\n" + # f"type of self.new_lang={type(self.new_lang)} ") self.normalized_settings = normalize_dict(self.new_lang.settings) self._keyword_settings = (get_key_by_value(self.normalized_settings,'suitesetup'), get_key_by_value(self.normalized_settings, 'suiteprecondition'), From a7b92f044d9c7606c159bf109b6bd2f3283e2e4e Mon Sep 17 00:00:00 2001 From: HelioGuilherme66 Date: Wed, 22 Jul 2026 22:54:04 +0100 Subject: [PATCH 2/3] Fix selection of items from Tree and highlight at Text Editor. --- src/robotide/editor/texteditor.py | 58 ++++++++++++++++--------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/src/robotide/editor/texteditor.py b/src/robotide/editor/texteditor.py index 92eac60c2..3e22d709b 100644 --- a/src/robotide/editor/texteditor.py +++ b/src/robotide/editor/texteditor.py @@ -557,33 +557,31 @@ def _should_process_data_changed_message(message): def on_tree_selection(self, message): if not self.is_focused(): return - print(f"DEBUG: texteditor.py TextEditorPlugin on_tree_selection ENTER {message=} type={type(message.item)}") + # print(f"DEBUG: texteditor.py TextEditorPlugin on_tree_selection ENTER {message=} type={type(message.item)}") self._editor.store_position() # self.jump = True - if self.is_focused(): - next_datafile_controller = message.item and message.item.datafile_controller - if self._editor.datafile_controller == message.item.datafile_controller == next_datafile_controller: - print(f"DEBUG: OnTreeSelection Same FILE item type={type(message.item)}\n" - f"value of {self._save_flag=}") - self._editor.locate_tree_item(message.item) - self._editor.store_position() - self.jump = True - return - if self._editor.dirty and not self._apply_txt_changes_to_model(auto=False): - if self._editor.datafile_controller != next_datafile_controller: - self.tree.select_controller_node(self._editor.datafile_controller) - self._editor.set_editor_caret_position() - return - if next_datafile_controller: - self.jump = True - self._open_data_for_controller(next_datafile_controller) - print(f"DEBUG: OnTreeSelection OTHER FILE item type={type(message.item)}\n" - f"value of {self._save_flag=}") - wx.CallAfter(self._editor.locate_tree_item, message.item) - self._set_read_only(message) + next_datafile_controller = message.item and message.item.datafile_controller + if self._editor.datafile_controller == message.item.datafile_controller == next_datafile_controller: + # print(f"DEBUG: OnTreeSelection Same FILE item type={type(message.item)}\n" + # f"value of {self._save_flag=}") + position = self._editor.locate_tree_item(message.item) + self._editor.store_position() + wx.CallAfter(self._editor.source_editor.SetSelection, position[0], position[1]) + self.jump = True + return + if self._editor.dirty and not self._apply_txt_changes_to_model(auto=False): + if self._editor.datafile_controller != next_datafile_controller: + self.tree.select_controller_node(self._editor.datafile_controller) self._editor.set_editor_caret_position() - # else: - # self._editor.GetFocus(None) + return + if next_datafile_controller: + self.jump = True + self._open_data_for_controller(next_datafile_controller) + # print(f"DEBUG: OnTreeSelection OTHER FILE item type={type(message.item)}\n" + # f"value of {self._save_flag=}") + wx.CallAfter(self._editor.locate_tree_item, message.item) + self._set_read_only(message) + self._editor.set_editor_caret_position() def _set_read_only(self, message): if not isinstance(message, bool): @@ -1198,7 +1196,7 @@ def set_editor_caret_position(self): return position = self._position self.source_editor.SetFocus() - print(f"DEBUG: texteditor.py SourceEditor set_editor_caret_position position={position}") + # print(f"DEBUG: texteditor.py SourceEditor set_editor_caret_position position={position}") if position: self.source_editor.SetCurrentPos(position) self.source_editor.SetSelection(self.restore_start_pos, self.restore_end_pos) @@ -1294,7 +1292,7 @@ def locate_tree_item(self, item): name_to_locate = r'^'+item.name+r'.*$' position = self.source_editor.FindText(section_start, search_end, name_to_locate, STC_FIND_REGEXP) # print(f"DEBUG: TextEditor locate_tree_item name_to_locate={name_to_locate} position={position}\n" - # f"curpos={self._position} {self.is_saving=}") + # f"curpos={self._position}") if position[0] != -1: # DEBUG: Make colours configurable? self.source_editor.SetSelBackground(True, Colour('orange')) @@ -1305,6 +1303,7 @@ def locate_tree_item(self, item): self.source_editor.SetCurrentPos(position[1]) self.source_editor.SetAnchor(position[0]) self.source_editor.SetSelection(position[0], position[1]) + self.source_editor.SetCurrentPos(position[1]) self.source_editor.SetFocusFromKbd() self.source_editor_parent.SetFocus() self.source_editor.Update() @@ -1314,10 +1313,13 @@ def locate_tree_item(self, item): self.source_editor.LineScrollUp() self.source_editor.SetCurrentPos(1) self.source_editor.SetAnchor(0) - self.source_editor.SetSelection(0, self.source_editor.GetLineEndPosition(0)) + position = (0, self.source_editor.GetLineEndPosition(0)) + self.source_editor.SetSelection(position[0], position[1]) + self.source_editor.SetCurrentPos(position[1]) self.source_editor.SetFocusFromKbd() self.source_editor_parent.SetFocus() self.source_editor.Update() + return position[0], position[1] def words_cache(self, doc_size: int): if doc_size != self.doc_size: # DEBUG The initial idea was to not update words list if no changes in doc @@ -2986,7 +2988,7 @@ def SetUpEditor(self, tab_size=4, tab_markers=True, m_bg='', m_fg='', caret_fg: self.SetIndentationGuides(tab_markers) # Show indent guides self.SetBackSpaceUnIndents(True) # Backspace unindents rather than delete 1 space # self.SetTabIndents(True) # Tab key indents - # self.SetTabWidth(tab_size) # Proscribed tab size for wx + self.SetTabWidth(tab_size) # Proscribed tab size for wx self.SetUseTabs(False) # Use spaces rather than tabs, or TabTimmy will complain! # White space self.SetViewWhiteSpace(self.visible_spaces) # View white space From 2e48c03d70568bb24aba9bed6fb60e5e6a28197e Mon Sep 17 00:00:00 2001 From: HelioGuilherme66 Date: Wed, 22 Jul 2026 23:05:11 +0100 Subject: [PATCH 3/3] Improve Text Editor selection of items --- CHANGELOG.adoc | 1 + README.adoc | 2 +- src/robotide/application/CHANGELOG.html | 2 ++ src/robotide/application/releasenotes.py | 3 ++- src/robotide/version.py | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 66c05741d..24e0fac47 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -9,6 +9,7 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni == https://github.com/robotframework/RIDE[Unreleased] === Fixed +- Fix selection of items (variables, test names, keywords) from Project Explorer and highlight at Text Editor. - Fixed Tab spacing in Text Editor. When pressing tab the expected spaces were not written, causing failing steps. == https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride-2.2.4.rst[2.2.4] - 2026-07-09 diff --git a/README.adoc b/README.adoc index 130c48946..7b05c8336 100644 --- a/README.adoc +++ b/README.adoc @@ -46,7 +46,7 @@ Likewise, the current version of wxPython, is 4.2.5, but RIDE is known to work w `pip install -U robotframework-ride` -(3.9 <= python <= 3.14) Install current development version (**2.2.5dev2**) with: +(3.9 <= python <= 3.14) Install current development version (**2.2.5dev3**) with: `pip install -U https://github.com/robotframework/RIDE/archive/develop.zip` diff --git a/src/robotide/application/CHANGELOG.html b/src/robotide/application/CHANGELOG.html index b83ebc4e3..6c74c5cc1 100644 --- a/src/robotide/application/CHANGELOG.html +++ b/src/robotide/application/CHANGELOG.html @@ -1,6 +1,8 @@ Changelog

_Changelog


All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

_1.1. Fixed

  • +Fix selection of items (variables, test names, keywords) from Project Explorer and highlight at Text Editor. +
  • Fixed Tab spacing in Text Editor. When pressing tab the expected spaces were not written, causing failing steps.

_2. 2.2.4 - 2026-07-09

_2.1. Fixed

  • Fixed background assign setting in Grid Editor preferences. diff --git a/src/robotide/application/releasenotes.py b/src/robotide/application/releasenotes.py index df8f9d98a..83429b10d 100644 --- a/src/robotide/application/releasenotes.py +++ b/src/robotide/application/releasenotes.py @@ -179,6 +179,7 @@ def set_content(self, html_win, content):

New Features and Fixes Highlights

    +
  • Fix selection of items (variables, test names, keywords) from Project Explorer and highlight at Text Editor.
  • Fixed Tab spacing in Text Editor. When pressing tab the expected spaces were not written, causing failing steps.
  • Changed Auto-Save to only save when user is not typing, and if code is in error show message in status bar.
  • Applied STC_LEX colorization on Code Editor (external files editor).
  • @@ -236,7 +237,7 @@ def set_content(self, html_win, content):
    python -m robotide.postinstall -install

    or

    ride_postinstall.py -install
    -

    RIDE {VERSION} was released on 16/July/2026.

    +

    RIDE {VERSION} was released on 22/July/2026.