Reputation: 2023
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?
[edit] I think I have a good starting point with TDDing in plugin development Automating unit tests (junit) for Eclipse Plugin development
[edit 02/17/09] I was able to download the source for the plug-in. I'm just probably going to fork it.
Upvotes: 1
Views: 1499
Reputation: 45744
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...
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.
Upvotes: 0
Reputation: 6473
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
Upvotes: 2
Reputation: 1152
You might want to take a look at the org.eclipse.ui.perspectiveExtensions Extension Point.
And here is a nice article concerning Perspectives: Using Perspectives in the Eclipse UI
Sorry, can't help you with the TDD part of your question.
Upvotes: 1