Community
Participate
Working Groups
Currently, the code to convert a project to a PDE project is tied directly to org.eclipse.pde.internal.ui.wizards.tools.ConvertedProjectsPage. We should be smarter about this and refactor out this code to run as a stand alone operation. This will aid us in developing junit test cases in the future and help us try to separate our UI and non-UI code.
Created attachment 81142 [details] Patch to refactor conversion code out of wizard page into an operation. This is a patch that moves the code for converting a project to a plug-in project from the wizard page into an operation. It's a fairly simple refactoring for now, so I've not split up the core and ui code, but for now at least, this is a less risky solution. Hope this is the kind of this you were looking for and is of some use. Patch was developed on a 3.4 build (I20071023-0800) and has subsequently been successfully reapplied to code pulled from the HEAD.
Created attachment 81143 [details] Simple Test Case Attached is a simple test case I also created whilst pulling this change together.
awesome Les!!!!!
let's make sure this gets in for 3.4 sometime
A may be able to give a little more time beefing up the test cases if someone's able to give me some better scenarios. This would then enable us to consider performing a more major refactoring (e.g. ui->core) with a better degree of confidence sometime in the future. On the subject of test cases, I had a problem when trying to run the test case as part of the org.eclipse.pde.ui.tests plug-in. Got a "no classloader found for plugin org.eclipse.pde.ui.tests" error when the JUnit plug-in launcher tried to execute the tests. Therefore, to run these tests I put the test class in the org.eclipse.pde.ui plugin and (temporarily) altered the manifest to include a dependency on JUnit - obviously, I didn't include this in the patch ;-) Should the org.eclipse.pde.ui.tests plugin work? If so, any ideas what the problem might be; if not, where should the test class have been put?
Nice job Les. Very good patch. And I have to say in all my years at PDE I don't think I have ever seen anyone create J-Unit test cases for their contribution. Thanks for going the extra mile, that definitely helps us out! If you are interested in being added to the wall of PDE contributors (http://www.eclipse.org/pde/pde-ui/committers/committers.php), please send me a head shot with a leafy back ground :) Thanks again for a great patch and the J-Unit test cases to make sure we don't break it in the future :)
I'm marking this one as a greatbug
Thanks, but those tests in the supplied test case were pretty simple. We should probably look to add some more in to provide a little more coverage.