Remove report configuration from ABCD import wizard
authorPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 16 Nov 2015 07:11:39 +0000 (08:11 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 16 Nov 2015 07:11:39 +0000 (08:11 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/AbcdImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ClassificationChooserWizardPage.java

index 4dc3d410c49d192a04ffa994179649c11a00029d..b9181aba398cfc01b41d083a3f13b6b0da7c04d0 100644 (file)
@@ -62,7 +62,6 @@ public class AbcdImportWizard extends AbstractImportWizard<Abcd206ImportConfigur
            if(classificationChooserWizardPage.getClassification()!=null){
                configurator.setClassificationUuid(classificationChooserWizardPage.getClassification().getUuid());
            }
-           configurator.setReportUri(classificationChooserWizardPage.getReportUri());
 
            if(CdmStore.getCurrentSessionManager().isRemoting()) {
                //Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
index 01e47b4a81e2403dc9539031c945f8787e235e59..377ccc84ca04ddff8c37b828424d7fd389f8c892 100644 (file)
 
 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;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.wb.swt.ResourceManager;
 
 import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.dialog.selection.SelectionDialogFactory;
 
 /**
@@ -50,17 +43,6 @@ public class ClassificationChooserWizardPage extends WizardPage implements Liste
 
     private Button btnClear;
 
-    //report
-    private FileDialog fileDialogReport;
-    private Text textFileReport;
-
-       /**
-        * <p>Constructor for ImportFromFileDataSourceWizardPage.</p>
-        *
-        * @param title a {@link java.lang.String} object.
-        * @param description a {@link java.lang.String} object.
-        * @param extensions an array of {@link java.lang.String} objects.
-        */
        protected ClassificationChooserWizardPage(String title, String description) {
                super(PAGE_NAME);
 
@@ -70,20 +52,12 @@ public class ClassificationChooserWizardPage extends WizardPage implements Liste
 
        }
 
-       /**
-        * <p>XML</p>
-        *
-        * @return a {@link eu.etaxonomy.taxeditor.io.wizard.ClassificationChooserWizardPage} object.
-        */
        protected static ClassificationChooserWizardPage createPage(){
                return new ClassificationChooserWizardPage("Configure import destinations", "Note: Selecting no classification will create a default one.");
        }
 
 
 
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
-        */
        /** {@inheritDoc} */
        @Override
     public void createControl(Composite parent) {
@@ -106,45 +80,9 @@ public class ClassificationChooserWizardPage extends WizardPage implements Liste
                btnClear.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/trash.gif"));
                btnClear.addListener(SWT.Selection, this);
 
-               if(!CdmStore.getCurrentSessionManager().isRemoting()) {
-                   //report
-                   Label labelReportFile = new Label(composite, SWT.NONE);
-                   labelReportFile.setText("Report File");
-
-                   fileDialogReport = new FileDialog(parent.getShell());
-
-                   fileDialogReport.setFilterExtensions(new String[]{"*.*"});
-
-                   textFileReport = new Text(composite, SWT.BORDER);
-                   textFileReport.setEditable(false);
-                   textFileReport.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
-
-
-                   Button buttonReport = new Button(composite, SWT.PUSH);
-                   buttonReport.setText("Browse...");
-
-                   buttonReport.addSelectionListener(new SelectionAdapter(){
-
-                       /* (non-Javadoc)
-                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-                        */
-                       @Override
-                       public void widgetSelected(SelectionEvent e) {
-                           String path = fileDialogReport.open();
-                           if(path!=null){
-                               textFileReport.setText(path);
-                               setPageComplete(true);
-                           }
-                       }
-
-                   });
-               }
                setControl(composite);
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
-        */
        @Override
        public void handleEvent(Event event) {
            if(event.widget==btnBrowseClassification){
@@ -166,14 +104,4 @@ public class ClassificationChooserWizardPage extends WizardPage implements Liste
         return classification;
     }
 
-    public URI getReportUri(){
-        if(textFileReport == null) {
-            return null;
-        }
-        String text = textFileReport.getText();
-        if(text==null || text.isEmpty()){
-            return null;
-        }
-        return new File(text).toURI();
-    }
 }