12.4. Testing Plug-ins with the Run-time Workbench

Problem

You are developing a plug-in, and you don’t want to keep stopping and starting Eclipse each time you want to test the plug-in.

Solution

Launch a runtime workbench, which opens a new workbench with your plug-in already installed for testing purposes.

Discussion

If you want to, you can build the plug-in created in the previous recipe and deploy it to the plugins directory (see Recipe 12.5). But for testing purposes, there’s an easier way. All you have to do while developing a plug-in is to launch a runtime workbench, which will appear with your plug-in already installed.

To launch a runtime workbench, highlight the plug-in project in the Package Explorer, select Run Run, click the Run-time Workbench node in the left pane of the Run dialog, and click the New button, creating a new launch configuration, as shown in Figure 12-9. Accept the defaults by clicking Run.

Tip

The next time you want to launch the Run-time Workbench, you can simply select Run Run As Run-time Workbench.

Creating a launch configuration

Figure 12-9. Creating a launch configuration

This starts the Run-time Workbench. You can see the menu defined by the plug-in, Sample Menu, and the button (with the Eclipse icon) it adds to the toolbar in Figure 12-10.

Tip

If you don’t see your plug-in in the Run-time Workbench, select Window Customize Perspective Other, check the “Sample Action Set” checkbox defined ...

Get Eclipse Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.