Given that Legend is mostly a text based/text processing tool and some of the main uses can be a task manager and a knowledge base, an essential function needed to complement the current find text functionality is the Find and Replace.
Most text processing solutions have some form of find and replace so stipulataing the requirements should be fairly straight forward. I would propose the following:
- Functionality should be equivalent for Global Find as well as for the local Find in a single pane.
- it should be implemented as an enhancement within the Find function
- Given a Find operation that has already been done, the toolbar that contains the search text pattern and the next and previous buttons should contain another button, perhaps with the ’R" for replacing.
When the R button is pressed an additional level with a text box should appear beneath the Find text expression, to accept the text to be used to replace. This new level should contain another set of Next and Previous buttons (let’s call them Replace this and find the next or previous entry) and an “A” button (let’s call it Replace All found entries).
when Enter si pressed or (next or previous button ) is pressed, the application should replace the currently select find text with the text in the "Replace’ box and jump to the next (or previous) entry that matches the Find box, so the process can be repeated.
When the “A” (replace All) button is pressed, the app would parse all results and perform the replacement, possibly showing at the end the total number of replacements done, and while still pointing to the current entry allow now to skip next and previous to be able to go through the entries that have been replaced to review.
This describes the basic functionality of find and replace (perhaps for the first release of the functionality). An additional very desirable enhancement for a next release would be to add the ability to use regular expressions on the find and replace text boxes, to truly bring out the full power of this functionality.
For discussion is whether we would still want to preserve the local Find operation behavior where it just finds text that is visible (i.e. it won’t find text entries that are hidden by their parents being collapsed). Normally I would expect the local Find to execute and identify results even if they are inside collapsed parents, but that is not the current behavior.