Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Shortcut for Team - Synchronize with Repository

Tags:

eclipse

What are the shortcuts for the context menu actions "Team -> Synchronize with Repository" and "Team -> Update" on the whole project?

I have already found shortcuts, but these are executed only on the file i have currently opened. But I want to execute it on the whole project without having to scroll the project explorer to the top and right-clicking on the project.

If there are no such shortcuts, how can I create them?

like image 788
Witek Avatar asked Jun 28 '12 09:06

Witek


3 Answers

As john.k.doe indicates, that's the right solution, but you also need to do something else in order to make the shortcut actually work, which is go to Window > Customize Perspective > Command Groups Availability and there just check the SVN box ;)

like image 95
Pitoltzin Avatar answered Oct 01 '22 10:10

Pitoltzin


you can almost always get the key shortcuts you want by

  1. go to preferences type "keys" or go to General -> Keys
  2. in the field presented when you click on "Keys"
  3. in the left pane, type the command you are interested in setting up a shortcut for:

the image below is from my mac, but it works the same way on windows/linux, you just might choose something besides Cmd-Y as your shortcut modifier. the U under User indicates that i was the one to add that modification.

enter image description here

like image 42
john.k.doe Avatar answered Oct 01 '22 12:10

john.k.doe


I have written a small Eclipse plug-in which selects the active project in the Package Explorer so you can execute other actions (like 'Sync with repo' and 'Update') on it. I think this approach is more flexible compared to writing a plug-in that selects the project and executes a predefined action.

You can get the plug-in at http://code.google.com/a/eclipselabs.org/p/eclipse-tweaks/downloads/list, it is named "com.xakcop.select". Download it and put it in the dropins/ folder of your Eclipse installation. Then when you restart Eclipse, you will find a new command Select project in Windows->Preferences->Keys. The default key binding is Ctrl+Shift+Backspace but you can change it to whatever you want.

When you are in the Java editor just press Ctrl+Shift+Backspace, this will select the project that the current file belongs to in Package Explorer. Then press the shortcut for "Synchronize with repository" and you are done.

The source code of the plug-in is also available as part of my eclipse-tweaks project: http://code.google.com/a/eclipselabs.org/p/eclipse-tweaks/source/browse/com.xakcop.select

like image 26
rgerganov Avatar answered Oct 01 '22 11:10

rgerganov