Sometimes I have made some local changes and for whatever reason don't want to commit them to the source repository. In this case I like to zip up and save off my changes on my local file system until I am ready to commit them at a later date.
I recall that in an earlier version of eclipse, there was a context sensitive action from the Synchronize view that would highlight in the Navigator view the same files that you have selected in the Synchronize view. Then from the Navigator view, you can choose to export the highlighted selection.
I don't see where that option is still available from the Synchronize view anymore and manually selecting the files in the Navigator/Package Explorer view is tedious. Is there an easy way to export a selection of files within the Synchronize view?
You may want to look at the Change Sets feature.
On the synchronize view, the very last button is the Change Sets button - if you turn that on, you can assign your changes to sets that you define (right click on a file listed and then Add To -> New Change Set.
I set up a change set called Local changes, and then a new change set for each defect/feature I am working on (and set this to be the default change set). When it comes time to commit the changes for a feature or defect, I just right click on the appropriate change set name and click commit.
This way you can keep local changes around as long as you like without worrying about sorting which files need committing and which to keep around (or create a patch from etc).
It's not on the context menu, but going to the Navigate menu up top and selecting "Show In->Navigator" will apply that selection. Whether or not you can export just the selected files, I don't know.
You can do this by setting key shortcut for export and using it while having relevant files selected pretty much everywhere in Eclipse including synchronize view.
Go to Windows > Preferences > General > Keys search for "Export" and bind it to a key. Don't forget to set "When" to "In Dialogs and Windows".
Isn't a Patch exactly what you need? There should be a Create Patch context menu item in the Synchronize view and it creates a file with all your changes to the selected source files. You can easily reapply the patch later with Apply Patch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With