Create the Project Template
Now we're ready to build our Silverlight app. To start, select Windows->Open Perspective->Other… to open the perspective selection dialog:
 | |
| Figure 8. Select Windows->Open Perspective->Other… to open the perspective selection dialog. |
Notice that Silverlight is listed twice. The first entry, with the little blue cube, is the Eclipse-style perspective with the Project Explorer docked on the left and the palette docked on the right. The second entry is the Visual Studio style perspective, which reverses these.
Now that the Silverlight perspective is set, select File->New. You'll see two types of Silverlight projects to choose from: Silverlight Project and Silverlight Web Project. Select Silverlight Web Project. This lets you embed your Silverlight app within a Web page that has other elements.
 | |
| Figure 9. A Silverlight Web Project lets you embed your Silverlight app within a Web page that has other elements. |
Next you'll see the New Project dialog. Enter SyndicationFeedReader as the project name. This project doesn't depend on any other projects so you don't have to click Next. Just click Finish:
 | |
| Figure 10. In the New Project dialog, enter SyndicationFeedReader as the project name. |
Before we go any further, let's see what was created for us. Project Explorer shows two projects: SyndicationFeedReader and SyndicationFeedReader.Web:
 | |
| Figure 11. Project Explorer shows two projects: SyndicationFeedReader.Web and SyndicationFeedReader. |
In the screenshot above, the mouse cursor is hovering over the View Menu button. The View Menu doesn't display in the current version of the plug-in, but you can open and close your Silverlight projects from other Eclipse perspectives.
Let's build and run what we have so far. It will display only a blank page, but it gives us a chance to set things up. Select Run->Run configurations… to bring up the Run Configurations dialog. Select Silverlight Web App from the list, and then click the New button:
 | |
| Figure 12. Select Run->Run configurations… to bring up the Run Configurations dialog. |
Next you'll see the configuration dialog. In the Name field enter SyndicationFeedReader, and for Project to test select SyndicationFeedReader.Web. The start page, SyndicateFeedReaderTestPage.html will be selected. Click Apply and then Run:
 | |
| Figure 13. Enter the run configuration name and select the project start page. |
This will launch what appears to be a blank page in your browser but if you right-click in the browser window, you'll see the Silverlight Configuration context menu. Silverlight is running—there's just nothing there yet.
Note: We will need to make some small changes in SyndicationFeedReaderTestPage.html, but it may not be listed as part of the SyndicationFeedReader.Web project in Project Explorer. (Soyatec has fixed this bug, but the fix may not be released by the time you read this.) If it's missing, here's how to add it. Right-click on the project name SyndicationFeedReader.Web and select New -> Add existing file. Then navigate to the project directory, change the filter to *.*, and select the file. You'll be asked if you want to overwrite the existing file. Say no. The file will appear in your project list.