Skip to content

Commit

Permalink
Fix broken go to definition after editing resource file. Closes #2291
Browse files Browse the repository at this point in the history
  • Loading branch information
HelioGuilherme66 committed Nov 14, 2024
1 parent 14b327d commit 7e5a888
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni

=== Fixed

- Fixed broken go to definition after editing content in resource files.

- Fixed long arguments in fixtures appearing splitted in Grid Editor. Still, arguments info will not be correct at calling step.

== https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride-2.1.rst[2.1] - 2024-10-13
Expand Down
2 changes: 2 additions & 0 deletions src/robotide/application/CHANGELOG.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
</li><li class="listitem">
Changed the way ``configobj`` code is imported. Now is a submodule obtained from <a class="ulink" href="https://github.com/DiffSK/configobj" target="_top">https://github.com/DiffSK/configobj</a>.
</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_fixed"></a>1.2. Fixed</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
Fixed broken go to definition after editing content in resource files.
</li><li class="listitem">
Fixed long arguments in fixtures appearing splitted in Grid Editor. Still, arguments info will not be correct at calling step.
</li></ul></div></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_ulink_url_https_github_com_robotframework_ride_blob_master_doc_releasenotes_ride_2_1_rst_2_1_ulink_2024_10_13"></a>2. <a class="ulink" href="https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride-2.1.rst" target="_top">2.1</a> - 2024-10-13</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_added"></a>2.1. Added</h3></div></div></div><pre class="literallayout"> (2.1 - 2024-10-13)
- Added a setting for a specific Browser by editing the settings.cfg file. Add the string parameter
Expand Down
9 changes: 5 additions & 4 deletions src/robotide/application/releasenotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,16 @@ def set_content(self, html_win, content):
version 4.2.1 and 4.2.2, which we now <em>recommend</em>.</li>
<li>🐞 - Some argument types detection (and colorization) is not correct in Grid Editor.</li>
<li>🐞 - RIDE <strong>DOES NOT KEEP</strong> Test Suites formatting or structure, causing differences in files when used
on other IDE or Editors.</li>
on other IDE or Editors. The option to not reformat the file is not working.</li>
</ul>
</li>
</ul>
<p><strong>New Features and Fixes Highlights</strong></p>
<ul class="simple">
<li>Fixed broken go to definition after editing content in resource files.</li>
<li>Fixed long arguments in fixtures appearing splitted in Grid Editor. Still, arguments info will not be correct at
calling step.Fixed long arguments in fixtures appearing splitted in Grid Editor.
Still, arguments info will not be correct at calling step./li>
calling step. Fixed long arguments in fixtures appearing splitted in Grid Editor.
Still, arguments info will not be correct at calling step.</li>
<li>Fixed double action on Linux when pressing the DEL key</li>
</ul>
<!-- <p>We hope to implement or complete features and make fixes on next major version 2.1 (in mid Autumm of 2024).</p>
Expand Down Expand Up @@ -227,7 +228,7 @@ def set_content(self, html_win, content):
<pre class="literal-block">python -m robotide.postinstall -install</pre>
<p>or</p>
<pre class="literal-block">ride_postinstall.py -install</pre>
<p>RIDE {VERSION} was released on 5/November/2024.</p>
<p>RIDE {VERSION} was released on 14/November/2024.</p>
<!-- <br/>
<h3>May The Fourth Be With You!</h3>
<h3>Celebrate the bank holiday, 10th June, Day of Portugal, Portuguese Communities and Camões!!</h3>
Expand Down
5 changes: 4 additions & 1 deletion src/robotide/ui/treeplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,10 @@ def select_user_keyword_node(self, uk):

def _get_datafile_node(self, datafile):
for node in self.datafile_nodes:
if self.controller.get_handler(node).item == datafile:
item = self.controller.get_handler(node).item
if item == datafile: # This only works before editing a resource item because the obj id changes
return node
if type(item) == type(datafile) and hasattr(item, 'name') and item.name == datafile.name:
return node
return None

Expand Down

0 comments on commit 7e5a888

Please sign in to comment.