|Java Interface|| |
|Base class|| |
StepDialogInterface is the Java interface that implements the plugin settings dialog.
Maintain the Dialog for Step Settings
dialog class is responsible for constructing and opening the settings dialog for the step. Whenever you open the step settings in Spoon, the system instantiates the
dialog class passing in the
StepMetaInterface object and calling
open() on the dialog. SWT is the native windowing environment of Spoon and is the framework used for implementing step dialogs.
public String open()
This method returns only after the dialog has been confirmed or cancelled. The method must conform to these rules.
- If the dialog is confirmed
StepMetaInterfaceobject must be updated to reflect the new step settings
- If you changed any step settings, the Changed flag of the
StepMetaInterfaceobject flag must be set to
open()returns the name of the step
- If the dialog is cancelled
StepMetaInterfaceobject must not be changed
- The Changed flag of the
StepMetaInterfaceobject must be set to the value it had at the time the dialog opened
StepMetaInterface object has an internal Changed flag that is accessible using
setChanged(). Spoon decides whether the transformation has unsaved changes based on the Changed flag, so it is important for the dialog to set the flag appropriately.
The sample step plugin project has an implementation of the dialog class that is consistent with these rules and is a good basis for creating your own dialog.