In this method the current values of the user settings should be added to the NodeSettings object. The object provided is only accessible through a “write-only” interface, meaning you can only add values, and not read them back. This method must also handle the case when no user settings (or invalid settings) are set yet, as no settings may have been entered by the user at the time the workflow is saved. You should not throw an exception in this method.

Example #1

  	public void saveSettingsTo(final NodeSettingsWO settings) {           settings.addInt(CFG_MEAN_THRESHOLD, m_percentage);          settings.addBoolean(CFG_REPLACE, m_replace);  }  

If DefaultComponents with their SettingsModels are used, the method would look as in Example #2.

Example #2:

  	protected void saveSettingsTo(final NodeSettingsWO settings) {          m_settingsModel1.saveSettingsTo(settings);          m_settingsModel2.saveSettingsTo(settings);  }