-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Update RSyntaxTextArea to 2.6.1 and remove need for Arduino-specific patches #5990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
76bc293
Use RTextArea.getActon for some actions
matthijskooijman ca284fb
Remove LastUndoableEditAwareUndoManager
matthijskooijman 6f4b03a
Fix edit actions when the text area is not focused
matthijskooijman 28bfbc7
Use RTextArea.begin/endAtomicEdit()
matthijskooijman e8a8702
Remove EditorTab.getUndoManager()
matthijskooijman 3bda584
Update RSyntaxTextArea to 2.6.1
matthijskooijman 987d7be
Remove unused CaretAwareUndoableEdit class
matthijskooijman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dummy object creation to obtain the
UNDO_ACTION
makes me really uneasy.Also, we already have a
EditorTab.handleUndo()
method, why not just call that instead of trying to fit the RSTA action?Moreover the RSTA action is wrapped inside another ActionWrapper class that is made just to route the message to the correct EditorTab through getCurrentTab(), while it may be much more simple to do something like:
Or maybe I'm missing something?
I remember that I've already solved this in another refactoring experiment I did some time ago I'll try to recover this attempt from my old branches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason to use RSTA's actions, is that they are automatically updated to become enabled/disabled when the undo state changes, and to automatically show "Undo" or "Can't undo". If we do that manually, as is done currently, we need access to the UndoManager which needs a patch (at least for the
getUndoPresentationName()
, IIRC RSTA does export acanUndo()
or similar). Also, we need to keep track of changes within the document with change listeners and other stuff, which is a bit messy. Having said that, this approach isn't 100% elegant either, so I can understand your being hesitant.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the clarification, inedeed the fact that RSTA handle automatically the enable/disable is a point.
Another thing that comes to mind is how the localization is handled? is it something already in the RSTA resources? about
getUndoPresentationName()
it seems that the menu is always presented as "Undo" or "Redo", IMHO it's something that can be easily dropped in case.