minor
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / io / wizard / ImportFromFileDataSourceWizardPage.java
index 925e4ad48db4c4566fbd8b1918ea3f220c0ffc5c..0a48a2a6fc58fe35ceb004511bee9924ec81b614 100644 (file)
@@ -13,7 +13,6 @@ package eu.etaxonomy.taxeditor.io.wizard;
 import java.io.File;
 import java.net.URI;
 
-import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -33,7 +32,7 @@ import eu.etaxonomy.cdm.common.CdmUtils;
  * @created 04.08.2009
  * @version 1.0
  */
-public class ImportFromFileDataSourceWizardPage extends WizardPage {
+public class ImportFromFileDataSourceWizardPage extends AbcdSourceSelectionPage {
 
        /** Constant <code>PAGE_NAME="CdmXmlDataSourceWizardPage"</code> */
        public static final String PAGE_NAME = "CdmXmlDataSourceWizardPage";
@@ -42,7 +41,7 @@ public class ImportFromFileDataSourceWizardPage extends WizardPage {
 
        private FileDialog fileDialog;
 
-       private Text text_file;
+
 
        protected ImportFromFileDataSourceWizardPage(String title, String description, String[] extensions) {
                super(PAGE_NAME);
@@ -76,9 +75,9 @@ public class ImportFromFileDataSourceWizardPage extends WizardPage {
 
                fileDialog.setFilterExtensions(extensions);
 
-               text_file = new Text(composite, SWT.BORDER);
-               text_file.setEditable(false);
-               text_file.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+               text_source = new Text(composite, SWT.BORDER);
+               text_source.setEditable(false);
+               text_source.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
 
 
                Button button = new Button(composite, SWT.PUSH);
@@ -90,7 +89,7 @@ public class ImportFromFileDataSourceWizardPage extends WizardPage {
                        public void widgetSelected(SelectionEvent e) {
                                String path = fileDialog.open();
                                if(path!=null){
-                                   text_file.setText(path);
+                                   text_source.setText(path);
                                    setPageComplete(true);
                                }
                        }
@@ -102,16 +101,17 @@ public class ImportFromFileDataSourceWizardPage extends WizardPage {
        }
 
        public File getFile() {
-               return new File(text_file.getText());
+               return new File(text_source.getText());
        }
 
-       public URI getUri() {
+       @Override
+    public URI getUri() {
                return getFile().toURI();
        }
 
        @Override
        public boolean isPageComplete() {
-               return CdmUtils.isNotBlank(text_file.getText());
+               return CdmUtils.isNotBlank(text_source.getText());
        }
 
 }