You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Buttons: Replace, Find & Replace, Replace All, Switch to Project Search
Approach
Create the UI in qml
Whenever a keypress happens, the "Find" action is triggered
When "Find" is triggered:
Create and use lveditor/DocumentHandler::findText to find the text for the document
If the search text is different than the previous search text:
Clear the previous highlighting model
Search the text and create the new model
Reghighlight the doucment with each of those sections
Return the next index
Place the cursor on the index of the next highlight
When "Replace" is triggered:
Create and uselveditor/DocumentHandler::replace to replace the cursor index of the document
When "Find & Replace" is triggered:
Create and use lveditor/ProjectDocument::replace to replace the cursor index of the document
Return the next index
Place the cursor on the index of the next highlight
When "Replace all" is triggered:
Create and use lveditor/ProjectDocument::replaceAll to replace all the instances
Clear all highlighting
2. Search and replace within a project
UI
Input Boxes: Search box, Replace Box
Buttons: Find, Replace All
Approach
Create the UI in qml
When "Find" is triggered:
Create and use lveditor/Project::findText to find the text in the project, a ListModel with the items
is returned. The ListModel contains the path to the file, then the findings in the
file, like line number, offset and fragment with the actual text
The model is displayed as a List of files and when collpsed, the findings are displayed
When "Replace all" is triggered:
Use lveditor/Project::replaceText to replace the text in the project
No description provided.
The text was updated successfully, but these errors were encountered: