Workspace setup
Before going through the many code examples in this tutorial, you need to set up a sandbox workspace. You can do this two ways:
- Select a new workspace location on Eclipse IDE startup.
- If your IDE defaults to the same workspace every time at startup, select File > Switch Workspace.
After you establish a workspace, a few support projects are needed. Select File > Import. Select plug-ins and Fragments from the plug-in Development category, then click Next. Click Next on the following screen, then select the following projects for import and add them to the list on the right:
- org.eclipse.swt
- org.eclipse.swt.win32.win32.x86 (or platform-specific SWT plug-in)
- org.eclipse.equinox.common
- org.eclipse.core.commands
Click Finish to import. Next, download the archive referenced in the Resources section. Right-click in the Package Explorer and select Import. This time, select Existing Projects into Workspace from the General category, then click Next. Select the Archive File option and browse to find the archive project file. Click Finish to import.
Confirm that all the code in the tutorial project compiles without errors. If it doesn't, you may need to modify the project's required libraries. To do so, right-click the project, and select Properties. Next, go to the Java Build path. Under the Projects tab, remove all projects. Finally, click Add to read the projects that were imported as dependencies. Upon a clean compile, all errors should disappear. Now you're ready to begin widget customizations.




