Project

General

Profile

« Previous | Next » 

Revision 4d01989b

Added by Patrick Plitzner over 5 years ago

ref #7362 Show info when searching with <4 letters

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/Messages.java
414 414
    public static String GfBioTerminologyImportPresenter_NO_CONNECTION_TITLE;
415 415
    public static String GfBioTerminologyImportPresenter_NO_RESULTS_MESSAGE;
416 416
    public static String GfBioTerminologyImportPresenter_NO_RESULTS_TITLE;
417
    public static String GfBioTerminologyImportPresenter_SEARCH_TOO_SHORT_MESSAGE;
418
    public static String GfBioTerminologyImportPresenter_SEARCH_TOO_SHORT_TITLE;
417 419
    public static String GfBioTerminologyImportPresenter_TEXT_SEARCH_DEFAULT;
418 420

  
419 421
    public static String PublishFlagPreference_description;
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties
312 312
GfBioTerminologyImportPresenter_NO_RESULTS_TITLE=No results found
313 313
GfBioTerminologyImportPresenter_COMBO_DEFAULT=All ontologies
314 314
GfBioTerminologyImportPresenter_TEXT_SEARCH_DEFAULT=Enter search term...
315
GfBioTerminologyImportPresenter_SEARCH_TOO_SHORT_MESSAGE=Search phrase with <4 letters are not possible for all ontologies. Please select a specific ontology
316
GfBioTerminologyImportPresenter_SEARCH_TOO_SHORT_TITLE=Search phrase too short
315 317

  
316 318
PublishFlagPreference_description=Configure the default settings for the publish flag in new created taxa
317 319
PublishFlagPreference_do_not_set=Don't set publish flag
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties
312 312
GfBioTerminologyImportPresenter_NO_RESULTS_TITLE=Keine Ergebnisse
313 313
GfBioTerminologyImportPresenter_COMBO_DEFAULT=Alle Ontologien
314 314
GfBioTerminologyImportPresenter_TEXT_SEARCH_DEFAULT=Suchbegriff eingeben...
315
GfBioTerminologyImportPresenter_SEARCH_TOO_SHORT_MESSAGE=Suchbegriffe mit <4 Buchstaben sind nicht m?glich f?r alle Ontologien. Bitte eine einzelne Ontologie ausw?hlen.
316
GfBioTerminologyImportPresenter_SEARCH_TOO_SHORT_TITLE=Suchbegriff zu kurz
315 317

  
316 318
PublishFlagPreference_description=Konfiguration des Default Verhaltens beim Setzen des Publish Flags in einem neu erzeugten Taxon.
317 319
PublishFlagPreference_do_not_set=Publish Flag NICHT setzen
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportPresenter.java
176 176
    }
177 177

  
178 178
    private void clearDetails(){
179
        composite.getLblLabel().setText("");
180
        composite.getLblUri().setText("");
181
        composite.getLblDescription().setText("");
179
        composite.getLblLabel().setText(""); //$NON-NLS-1$
180
        composite.getLblUri().setText(""); //$NON-NLS-1$
181
        composite.getLblDescription().setText(""); //$NON-NLS-1$
182 182
        composite.getListSynonyms().getList().removeAll();
183 183
    }
184 184

  
......
192 192
            String label = wrapper.getLabel();
193 193
            String uri = wrapper.getUri();
194 194
            String description = wrapper.getDescription();
195
            composite.getLblLabel().setText(label!=null?label:"");
196
            composite.getLblUri().setText(uri!=null?uri:"");
197
            composite.getLblDescription().setText(description!=null?description:"");
195
            composite.getLblLabel().setText(label!=null?label:""); //$NON-NLS-1$
196
            composite.getLblUri().setText(uri!=null?uri:""); //$NON-NLS-1$
197
            composite.getLblDescription().setText(description!=null?description:""); //$NON-NLS-1$
198 198
            if(wrapper.getSynonyms()!=null){
199 199
                if(wrapper.getSynonyms().isEmpty()){
200 200
                    composite.getListSynonyms().getList().removeAll();
......
219 219
        if(searchString.equals(TXT_SEARCH_DEFAULT)){
220 220
            return;
221 221
        }
222
        String terminology = "";
222
        if(searchString.length()<4 && composite.getComboTerminologies().getSelection().isEmpty()){
223
            MessagingUtils.informationDialog(Messages.GfBioTerminologyImportPresenter_SEARCH_TOO_SHORT_TITLE, Messages.GfBioTerminologyImportPresenter_SEARCH_TOO_SHORT_MESSAGE);
224
            return;
225
        }
226
        String terminology = ""; //$NON-NLS-1$
223 227
        ISelection selection = composite.getComboTerminologies().getSelection();
224 228
        Collection<OntologyTermWrapper> wrapperList = new ArrayList<>();
225 229
        if(selection instanceof IStructuredSelection && !selection.isEmpty()){

Also available in: Unified diff