Skip to content

Conversation

@vishwesh007
Copy link
Contributor

This pull request introduces a comprehensive project-wide search and replace feature, including UI integration and undo/redo support. It adds new commands for searching and replacing text across all files in a project, and implements a manager to handle batch replacements with the ability to undo and redo changes. Additionally, it improves the accuracy of code search and updates UI strings.

Project-wide Search and Replace Functionality:

  • Added ProjectReplaceManager (core/main/src/main/java/com/rk/searchreplace/ProjectReplaceManager.kt) to handle project-wide search and replace operations, including support for regex, case sensitivity, whole word matching, and undo/redo of replacements.
  • Integrated new dialogs and state variables for project replace and search-and-replace features in the UI (GlobalActions.kt). [1] [2]

Command Palette Enhancements:

  • Added a new "Project" command section in CommandProvider, with subcommands for "Search in files", "Search and Replace", "Replace in files", "Undo project replace", and "Redo project replace", each with appropriate enablement and icons. [1] [2] [3]

Search Accuracy Improvements:

  • Improved code search to be case-insensitive when locating the character index for matches.

UI/UX:

  • Added new string resources for "Search and Replace" and displaying match counts in files.

vishwesh007 and others added 7 commits December 15, 2025 21:25
- Added escapeReplacement() helper in ProjectReplaceManager
- In non-regex mode: $ and \ are treated as literal characters
- In regex mode: ,  etc. work as backreferences for capture groups
- Added escapeReplacement() helper in ProjectReplaceManager
- In non-regex mode: $ and \ are treated as literal characters
- In regex mode: ,  etc. work as backreferences for capture groups
Copilot AI review requested due to automatic review settings December 15, 2025 16:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@RohitKushvaha01 RohitKushvaha01 merged commit 015e8a9 into Xed-Editor:main Dec 15, 2025
RohitKushvaha01 added a commit that referenced this pull request Dec 16, 2025
RohitKushvaha01 added a commit that referenced this pull request Dec 16, 2025
Revert "Project wide search and replace implementation (#1019)"

This reverts commit 015e8a9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants