Project

General

Profile

Revision f24f22d9

IDf24f22d94d1e6cffc8e12ae20f1bf2b13ca2db32
Parent b11b49ce
Child 77373f56

Added by Patrick Plitzner over 3 years ago

Change FileDialog to directoy dialog

View differences:

eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/io/wizard/ExportSingleReadAlignmentFileFormatPage.java
10 10
package eu.etaxonomy.taxeditor.molecular.io.wizard;
11 11

  
12 12

  
13
import info.bioinfweb.commons.io.ContentExtensionFileFilter;
14
import info.bioinfweb.commons.io.ContentExtensionFileFilter.TestStrategy;
15
import info.bioinfweb.commons.io.ExtensionFileFilter;
16
import info.bioinfweb.jphyloio.formatinfo.JPhyloIOFormatInfo;
17

  
18 13
import java.io.File;
19 14

  
20 15
import org.eclipse.core.databinding.DataBindingContext;
......
33 28
import org.eclipse.swt.widgets.Button;
34 29
import org.eclipse.swt.widgets.Combo;
35 30
import org.eclipse.swt.widgets.Composite;
36
import org.eclipse.swt.widgets.FileDialog;
31
import org.eclipse.swt.widgets.DirectoryDialog;
37 32
import org.eclipse.swt.widgets.Label;
38 33
import org.eclipse.swt.widgets.Text;
39 34

  
40 35
import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
36
import info.bioinfweb.commons.io.ContentExtensionFileFilter.TestStrategy;
37
import info.bioinfweb.commons.io.ExtensionFileFilter;
38
import info.bioinfweb.jphyloio.formatinfo.JPhyloIOFormatInfo;
41 39

  
42 40

  
43 41

  
......
113 111
        btnBrowse.addSelectionListener(new SelectionAdapter() {
114 112
            @Override
115 113
            public void widgetSelected(SelectionEvent e) {
116
                FileDialog dialog = new FileDialog(getShell(), SWT.OPEN);
114
                DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.OPEN);
117 115
                dialog.setText(Messages.wizardExportAlignmentFileDialogTitle);
118
                ContentExtensionFileFilter filter = getSelectedFormat().createFileFilter(TestStrategy.EXTENSION);
119
                dialog.setFilterExtensions(new String[]{filter.getExtensionsAsString()});
120
                dialog.setFilterNames(new String[]{filter.getDescription()});
116
//                ContentExtensionFileFilter filter = getSelectedFormat().createFileFilter(TestStrategy.EXTENSION);
117
//                dialog.setFilterExtensions(new String[]{filter.getExtensionsAsString()});
118
//                dialog.setFilterNames(new String[]{filter.getDescription()});
121 119
                String selectedFile = dialog.open();
122 120
                if (selectedFile != null) {  // Otherwise selecting was canceled.
123
                    fileTextField.setText(selectedFile);
121
                    fileTextField.setText(selectedFile+File.separator+fileTextField.getText());
124 122
                }
125 123
            }
126 124
        });

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)