- removed unnecessary message logging
authorPatric Plitzner <p.plitzner@bgbm.org>
Mon, 23 Mar 2015 12:12:12 +0000 (12:12 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Mon, 23 Mar 2015 12:12:12 +0000 (12:12 +0000)
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages.properties
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages_de.properties
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages_en.properties
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/Messages.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchBar.java

index 571b000e2e3f989bd510ee2a66a24ff7206362c8..acd510f0792316f66a6a68d3244295224f21cf44 100644 (file)
@@ -3,7 +3,6 @@ SearchBar_1=Search
 SearchBar_2=Could not execute search\r
 SearchBar_3=Please type at least one character when using the "*" wildcard.\r
 SearchBar_4=Error opening search result.\r
-SearchBar_5=configuration menu clicked\r
 SearchBar_6=Taxa\r
 SearchBar_7=Synonyms\r
 SearchBar_8=Names (without taxa)\r
index 314ea1be719cd44375089e885bea565ca1788a33..288a452df7b11c8daf7e70041f14516f147a9657 100644 (file)
@@ -3,7 +3,6 @@ SearchBar_1=Suche
 SearchBar_2=Suche konnte nicht ausgef\u00FChrt werden\r
 SearchBar_3=Bitte geben Sie mindestens ein Zeichen, wenn Sie die "*" Platzhalter benutzen wollen\r
 SearchBar_4=Fehler beim f\u00fcffnen des Suchergebnisses\r
-SearchBar_5=Konfigurationsmen├╝ angeklickt\r
 SearchBar_6=Taxa\r
 SearchBar_7=Synonyme\r
 SearchBar_8=Namen (ohne Taxa)\r
index 571b000e2e3f989bd510ee2a66a24ff7206362c8..acd510f0792316f66a6a68d3244295224f21cf44 100644 (file)
@@ -3,7 +3,6 @@ SearchBar_1=Search
 SearchBar_2=Could not execute search\r
 SearchBar_3=Please type at least one character when using the "*" wildcard.\r
 SearchBar_4=Error opening search result.\r
-SearchBar_5=configuration menu clicked\r
 SearchBar_6=Taxa\r
 SearchBar_7=Synonyms\r
 SearchBar_8=Names (without taxa)\r
index 5d3c21a3156753a35c1cb05a119c3a7c17c265a5..23932674ccb4f315f238ad30434c4102ecba8507 100644 (file)
@@ -23,7 +23,6 @@ public class Messages extends NLS {
     public static String SearchBar_2;\r
     public static String SearchBar_3;\r
     public static String SearchBar_4;\r
-    public static String SearchBar_5;\r
     public static String SearchBar_6;\r
     public static String SearchBar_7;\r
     public static String SearchBar_8;\r
index e27d247dd40c0cfef90dc3ce04919bea3fbcc0ff..bd04a0febe04f5be864afbb76ce684595bb4d0fe 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
  * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy 
+ * European Distributed Institute of Taxonomy
  * http://www.e-taxonomy.eu
- * 
+ *
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
@@ -75,7 +75,7 @@ public class SearchBar extends WorkbenchWindowControlContribution{
         * Handles focus changes for the search textfield.
         */
        private void registerAtFocusService() {
-               IFocusService focusService = 
+               IFocusService focusService =
                        (IFocusService) PlatformUI.getWorkbench().getService(IFocusService.class);
                if (focusService != null) {
                        focusService.addFocusTracker(text_search, "navigation.textControlId");
@@ -124,14 +124,16 @@ public class SearchBar extends WorkbenchWindowControlContribution{
        private void addTextListeners() {
                text_search.addFocusListener(new FocusListener() {
 
-                       public void focusGained(FocusEvent e) {
+                       @Override
+            public void focusGained(FocusEvent e) {
                                text_search.setForeground(NavigationUtil.getColor(Resources.SEARCH_VIEW_FOCUS));
                                if (defaultText.equals(text_search.getText())) {
                                        text_search.setText("");
                                }
                        }
 
-                       public void focusLost(FocusEvent e) {
+                       @Override
+            public void focusLost(FocusEvent e) {
                                if (text_search.getText() == "") {
                                        text_search.setForeground(NavigationUtil.getColor(Resources.SEARCH_VIEW_FOREGROUND));
                                        text_search.setText(defaultText);
@@ -176,35 +178,36 @@ public class SearchBar extends WorkbenchWindowControlContribution{
                if(searchString == null){
                        return;
                }
-               
+
                if("*".equals(searchString.trim())){
                        MessagingUtils.warningDialog(Messages.SearchBar_2, this, Messages.SearchBar_3);
                        return;
                }
-               
-               
+
+
                IFindTaxaAndNamesConfigurator configurator = configurationListener.getConfigurator();
                configurator.setTitleSearchString(searchString);
                openSearchResultsView(configurator);
-               
+
        }
-       
+
        private String getSearchString(){
                String searchString = text_search.getText().trim();
-               if (searchString.equals(defaultText) || searchString.length() == 0)
-                       return null;
+               if (searchString.equals(defaultText) || searchString.length() == 0) {
+            return null;
+        }
                return searchString;
        }
-       
+
        /**
         * Opens a new instance of the search result view to display the result to the user.
-        * 
+        *
         * @param searchResult
         */
        private void openSearchResultsView(IFindTaxaAndNamesConfigurator configurator) {
                boolean openResultInSeparateWindows = PreferencesUtil.getPreferenceStore().getBoolean((IPreferenceKeys.SEARCH_OPEN_RESULTS_IN_SEPARATE_WINDOWS));
                if(openResultInSeparateWindows){
-                       //increment change secondary id so it is unique 
+                       //increment change secondary id so it is unique
                        secondaryId += "1";
                }
 
@@ -221,7 +224,7 @@ public class SearchBar extends WorkbenchWindowControlContribution{
 
        /**
         * Handles drop down menu selection. Available items are defined in the enumeration SearchOption.
-        * 
+        *
         * @author n.hoffmann
         * @created Feb 2, 2010
         * @version 1.0
@@ -258,7 +261,7 @@ public class SearchBar extends WorkbenchWindowControlContribution{
 
        /**
         * Handles search configuration selection.
-        * 
+        *
         * @author n.hoffmann
         * @created Feb 2, 2010
         * @version 1.0
@@ -266,17 +269,16 @@ public class SearchBar extends WorkbenchWindowControlContribution{
        class ConfigurationSelectionListener extends SelectionAdapter {
 
                private IFindTaxaAndNamesConfigurator configurator = PreferencesUtil.getSearchConfigurator();
-               
+
                /*
                 * (non-Javadoc)
-                * 
+                *
                 * @see
                 * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse
                 * .swt.events.SelectionEvent)
                 */
                @Override
                public void widgetSelected(SelectionEvent e) {
-                       MessagingUtils.info(Messages.SearchBar_5);
                        SearchOption option = (SearchOption) e.widget.getData();
 
                        switch (option){
@@ -291,9 +293,9 @@ public class SearchBar extends WorkbenchWindowControlContribution{
                                break;
                        case COMMON_NAME:
                                configurator.setDoTaxaByCommonNames(getConfigurator().isDoTaxaByCommonNames() ? false : true);
-                               break;                          
+                               break;
                        }
-                       
+
                        saveConfigurator();
                }
 
@@ -309,15 +311,15 @@ public class SearchBar extends WorkbenchWindowControlContribution{
 
        /**
         * Available search options.
-        * 
+        *
         * @author n.hoffmann
         * @created Feb 2, 2010
         * @version 1.0
         */
        enum SearchOption {
-               TAXON(Messages.SearchBar_6), 
-               SYNONYM(Messages.SearchBar_7), 
-               NAME(Messages.SearchBar_8), 
+               TAXON(Messages.SearchBar_6),
+               SYNONYM(Messages.SearchBar_7),
+               NAME(Messages.SearchBar_8),
                COMMON_NAME(Messages.SearchBar_9);
 
                private final String label;