Shortcut key to clear console in Eclipse

前端 未结 6 1203
暗喜
暗喜 2021-02-02 08:34

What is the shortcut key to clear console in Eclipse or how can it be configured? Any work-arounds to achieve this?

6条回答
  •  花落未央
    2021-02-02 09:12

    This thread is 7 years old now, but I constantly need to clean the console so i can get work done. Thanks to sbanders I made this AutoHotKey script:

    #`::
    WinGetTitle, Title, ahk_class SWT_Window0
    if InStr(Title, "Eclipse") {
      WinActivate, ahk_class SWT_Window0
      Send +!q
      Sleep, 1200
      Send c
      Send +{F10}r
    }
    return 
    

    What this means is the following.

    • When the user presses WinKey + Backtic (this can easily be changed to a different hotkey),
    • If an Eclipse window exists
    • Activate that window and press CTRL + SHIFT + q (opens navigation context menu)
    • Wait 1.2 seconds (wait time probably depends on system specs)
    • Press c (Will focus on console view)
    • Press SHIFT + F10 + r (Clears console)
    • End script

    It's a very handy script for coders who don't like clicking so I thought I'd share it.

提交回复
热议问题