Skip to content

Commit 7e5a888

Browse files
Fix broken go to definition after editing resource file. Closes #2291
1 parent 14b327d commit 7e5a888

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

CHANGELOG.adoc

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni
1616

1717
=== Fixed
1818

19+
- Fixed broken go to definition after editing content in resource files.
20+
1921
- Fixed long arguments in fixtures appearing splitted in Grid Editor. Still, arguments info will not be correct at calling step.
2022

2123
== https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride-2.1.rst[2.1] - 2024-10-13

src/robotide/application/CHANGELOG.html

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
</li><li class="listitem">
66
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>.
77
</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">
8+
Fixed broken go to definition after editing content in resource files.
9+
</li><li class="listitem">
810
Fixed long arguments in fixtures appearing splitted in Grid Editor. Still, arguments info will not be correct at calling step.
911
</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)
1012
- Added a setting for a specific Browser by editing the settings.cfg file. Add the string parameter

src/robotide/application/releasenotes.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,16 @@ def set_content(self, html_win, content):
163163
version 4.2.1 and 4.2.2, which we now <em>recommend</em>.</li>
164164
<li>🐞 - Some argument types detection (and colorization) is not correct in Grid Editor.</li>
165165
<li>🐞 - RIDE <strong>DOES NOT KEEP</strong> Test Suites formatting or structure, causing differences in files when used
166-
on other IDE or Editors.</li>
166+
on other IDE or Editors. The option to not reformat the file is not working.</li>
167167
</ul>
168168
</li>
169169
</ul>
170170
<p><strong>New Features and Fixes Highlights</strong></p>
171171
<ul class="simple">
172+
<li>Fixed broken go to definition after editing content in resource files.</li>
172173
<li>Fixed long arguments in fixtures appearing splitted in Grid Editor. Still, arguments info will not be correct at
173-
calling step.Fixed long arguments in fixtures appearing splitted in Grid Editor.
174-
Still, arguments info will not be correct at calling step./li>
174+
calling step. Fixed long arguments in fixtures appearing splitted in Grid Editor.
175+
Still, arguments info will not be correct at calling step.</li>
175176
<li>Fixed double action on Linux when pressing the DEL key</li>
176177
</ul>
177178
<!-- <p>We hope to implement or complete features and make fixes on next major version 2.1 (in mid Autumm of 2024).</p>
@@ -227,7 +228,7 @@ def set_content(self, html_win, content):
227228
<pre class="literal-block">python -m robotide.postinstall -install</pre>
228229
<p>or</p>
229230
<pre class="literal-block">ride_postinstall.py -install</pre>
230-
<p>RIDE {VERSION} was released on 5/November/2024.</p>
231+
<p>RIDE {VERSION} was released on 14/November/2024.</p>
231232
<!-- <br/>
232233
<h3>May The Fourth Be With You!</h3>
233234
<h3>Celebrate the bank holiday, 10th June, Day of Portugal, Portuguese Communities and Camões!!</h3>

src/robotide/ui/treeplugin.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,10 @@ def select_user_keyword_node(self, uk):
741741

742742
def _get_datafile_node(self, datafile):
743743
for node in self.datafile_nodes:
744-
if self.controller.get_handler(node).item == datafile:
744+
item = self.controller.get_handler(node).item
745+
if item == datafile: # This only works before editing a resource item because the obj id changes
746+
return node
747+
if type(item) == type(datafile) and hasattr(item, 'name') and item.name == datafile.name:
745748
return node
746749
return None
747750

0 commit comments

Comments
 (0)