Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
7.6 Testing private void saveFavorites(XMLMemento memento) { Iterator<IFavoriteItem> iter = favorites.iterator(); while (iter.hasNext()) { IFavoriteItem item = (IFavoriteItem) iter.next(); IMemento child = memento.createChild(TAG_FAVORITE); child.putString(TAG_TYPEID, item.getType().getId()); child.putString(TAG_INFO, item.getInfo()); } } private File getFavoritesFile() { return FavoritesActivator .getDefault() .getStateLocation() .append("favorites.xml") .toFile(); } 345 The load and save methods interact with a file named favorites.xml , which is located in the following workspace metadata subdirectory: <workspace>\.metadata\.plugins\com.qualityeclipse.favorites . The file content is in XML format and might look something like this: <?xml version="1.0" encoding="UTF-8"?> <Favorites>