开发者

Tying a single operation to multiple "when" situations in Eclipse. Is it possible?

开发者 https://www.devze.com 2023-02-23 13:54 出处:网络
I\'m looking for a way to tie a certain keyboard shortcut to running an Ant Task in Eclipse. I\'d like to do this from any place in Eclipse. From what I\'ve seen, I could define a hotkey for \"Run th

I'm looking for a way to tie a certain keyboard shortcut to running an Ant Task in Eclipse.

I'd like to do this from any place in Eclipse. From what I've seen, I could define a hotkey for "Run the last external application", but that obliges me to define a "when", that is, a place I want to be when that hotkey makes sense.

I guess I'll want to run that either when I'm coding or when I have the package-explorer open but Eclipse only seems to allow me to define a "whe开发者_如何学JAVAn". Is there a workaround for this?

Better yet, is it possible to define that a certain hotkey combination can be ran from anywhere in Eclipse?


It sounds like you want to use the "In Windows" entry for the "When". "In Windows" should make the shortcut work within any Eclipse window, but not in dialog boxes. If you want it to work in dialogs as well, then pick "In Dialogs and Windows".

Read more about shortcut definitions here. The section labeled "Contexts" corresponds to the "When" field of the Keys preference page.

Update: There is a bug in some versions of Eclipse that cause the key binding described above to open External Tools configuration dialog instead of running the last external tool. The linked bug report indicates that this bug has been fixed in the forthcoming version 3.7.

0

精彩评论

暂无评论...
验证码 换一张
取 消