Project

General

Profile

« Previous | Next » 

Revision 89fdf8a2

Added by Patrick Plitzner over 10 years ago

  • organized plugin.xml extensions
    • check if data source is connected when starting BioCaseQuery
    • converted combo selections to text fields for specimen search

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/dataimport/wizard/SpecimenSearchWizard.java
21 21
import eu.etaxonomy.cdm.ext.biocase.BioCaseQuery;
22 22
import eu.etaxonomy.taxeditor.dataimport.DataImportEditor;
23 23
import eu.etaxonomy.taxeditor.dataimport.DataImportSpecimenEditorInput;
24
import eu.etaxonomy.taxeditor.store.CdmStore;
24 25

  
25 26
/**
26 27
 * Wizard for querying BioCASe provider.
......
40 41
     */
41 42
    public SpecimenSearchWizard() {
42 43
        //default constructor needed for RCP extension points
44

  
45
        //check if connected to a data source. If not this will open an error dialog
46
        CdmStore.getCurrentApplicationConfiguration();
43 47
    }
44 48

  
45 49

  
eu.etaxonomy.taxeditor.store/plugin.xml
413 413
         </command>
414 414
      </menuContribution>
415 415
   </extension>
416
   <extension
417
         name="Window Menu Commands"
418
         point="org.eclipse.ui.commands">
419
      <command
420
            defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.OpenDefinedTermEditorHandler"
421
            id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
422
            name="Open Defined Term Editor">
423
         <commandParameter
424
               id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
425
               name="inputType"
426
               optional="true">
427
         </commandParameter>
428
         <commandParameter
429
               id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.termTypeUuid"
430
               name="inputType"
431
               optional="true">
432
         </commandParameter>
433
      </command>
434
   </extension>
435
   <extension
436
         name="File Menu Commands"
437
         point="org.eclipse.ui.commands">
438
      <command
439
            defaultHandler="eu.etaxonomy.taxeditor.handler.ShowLoginWindowHandler"
440
            id="eu.etaxonomy.taxeditor.store.operations.showLoginWindow"
441
            name="Show Login Window">
442
      </command>
443
   </extension>
444 416
   <extension
445 417
         point="org.eclipse.ui.handlers">
446 418
      <handler
......
496 468
            id="eu.etaxonomy.taxeditor.store.datasource.update"
497 469
            name="Update Datasource">
498 470
      </command>
499
   </extension>
500
   <extension
501
         point="org.eclipse.ui.commands">
471
      <command
472
            defaultHandler="eu.etaxonomy.taxeditor.handler.ShowLoginWindowHandler"
473
            id="eu.etaxonomy.taxeditor.store.operations.showLoginWindow"
474
            name="Show Login Window">
475
      </command>
476
      <command
477
            defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.OpenDefinedTermEditorHandler"
478
            id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor"
479
            name="Open Defined Term Editor">
480
         <commandParameter
481
               id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.parameter"
482
               name="inputType"
483
               optional="true">
484
         </commandParameter>
485
         <commandParameter
486
               id="eu.etaxonomy.taxeditor.store.openDefinedTermEditor.termTypeUuid"
487
               name="inputType"
488
               optional="true">
489
         </commandParameter>
490
      </command>
502 491
      <command
503 492
            defaultHandler="eu.etaxonomy.taxeditor.editor.definedterm.handler.CreateDefinedTermHandler"
504 493
            id="eu.etaxonomy.taxeditor.editor.definedTerms.newDefinedTerm"
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchComposite.java
10 10
package eu.etaxonomy.taxeditor.ui.campanula.specimenSearch;
11 11

  
12 12
import org.eclipse.swt.SWT;
13
import org.eclipse.swt.widgets.Combo;
14 13
import org.eclipse.swt.widgets.Composite;
15 14
import org.eclipse.swt.widgets.Display;
16 15
import org.eclipse.swt.widgets.Label;
......
31 30
    private Text textCollectorNumber;
32 31
    private Text textAccessionNumber;
33 32
    private Text textLocality;
34
    private Combo comboHerbarium;
35
    private Combo comboCountry;
33
    private Text textHerbarium;
34
    private Text textCountry;
36 35

  
37 36
    /**
38 37
     * Create the composite.
......
82 81
        formToolkit.adapt(lblHerbarium, true, true);
83 82
        lblHerbarium.setText("Herbarium");
84 83

  
85
        comboHerbarium = new Combo(this, SWT.NONE);
86
        comboHerbarium.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
87
        formToolkit.adapt(comboHerbarium);
88
        formToolkit.paintBordersFor(comboHerbarium);
84
        textHerbarium = new Text(this, SWT.NONE);
85
        textHerbarium.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
89 86

  
90 87
        Label lblCountry = new Label(this, SWT.NONE);
91 88
        formToolkit.adapt(lblCountry, true, true);
92 89
        lblCountry.setText("Country");
93 90

  
94
        comboCountry = new Combo(this, SWT.NONE);
95
        comboCountry.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
96
        formToolkit.adapt(comboCountry);
97
        formToolkit.paintBordersFor(comboCountry);
91
        textCountry = new Text(this, SWT.NONE);
92
        textCountry.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP, 1, 1));
98 93

  
99 94
        Label lblLocality = new Label(this, SWT.NONE);
100 95
        formToolkit.adapt(lblLocality, true, true);
......
128 123
    public Text getTextAccessionNumber() {
129 124
        return textAccessionNumber;
130 125
    }
131
    public Combo getComboHerbarium() {
132
        return comboHerbarium;
126
    public Text getTextHerbarium() {
127
        return textHerbarium;
133 128
    }
134
    public Combo getComboCountry() {
135
        return comboCountry;
129
    public Text getTextCountry() {
130
        return textCountry;
136 131
    }
137 132
    public Text getTextLocality() {
138 133
        return textLocality;
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/specimenSearch/SpecimenSearchController.java
79 79
     * @see eu.etaxonomy.taxeditor.ui.campanula.specimenSearch.SpecimenSearchComposite#getComboHerbarium()
80 80
     */
81 81
    public String getHerbarium() {
82
        return null;
82
        return specimenSearchComposite.getTextHerbarium().getText();
83 83
//        return specimenSearchComposite.getComboHerbarium().getItem(specimenSearchComposite.getComboHerbarium().getSelectionIndex());
84 84
    }
85 85

  
......
89 89
     * @see eu.etaxonomy.taxeditor.ui.campanula.specimenSearch.SpecimenSearchComposite#getComboCountry()
90 90
     */
91 91
    public String getCountry() {
92
        return null;
92
        return specimenSearchComposite.getTextCountry().getText();
93 93
//        return specimenSearchComposite.getComboCountry().getItem(specimenSearchComposite.getComboCountry().getSelectionIndex());
94 94
    }
95 95

  

Also available in: Unified diff