Getting Started with the Yahoo! Widget Develpment Toolkit

The Yahoo! Widgets Perspective

Eclipse has a feature called perspectives which lets you customize the workbench (i.e. the main Eclipse window) according to the type of task you want to do. YWDT provides a Yahoo! Widgets perspective that includes shortcuts to the reference manual, to wizards for creating a new widget project, new xml files and new javascript files. It also sets the layout to only show what you need as a widget developer.
To open the Yahoo! Widgets perspective, select Window/Open Perspective/Other... from the main menu. Then select Yahoo! Widgets and click OK.

Creating a new widget project

The Yahoo! Widget Development Toolkit provides a wizard to automatically create a functional widget template from the basic information you provide.
To run the new widget project wizard, select File/New/Yahoo! Widget Project from the main menu. If you don't see Yahoo! Widget Project in the File/New menu, you are probably not in the Yahoo! Widgets perspective. Either open the perspective as described above, or select Other... from the File/New menu and then select Yahoo! Widget Project in the Yahoo! Widgets category.

Using the Auto-Packaging Feature

To start using the Auto-Packaging feature, you must have the Converter command line tool. It can be obtained directly from http://widgets.yahoo.com/workshop/. However, if you have ever run the Widget Converter Widget, the Converter tool can be found in its widget data folder. Next, go to the YWDT Preferences from the Eclipse Window/Preferences menu and enter the location of the folder containing the Converter tool.

YWDT is then set up to automatically package your widget's code and resources into a flat file widget every time a file in the widget's folder is modified and saved. Note that this happens in the background so it shouldn't interfere with your productivity. The packaged widget is stored in the Packaged Widget folder of your widget project.

By default, the packager uses all the resources within the <widget-name>.widget folder. To exclude certain files or folders within the widget folder from the packaged widget, select Exclude from widget from the file's/foler's context menu.

It is possible to package the widget in the zipped format as well. To do this, access the Properties page from the widget project's context menu, select the Yahoo! Widgets category on the left and select zipped from the format drop down.

To digitally sign your widget, access the widget project's properties page and enter the required information.

If you would rather YWDT not package the widget automatically, uncheck Project/Build Automatically from the main menu. To package the widget, you will have to select Project/Buil All from the main menu, or Build Project from the widget project's context menu.