issue #7456: TextComposite toolbar with find/replace and plugin SPI - #7907
Draft
mattcasters wants to merge 2 commits into
Draft
issue #7456: TextComposite toolbar with find/replace and plugin SPI#7907mattcasters wants to merge 2 commits into
mattcasters wants to merge 2 commits into
Conversation
… SPI Add an extensible toolbar on multi-line text editors (SQL, scripts, JSON, logs, and so on) with built-in edit actions and find/replace, a styleType constructor parameter for GuiToolbarElementFilter, developer documentation, and a sample JSON pretty-print toolbar contribution.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Implements in-editor search for multi-line SQL/script/text fields (issue #7456), and opens the same surface for plugins:
TextComposite(same SPI model asTableView): undo/redo, cut/copy/paste, select all, find, find/replacestyleTypeconstructor parameter so toolbar filters see SQL/JSON/… at build time (filters run mid-construction)@GuiToolbarElement+@GuiToolbarElementFilteronTextComposite.ID_TOOLBARNotes for reviewers
getStyleType()overinstanceofspecialized subclasses (Hop Web stand-ins).@GuiToolbarElementFilterruns during host construction: use constructorstyleTypeonly; checkisEditable()/ content in the action method.TextFindSupportunit tests; compile verified foruiand affected plugins.Test plan
styleTypeJSON): format-JSON toolbar button appears; pretty-prints valid JSON; invalid JSON shows error dialogStyledTextCompwithSTYLE_TYPE_SQL; toolbar/find still workFixes #7456