Skip to content

Commit

Permalink
Hide continuation markers in Tree
Browse files Browse the repository at this point in the history
  • Loading branch information
HelioGuilherme66 committed Oct 6, 2023
1 parent 448e049 commit 06e7556
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 57 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni

=== Changed

- Hide continuation markers in Project Tree
- Improved content assistance in Text Editor by allowing to filter list as we type
- Improved file changes detection to only consider valid formats
- Improved keyword ``Find Usages`` to return more matches. Fails to find mixed spaces and ``_``
Expand Down
3 changes: 2 additions & 1 deletion src/robotide/application/CHANGELOG.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
</li><li class="listitem">
Added support for JSON variables, by using the installed Robot Framework import method
</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">Improved content assistance in Text Editor by allowing to filter list as we type
<li class="listitem">Hide continuation markers in Project Tree
</li><li class="listitem">Improved content assistance in Text Editor by allowing to filter list as we type
</li><li class="listitem">Fixed resource files dissapearing from Project tree on Windows
</li><li class="listitem">
Fixed missing indication of link for User Keyword, when pressing ``Ctrl`` in Grid Editor
Expand Down
3 changes: 2 additions & 1 deletion src/robotide/application/releasenotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def set_content(self, html_win, content):
</ul>
<p><strong>New Features and Fixes Highlights</strong></p>
<ul class="simple">
<li>Hide continuation markers in Project Tree</li>
<li>Improved content assistance in Text Editor by allowing to filter list as we type</li>
<li>Fixed resource files dissapearing from Project tree on Windows</li>
<li>Fixed missing indication of link for User Keyword, when pressing <b>Ctrl</b> in Grid Editor</li>
Expand Down Expand Up @@ -240,6 +241,6 @@ def set_content(self, html_win, content):
<pre class="literal-block">
python -m robotide.postinstall -install
</pre>
<p>RIDE {VERSION} was released on 5/Oct/2023.</p>
<p>RIDE {VERSION} was released on 6/Oct/2023.</p>
</div>
"""
29 changes: 0 additions & 29 deletions src/robotide/editor/texteditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,27 +87,11 @@ def f(event):

return f

# self.register_shortcut('CtrlCmd-X', focused(lambda e: self._editor.cut()))
# self.register_shortcut('CtrlCmd-C', focused(lambda e: self._editor.copy()))
if IS_MAC: # Mac needs this key binding
self.register_shortcut('CtrlCmd-A', focused(lambda e: self._editor.select_all()))
if IS_WINDOWS or IS_MAC: # Linux does not need this key binding
self.register_shortcut('CtrlCmd-V', focused(lambda e: self._editor.paste()))
# self.register_shortcut('CtrlCmd-Z', focused(lambda e: self._editor.undo()))
# self.register_shortcut('CtrlCmd-Y', focused(lambda e: self._editor.redo()))
# self.register_shortcut('Del', focused(lambda e: self.source_editor.delete()))
# DEBUG Disable own saving
self.register_shortcut('CtrlCmd-S', focused(lambda e: self.on_saving(e)))
# self.register_shortcut('CtrlCmd-Shift-I', focused(lambda e: self._editor.insert_cell(e)))
# self.register_shortcut('CtrlCmd-Shift-D', focused(lambda e: self.source_editor.delete_cell(e)))
# self.register_shortcut('Alt-Up', focused(lambda e: self._editor.move_row_up(e)))
# self.register_shortcut('Alt-Down', focused(lambda e: self._editor.move_row_down(e)))
# self.register_shortcut('CtrlCmd-D', focused(lambda e: self.source_editor.delete_row(e)))
# self.register_shortcut('CtrlCmd-I', focused(lambda e: self._editor.insert_row(e)))
# self.register_shortcut('CtrlCmd-3', focused(lambda e: self._editor.execute_comment(e)))
# self.register_shortcut('CtrlCmd-Shift-3', focused(lambda e: self._editor.execute_sharp_comment(e)))
# self.register_shortcut('CtrlCmd-4', focused(lambda e: self._editor.execute_uncomment(e)))
# self.register_shortcut('CtrlCmd-Shift-4', focused(lambda e: self._editor.execute_sharp_uncomment(e)))
self.register_shortcut('CtrlCmd-F', lambda e: self._editor.search_field.SetFocus())
self.register_shortcut('CtrlCmd-G', lambda e: self._editor.on_find(e))
self.register_shortcut('CtrlCmd-Shift-G', lambda e: self._editor.on_find_backwards(e))
Expand Down Expand Up @@ -214,9 +198,6 @@ def _open_data_for_controller(self, datafile_controller):

def on_tab_change(self, message):
if message.newtab == self.title:
# print("DEBUG: texteditor on_tab_change calling register_actions ")
# self.register_actions(action_info_collection(_EDIT, self._editor, self._editor))
# self._register_shortcuts()
self._open()
self._editor.set_editor_caret_position()
try:
Expand Down Expand Up @@ -647,7 +628,6 @@ def on_content_assist(self, event):
selected = self.source_editor.get_selected_or_near_text()
self.set_editor_caret_position()
sugs = []
length_entered = 0
if selected:
for start in selected:
sugs.extend(s.name for s in self._suggestions.get_suggestions(start))
Expand Down Expand Up @@ -934,13 +914,6 @@ def on_move_rows_down(self, event):
def on_content_assistance(self, event):
self.on_content_assist(event)

"""
def save(self, message=None):
_ = message
if self.editor:
self.editor.save()
"""

def on_key(self, *args):
""" Intentional override """
pass
Expand Down Expand Up @@ -1710,8 +1683,6 @@ def on_key_pressed(self, event):
self.CallTipCancel()
key = event.GetKeyCode()
if key == 32 and event.ControlDown():
pos = self.GetCurrentPos()
# print(f"DEBUG: TextEditor RobotDataEditor on_key_pressed pos={pos}")
# Tips
if event.ShiftDown():
self.show_kw_doc()
Expand Down
26 changes: 3 additions & 23 deletions src/robotide/ui/treeplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
from wx.lib.agw.customtreectrl import GenericTreeItem
from wx.lib.mixins import treemixin

# DEBUG: from ..controller.macrocontrollers import TestCaseController
# DEBUG: from ..controller.ui.treecontroller import TreeController, TestSelectionController
# DEBUG: from ..controller.filecontrollers import ResourceFileController, TestDataDirectoryController,
# TestCaseFileController

from ..context import IS_WINDOWS
from ..publish.messages import (RideTestRunning, RideTestPaused, RideTestPassed, RideTestFailed, RideTestSkipped,
RideTestExecutionStarted, RideTestStopped, RideImportSetting, RideExcludesChanged,
Expand Down Expand Up @@ -531,25 +526,10 @@ def _normalize(path):

def _create_node_with_handler(self, parent_node, controller, index=None):
from ..controller.filecontrollers import ResourceFileController
if controller.display_name.startswith("#"): # If it is a comment don't create
if (controller.display_name.startswith("#") or
controller.display_name.startswith("...")): # If it is a comment or continuation marker don't create
return None

# DEBUG: Why do we need this? This block caused resources to disappear from tree
"""
if IS_WINDOWS and isinstance(controller, ResourceFileController):
resourcefile = self._normalize(controller.filename)
# print(f"DEBUG: Tree _create_node_with_handler removed condition on WINDOWS for Resources file={resourcefile}")
pname = parent_node.GetText()
self._resources.append((pname, resourcefile))
if IS_WINDOWS:
count = 0
for (p, r) in self._resources:
if (p, r) == (pname, resourcefile):
count += 1
if count > 3:
return None
"""
handler_class = action_handler_class(controller)
with_checkbox = (handler_class == TestCaseHandler and self._checkboxes_for_tests)
node = self._create_node(parent_node, controller.display_name, self._images[controller],
Expand Down Expand Up @@ -1172,7 +1152,7 @@ def on_label_edited(self, event):
# and the another CallAfter because of
# customtreectrl.TreeTextCtrl#OnChar will call CallAfter(self.Finish)
# when Enter is pressed --> Results in PyDeadObject if called after
# ResetEditControl..
# ResetEditControl
wx.CallAfter(wx.CallAfter, self._stop_editing)

def _stop_editing(self):
Expand Down
2 changes: 1 addition & 1 deletion src/robotide/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# limitations under the License.
#
# Automatically generated by `tasks.py`.
VERSION = 'v2.0.8dev16'
VERSION = 'v2.0.8dev17'
2 changes: 0 additions & 2 deletions utest/resources/fake.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
auto imports = []
pythonpath = []
global_settings = []
excludes = None
txt number of spaces = 2
[Plugins]

0 comments on commit 06e7556

Please sign in to comment.