This method ensures a few things about widget:
widget
widget.getResourceUri()
widget.saveable.createSnapshot
widget.saveable.revert
widget to save as target.
target
The new URI for the widget.
Save sourceWidget to a new file picked by the user.
sourceWidget
This method ensures a few things about
widget
:widget.getResourceUri()
actually returns a URI.widget.saveable.createSnapshot
is defined.widget.saveable.revert
is defined.