2010-06-25 70 views
0

在eclipse的Synchronize面板中有一个按钮“Upload All Outgoing Changes”。任何方式来“点击”它没有鼠标?在prefs-> general->键中没有这样的动作Eclipse同步热键

+0

这是我需要用鼠标完成的唯一操作。这就是为什么我想找到一些方法来做到这一点。也许有人知道任何宏插件或某种? – thik 2010-06-29 11:40:36

回答

0

它不存在,我想我知道为什么:提交或更新应该是一个非常有意识的决定。所以点击按钮会促进这种决定。

一般来说,您可以使用Ctrl-Shift-L查看当前打开视图的快捷键快捷键。

1

我为此创建了一个自动热键文件。 http://www.autohotkey.com/ 我希望你喜欢它!

; Eclipse Synchronize Override Upload 
; AutoHotkey Version: 1.x 
; Language:  English 
; Platform:  Win9x/NT 
; Author:  Taylor York <[email protected]> 
; 
; Script Function: 
; Upload Files to the Synchronize Window in Eclipse 
; 

;#NoTrayIcon 
#SingleInstance force 
DetectHiddenWindows, on 

; the title starts with 
SetTitleMatchMode 2 

SyncAndUpload()    ; Function 
{ 
    ; Get to the Synchronize Tab 
    Send {ALT down}   ; Hold Alt+Shift+Q down 
    Send {SHIFT down}  ; Eclipse seemed to dislike pressing every key at once 
    Send {Q down} 
    Send {Q up} 
    Send {SHIFT up} 
    Send {ALT up} 
    Sleep, 250 ; wait 250 milliseconds 
    Send y 

    ; Click Override and Upload 
    Send {Space}   ; When you go to the Synchronize tab, you have to select something. Space selects to top item 
    Send {AppsKey}   ; "Right Click"/Context menu the item that is selected 
    Send {o 2}   ; Press o twice (Override and Upload is the second O) 
} 


; Make sure we are in Eclipse, so we dont hijack other apps! 
#IfWinActive, ahk_class SWT_Window0 
{ 
    #IfWinActive, PHP   ; Title starts with PHP (this is used so it only works in PHP mode. 
    { 
     ^T:: 
     {  
      KeyWait Control   ; Wait to run until all keys are let go 
      KeyWait T 

      SyncAndUpload() 
      return 
     } 


     ^S:: 
     { 
      KeyWait Control   ; Wait to run until all keys are let go 
      KeyWait S 

      Send ^S 
      Sleep 250 
      SyncAndUpload() 
     } 

    return 
    } 
return 
} 




;endofscript