{
Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );
// DSML file
BaseWidgetUtils.createLabel( composite, Messages.getString( "ImportDsmlMainWizardPage.DSMLFile" ), 1 ); //$NON-NLS-1$
dsmlFileBrowserWidget = new FileBrowserWidget(
Messages.getString( "ImportDsmlMainWizardPage.SelectDSMLFile" ), EXTENSIONS, FileBrowserWidget.TYPE_OPEN ); //$NON-NLS-1$
dsmlFileBrowserWidget.createWidget( composite );
dsmlFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
{
public void widgetModified( WidgetModifyEvent event )
{
wizard.setDsmlFilename( dsmlFileBrowserWidget.getFilename() );
if ( useDefaultResponseFileButton.getSelection() )
{
responseFileBrowserWidget.setFilename( dsmlFileBrowserWidget.getFilename() + ".response.xml" ); //$NON-NLS-1$
}
validate();
}
} );
// Connection
BaseWidgetUtils.createLabel( composite, Messages.getString( "ImportDsmlMainWizardPage.ImportTo" ), 1 ); //$NON-NLS-1$
browserConnectionWidget = new BrowserConnectionWidget( wizard.getImportConnection() );
browserConnectionWidget.createWidget( composite );
browserConnectionWidget.addWidgetModifyListener( new WidgetModifyListener()
{
public void widgetModified( WidgetModifyEvent event )
{
wizard.setImportConnection( browserConnectionWidget.getBrowserConnection() );
validate();
}
} );
// Save Response
Composite responseOuterComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 3 );
Group responseGroup = BaseWidgetUtils.createGroup( responseOuterComposite, Messages
.getString( "ImportDsmlMainWizardPage.Response" ), 1 ); //$NON-NLS-1$
Composite responseContainer = BaseWidgetUtils.createColumnContainer( responseGroup, 3, 1 );
saveResponseButton = BaseWidgetUtils.createCheckbox( responseContainer, Messages
.getString( "ImportDsmlMainWizardPage.SaveResponse" ), 3 ); //$NON-NLS-1$
saveResponseButton.setSelection( true );
wizard.setSaveResponse( saveResponseButton.getSelection() );
saveResponseButton.addSelectionListener( new SelectionAdapter()
{
public void widgetSelected( SelectionEvent event )
{
wizard.setSaveResponse( saveResponseButton.getSelection() );
useDefaultResponseFileButton.setEnabled( saveResponseButton.getSelection() );
useCustomResponseFileButton.setEnabled( saveResponseButton.getSelection() );
responseFileBrowserWidget.setEnabled( saveResponseButton.getSelection()
&& useCustomResponseFileButton.getSelection() );
overwriteResponseFileButton.setEnabled( saveResponseButton.getSelection() );
validate();
}
} );
BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
useDefaultResponseFileButton = BaseWidgetUtils.createRadiobutton( responseContainer, Messages
.getString( "ImportDsmlMainWizardPage.UseDefaultResponse" ), 2 ); //$NON-NLS-1$
useDefaultResponseFileButton.setSelection( true );
useDefaultResponseFileButton.addSelectionListener( new SelectionAdapter()
{
public void widgetSelected( SelectionEvent event )
{
String temp = customResponseFileName;
responseFileBrowserWidget.setFilename( dsmlFileBrowserWidget.getFilename() + ".response.xml" ); //$NON-NLS-1$
responseFileBrowserWidget.setEnabled( false );
customResponseFileName = temp;
validate();
}
} );
BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
useCustomResponseFileButton = BaseWidgetUtils.createRadiobutton( responseContainer, Messages
.getString( "ImportDsmlMainWizardPage.UseCustomResponse" ), //$NON-NLS-1$
2 );
useCustomResponseFileButton.setSelection( false );
useCustomResponseFileButton.addSelectionListener( new SelectionAdapter()
{
public void widgetSelected( SelectionEvent event )
{
responseFileBrowserWidget.setFilename( customResponseFileName != null ? customResponseFileName : "" ); //$NON-NLS-1$
responseFileBrowserWidget.setEnabled( true );
validate();
}
} );
BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
responseFileBrowserWidget = new FileBrowserWidget( Messages
.getString( "ImportDsmlMainWizardPage.SelectSaveFile" ), null, FileBrowserWidget.TYPE_SAVE ); //$NON-NLS-1$
responseFileBrowserWidget.createWidget( responseContainer );
responseFileBrowserWidget.addWidgetModifyListener( new WidgetModifyListener()
{
public void widgetModified( WidgetModifyEvent event )