在 Eclipse 中切换测试和类的键盘快捷键?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3004846/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 14:49:04  来源:igfitidea点击:

Keyboard shortcut to switch between test and class in eclipse?

eclipseeclipse-pluginkeyboard-shortcuts

提问by Manish Chakravarty

Lets say you create a class Fooand a test FooTest( standard JUnit test ) I want a keyboard shortcut to help quickly switch between the test and the class.

假设您创建了一个类Foo和一个测试FooTest(标准 JUnit 测试)我想要一个键盘快捷键来帮助在测试和类之间快速切换。

If that is not possible, something like TextMate's "Run focussed test" (Command+ Shift+ R) might be of great help.

如果这是不可能的,像TextMate的“运行测试集中”(Command+ Shift+ R)可能会有很大的帮助。

回答by maxim_ge

You can also use moreunit. I just installed it and it works fine, allowing to switch between source class and test class and also to run test class being in source class editor.

您也可以使用moreunit。我刚刚安装了它,它工作正常,允许在源类和测试类之间切换,还可以在源类编辑器中运行测试类。

回答by dty

There isn't a built in one, but there's a plug-in called "Switcher" which will allow you to do that, here

没有内置的,但是有一个名为“Switcher”的插件可以让你做到这一点,在这里