I want to add a view to a perspective without having access to the source code of the perspective. Is this possible?
我想在没有访问透视源代码的情况下向透视图添加视图。这可能吗?
Is there a good tutorial for plug-in development using TDD?
有没有一个很好的使用TDD进行插件开发的教程?
[edit] I think I have a good starting point with TDDing in plugin development Automating unit tests (junit) for Eclipse Plugin development
[编辑]我认为我在插件开发中有一个很好的起点TDDing Eclipse插件开发的自动化单元测试(junit)
[edit 02/17/09] I was able to download the source for the plug-in. I'm just probably going to fork it.
[编辑02/17/09]我能够下载插件的源代码。我可能会分叉吧。
3 个解决方案
#1
Testing GUIs is a PAIN! And the pain grows exponentially with the complexity of the gui design. Your best bet is to keep the business logic separate from the GUI as much as possible with the MVC pattern and when testing the gui, hook the GUI up to a "mock" application.
See Object Mentor's paper, the Humble Dialog Box
测试GUI是痛苦的!随着gui设计的复杂性,疼痛呈指数级增长。最好的办法是尽可能使用MVC模式将业务逻辑与GUI分开,并在测试gui时,将GUI挂钩到“模拟”应用程序。请参阅Object Mentor的论文,即Humble对话框
#2
You might want to take a look at the org.eclipse.ui.perspectiveExtensions Extension Point.
您可能需要查看org.eclipse.ui.perspectiveExtensions扩展点。
And here is a nice article concerning Perspectives: Using Perspectives in the Eclipse UI
这里有一篇关于Perspectives:在Eclipse UI中使用Perspectives的好文章
Sorry, can't help you with the TDD part of your question.
抱歉,无法帮助您解决TDD部分问题。
#3
If your goal is to simply add the view to a perspective in your own Eclipse instance, you can just open it when being in that perspective, and choose Window -> Save Perspective As...
如果您的目标是简单地将视图添加到您自己的Eclipse实例中的透视图中,则只需在该透视图中打开它,然后选择Window - > Save Perspective As ...
For unit testing plug-ins, you can basically test them using normal JUnit tests, which you run as JUnit plug-in tests instead of normal JUnit tests in Eclipse. For GUI testing you could check out SWTBot.
对于单元测试插件,您基本上可以使用普通的JUnit测试来测试它们,这些测试作为JUnit插件测试而不是Eclipse中的普通JUnit测试运行。对于GUI测试,您可以查看SWTBot。
#1
Testing GUIs is a PAIN! And the pain grows exponentially with the complexity of the gui design. Your best bet is to keep the business logic separate from the GUI as much as possible with the MVC pattern and when testing the gui, hook the GUI up to a "mock" application.
See Object Mentor's paper, the Humble Dialog Box
测试GUI是痛苦的!随着gui设计的复杂性,疼痛呈指数级增长。最好的办法是尽可能使用MVC模式将业务逻辑与GUI分开,并在测试gui时,将GUI挂钩到“模拟”应用程序。请参阅Object Mentor的论文,即Humble对话框
#2
You might want to take a look at the org.eclipse.ui.perspectiveExtensions Extension Point.
您可能需要查看org.eclipse.ui.perspectiveExtensions扩展点。
And here is a nice article concerning Perspectives: Using Perspectives in the Eclipse UI
这里有一篇关于Perspectives:在Eclipse UI中使用Perspectives的好文章
Sorry, can't help you with the TDD part of your question.
抱歉,无法帮助您解决TDD部分问题。
#3
If your goal is to simply add the view to a perspective in your own Eclipse instance, you can just open it when being in that perspective, and choose Window -> Save Perspective As...
如果您的目标是简单地将视图添加到您自己的Eclipse实例中的透视图中,则只需在该透视图中打开它,然后选择Window - > Save Perspective As ...
For unit testing plug-ins, you can basically test them using normal JUnit tests, which you run as JUnit plug-in tests instead of normal JUnit tests in Eclipse. For GUI testing you could check out SWTBot.
对于单元测试插件,您基本上可以使用普通的JUnit测试来测试它们,这些测试作为JUnit插件测试而不是Eclipse中的普通JUnit测试运行。对于GUI测试,您可以查看SWTBot。