public void widgetSelected( SelectionEvent e ) { DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( destination.getText() != null ) { String fpath = destination.getText(); // String fpath = StringUtil.environmentSubstitute(destination.getText()); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); destination.setText( str ); } } };
public void widgetSelected( SelectionEvent e ) { DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( destination.getText() != null ) { String fpath = destination.getText(); // String fpath = StringUtil.environmentSubstitute(destination.getText()); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); destination.setText( str ); } } };
DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( dialog.open() != null ) { String directory = dialog.getFilterPath();
DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( dialog.open() != null ) { String directory = dialog.getFilterPath();
public void widgetSelected( SelectionEvent e ) { DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( wTrustStorePath.getText() != null ) { String fpath = transMeta.environmentSubstitute( wTrustStorePath.getText() ); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); wTrustStorePath.setText( str ); } } } );
String str = dialog.getFilterPath(); wFilename.setText( str );
public void widgetSelected( SelectionEvent e ) { DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( wFoldername.getText() != null ) { String fpath = transMeta.environmentSubstitute( wFoldername.getText() ); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); wFoldername.setText( str ); } } } );
public void widgetSelected( SelectionEvent e ) { if ( wFilemask.getText() != null && wFilemask.getText().length() > 0 ) { // A mask: a directory! DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( wFilename.getText() != null ) { String fpath = transMeta.environmentSubstitute( wFilename.getText() ); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); wFilename.setText( str ); } } else { FileDialog dialog = new FileDialog( shell, SWT.OPEN ); dialog.setFilterExtensions( new String[] { "*.yaml;*.YAML", "*" } ); if ( wFilename.getText() != null ) { String fname = transMeta.environmentSubstitute( wFilename.getText() ); dialog.setFileName( fname ); } dialog.setFilterNames( new String[] { BaseMessages.getString( PKG, "System.FileType.YAMLFiles" ), BaseMessages.getString( PKG, "System.FileType.AllFiles" ) } ); if ( dialog.open() != null ) { String str = dialog.getFilterPath() + System.getProperty( "file.separator" ) + dialog.getFileName(); wFilename.setText( str ); } } } } );
public void widgetSelected( SelectionEvent e ) { if ( !Utils.isEmpty( wFilemask.getText() ) || !Utils.isEmpty( wExcludeFilemask.getText() ) ) { // A mask: a directory! DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( wFilename.getText() != null ) { String fpath = ""; // StringUtil.environmentSubstitute(wFilename.getText()); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); wFilename.setText( str ); } } else { FileDialog dialog = new FileDialog( shell, SWT.OPEN ); dialog.setFilterExtensions( new String[] { "*" } ); if ( wFilename.getText() != null ) { String fname = ""; // StringUtil.environmentSubstitute(wFilename.getText()); dialog.setFileName( fname ); } dialog.setFilterNames( new String[] { BaseMessages.getString( PKG, "System.FileType.AllFiles" ) } ); if ( dialog.open() != null ) { String str = dialog.getFilterPath() + System.getProperty( "file.separator" ) + dialog.getFileName(); wFilename.setText( str ); } } } } );
@Override public void widgetSelected( SelectionEvent e ) { if ( !Utils.isEmpty( wFilemask.getText() ) || !Utils.isEmpty( wExcludeFilemask.getText() ) ) { DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( wFilename.getText() != null ) { String fpath = ""; // StringUtil.environmentSubstitute(wFilename.getText()); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); wFilename.setText( str ); } } else { FileDialog dialog = new FileDialog( shell, SWT.OPEN ); dialog.setFilterExtensions( new String[] { "*.mdb;*.MDB;*.accdb;*.ACCDB", "*" } ); if ( wFilename.getText() != null ) { String fname = ""; // StringUtil.environmentSubstitute(wFilename.getText()); dialog.setFileName( fname ); } dialog.setFilterNames( new String[] { BaseMessages.getString( PKG, "AccessInputDialog.FileType.AccessFiles" ), BaseMessages.getString( PKG, "System.FileType.AllFiles" ) } ); if ( dialog.open() != null ) { String str = dialog.getFilterPath() + System.getProperty( "file.separator" ) + dialog.getFileName(); wFilename.setText( str ); } } } } );
public void widgetSelected( SelectionEvent e ) { // A mask: a directory! if ( !Utils.isEmpty( wFilemask.getText() ) || !Utils.isEmpty( wExcludeFilemask.getText() ) ) { DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( wFilename.getText() != null ) { String fpath = transMeta.environmentSubstitute( wFilename.getText() ); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); wFilename.setText( str ); } } else { FileDialog dialog = new FileDialog( shell, SWT.OPEN ); dialog.setFilterExtensions( new String[] { "*.xml;*.XML", "*" } ); if ( wFilename.getText() != null ) { String fname = transMeta.environmentSubstitute( wFilename.getText() ); dialog.setFileName( fname ); } dialog.setFilterNames( new String[] { BaseMessages.getString( PKG, "System.FileType.XMLFiles" ), BaseMessages.getString( PKG, "System.FileType.AllFiles" ) } ); if ( dialog.open() != null ) { String str = dialog.getFilterPath() + System.getProperty( "file.separator" ) + dialog.getFileName(); wFilename.setText( str ); } } } } );
String str = dialog.getFilterPath(); wFilename.setText( str );
public void widgetSelected( SelectionEvent e ) { if ( !Utils.isEmpty( wFilemask.getText() ) || !Utils.isEmpty( wExcludeFilemask.getText() ) ) { // A mask: a // directory! DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( wFilename.getText() != null ) { String fpath = transMeta.environmentSubstitute( wFilename.getText() ); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); wFilename.setText( str ); } } else { FileDialog dialog = new FileDialog( shell, SWT.OPEN ); dialog.setFilterExtensions( new String[] { "*.js;*.JS;*.json;*.JSON", "*" } ); if ( wFilename.getText() != null ) { String fname = transMeta.environmentSubstitute( wFilename.getText() ); dialog.setFileName( fname ); } dialog.setFilterNames( new String[] { BaseMessages.getString( PKG, "System.FileType.JsonFiles" ), BaseMessages.getString( PKG, "System.FileType.AllFiles" ) } ); if ( dialog.open() != null ) { String str = dialog.getFilterPath() + System.getProperty( "file.separator" ) + dialog.getFileName(); wFilename.setText( str ); } } } } );
public void widgetSelected( SelectionEvent e ) { if ( !Utils.isEmpty( wFilemask.getText() ) || !Utils.isEmpty( wExcludeFilemask.getText() ) ) { DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( wFilename.getText() != null ) { String fpath = transMeta.environmentSubstitute( wFilename.getText() ); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); wFilename.setText( str ); } } else { FileDialog dialog = new FileDialog( shell, SWT.OPEN ); dialog.setFilterExtensions( new String[] { "*ldif;*.LDIF", "*" } ); if ( wFilename.getText() != null ) { String fname = transMeta.environmentSubstitute( wFilename.getText() ); dialog.setFileName( fname ); } dialog.setFilterNames( new String[] { BaseMessages.getString( PKG, "LDIFInputDialog.FileType" ), BaseMessages.getString( PKG, "System.FileType.AllFiles" ) } ); if ( dialog.open() != null ) { String str = dialog.getFilterPath() + System.getProperty( "file.separator" ) + dialog.getFileName(); wFilename.setText( str ); } } } } );
public void widgetSelected( SelectionEvent e ) { if ( !Utils.isEmpty( wFilemask.getText() ) || !Utils.isEmpty( wExcludeFilemask.getText() ) ) { DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( wFilename.getText() != null ) { String fpath = transMeta.environmentSubstitute( wFilename.getText() ); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); wFilename.setText( str ); } } else { FileDialog dialog = new FileDialog( shell, SWT.OPEN ); dialog.setFilterExtensions( new String[] { "*.txt;*.csv", "*.csv", "*.txt", "*" } ); if ( wFilename.getText() != null ) { String fname = transMeta.environmentSubstitute( wFilename.getText() ); dialog.setFileName( fname ); } dialog.setFilterNames( new String[] { BaseMessages.getString( PKG, "GetFileNamesDialog.FileType.TextAndCSVFiles" ), BaseMessages.getString( PKG, "System.FileType.CSVFiles" ), BaseMessages.getString( PKG, "System.FileType.TextFiles" ), BaseMessages.getString( PKG, "System.FileType.AllFiles" ) } ); if ( dialog.open() != null ) { String str = dialog.getFilterPath() + System.getProperty( "file.separator" ) + dialog.getFileName(); wFilename.setText( str ); } } } } );
public void widgetSelected( SelectionEvent e ) { if ( !Utils.isEmpty( wFilemask.getText() ) || !Utils.isEmpty( wExcludeFilemask.getText() ) ) { // A mask: a directory! DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( wFilename.getText() != null ) { String fpath = transMeta.environmentSubstitute( wFilename.getText() ); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); wFilename.setText( str ); } } else { FileDialog dialog = new FileDialog( shell, SWT.OPEN ); dialog.setFilterExtensions( new String[] { "*.txt;", "*.csv", "*.TRT", "*" } ); if ( wFilename.getText() != null ) { String fname = transMeta.environmentSubstitute( wFilename.getText() ); dialog.setFileName( fname ); } dialog.setFilterNames( new String[] { BaseMessages.getString( PKG, "System.FileType.TextFiles" ), BaseMessages.getString( PKG, "LoadFileInputDialog.FileType.TextAndCSVFiles" ), BaseMessages.getString( PKG, "LoadFileInput.FileType.TRTFiles" ), BaseMessages.getString( PKG, "System.FileType.AllFiles" ) } ); if ( dialog.open() != null ) { String str = dialog.getFilterPath() + System.getProperty( "file.separator" ) + dialog.getFileName(); wFilename.setText( str ); } } } } );
String str = dialog.getFilterPath(); wFilename.setText( str );
private IPath chooseExtDirectory() { String initPath= getInitPath(); DirectoryDialog dialog= new DirectoryDialog(getShell()); dialog.setText(NewWizardMessages.VariableCreationDialog_extdirdialog_text); dialog.setMessage(NewWizardMessages.VariableCreationDialog_extdirdialog_message); dialog.setFilterPath(initPath); String res= dialog.open(); if (res != null) { fDialogSettings.put(IUIConstants.DIALOGSTORE_LASTEXTJAR, dialog.getFilterPath()); return Path.fromOSString(res); } return null; }
private IPath chooseExtDirectory() { String initPath= getInitPath(); DirectoryDialog dialog= new DirectoryDialog(getShell(), SWT.SHEET); dialog.setText(NewWizardMessages.VariableCreationDialog_extdirdialog_text); dialog.setMessage(NewWizardMessages.VariableCreationDialog_extdirdialog_message); dialog.setFilterPath(initPath); String res= dialog.open(); if (res != null) { fDialogSettings.put(IUIConstants.DIALOGSTORE_LASTEXTJAR, dialog.getFilterPath()); return Path.fromOSString(res); } return null; }
private IPath chooseExtDirectory() { String initPath= getInitPath(); DirectoryDialog dialog= new DirectoryDialog(getShell()); dialog.setText(NewWizardMessages.VariableCreationDialog_extdirdialog_text); dialog.setMessage(NewWizardMessages.VariableCreationDialog_extdirdialog_message); dialog.setFilterPath(initPath); String res= dialog.open(); if (res != null) { fDialogSettings.put(IUIConstants.DIALOGSTORE_LASTEXTJAR, dialog.getFilterPath()); return Path.fromOSString(res); } return null; }