Implement Cut action for resources in Project Explorer#3789
Draft
vogella wants to merge 3 commits intoeclipse-platform:masterfrom
Draft
Implement Cut action for resources in Project Explorer#3789vogella wants to merge 3 commits intoeclipse-platform:masterfrom
vogella wants to merge 3 commits intoeclipse-platform:masterfrom
Conversation
Implemented a new test class covering copy and paste functionality for resources in the Common Navigator-based Project Explorer. Key tests include: - Verify Copy/Paste/Delete actions exist in context menu for resources - Copy enablement for single resource selection - Copy-to-clipboard verification using ResourceTransfer and TextTransfer - Paste enablement based on clipboard contents and target selection - End-to-end copy-paste round-trip between different projects These tests ensure EditActionGroup and its constituent CopyAction and PasteAction are correctly wired and functional.
Added a new CutAction and integrated it into the Common Navigator's EditActionGroup. Modified PasteAction to support moves when a cut operation is pending. Key changes: - Created CutAction.java to handle clipboard 'Cut' operations. - Updated PasteAction.java to use MoveFilesAndFoldersOperation when CutAction.isCut is true. - Wired CutAction into EditActionGroup's context menu and action bars. - Added localized strings for the Cut action. - Expanded CopyPasteActionTest.java with comprehensive tests for Cut enablement, clipboard contents, and move behavior. The tests use a dedicated TEST_VIEWER to ensure navigator actions are tested without interference from JDT's action provider overrides.
Contributor
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
Contributor
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.
This PR implements the 'Cut' action for resources in the Common Navigator-based Project Explorer.
Previously, only Copy, Paste, and Delete were supported. This implementation adds the ability to cut resources to the clipboard and move them to a target location upon pasting.
Key Changes:
Verification:
Ran the full with to ensure workspace changes were used. All 146 tests passed (including the 14 in ).