Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you export a selection of files from the Synchronize view in Eclipse?

Tags:

eclipse

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?

like image 850
s_t_e_v_e Avatar asked Oct 15 '08 13:10

s_t_e_v_e


4 Answers

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).

like image 150
RodeoClown Avatar answered Nov 04 '22 12:11

RodeoClown


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.

like image 31
nitind Avatar answered Nov 04 '22 12:11

nitind


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".

like image 3
Dusan Avatar answered Nov 04 '22 13:11

Dusan


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.

like image 1
Jan Soltis Avatar answered Nov 04 '22 11:11

Jan Soltis