【问题标题】:Eclipse Synchronize HotkeysEclipse 同步热键
【发布时间】:2011-03-08 08:22:07
【问题描述】:

在 Eclipse 的同步面板中有一个“上传所有传出的更改”按钮。有什么方法可以不用鼠标“点击”它? prefs->general->keys中没有这样的动作

【问题讨论】:

  • 这是我需要对鼠标执行的唯一操作。这就是为什么我想找到一些方法来做到这一点。也许有人知道任何宏插件或某种?

标签: eclipse synchronization hotkeys


【解决方案1】:

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

; Eclipse Synchronize Override Upload
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:        Taylor York <taylor@tyec.co>
;
; 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

【讨论】:

    【解决方案2】:

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

    通常,您可以使用 Ctrl-Shift-L 查看当前打开视图的快捷方式备忘单。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-01
      • 2013-01-20
      • 2021-01-31
      • 2015-02-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多