Running a plug-in
by, 11-16-2011 at 08:38 PM (764 Views)
As you develop your plug-in in the workspace, the incremental Java compiler will compile your Java source code and place the .class files into the bin directory of your PDE project. When you are ready to test your plug-in, you can launch a separate Eclipse application instance to test your new plug-in.
The easiest way to launch an Eclipse application is via the link in the Testing section of the plug-in manifest editor's Overview page. This will immediately create a second Eclipse instance that will appear within seconds.
To gain full control over the way the run-time workbench is launched, select Run > Run from the main menu bar. This will bring up the Launch Configuration Dialog.
Workspace data field defines the workspace that will be used by your application. The location of this runtime workspace must be different from the workspace of your host instance.
The default program to run is the org.eclipse.sdk.ide product. Launching it will result in a second workbench instance coming up whose constituent plug-ins are the workspace plug-ins and the plug-ins selected on the Target Platform preference page.
You can test your runtime workbench using the JRE of your choice and does not have to be the same one against which your plug-ins compile in the workspace. You can also specify any VM arguments that are appropriate for your testing.
Example Running the Sample
Press Run. Another platform instance should open. You will see a top menu item called Sample Menu with a single Sample Action item. Selecting it should pop up a dialog containing the phrase Hello, world.