BGBM BDI Projects
/
taxeditor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dd7f77f
)
Allow using the search bar only if at least one letter is entered
author
Patrick Plitzner
<p.plitzner@bgbm.org>
Mon, 5 Oct 2015 10:46:05 +0000
(12:46 +0200)
committer
Patrick Plitzner
<p.plitzner@bgbm.org>
Mon, 5 Oct 2015 10:46:05 +0000
(12:46 +0200)
(#3341)
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages.properties
patch
|
blob
|
history
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages_de.properties
patch
|
blob
|
history
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchBar.java
patch
|
blob
|
history
diff --git
a/eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages.properties
b/eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages.properties
index acd510f0792316f66a6a68d3244295224f21cf44..2fb82b9b45b27bde1450dee803864b6b24f866f5 100644
(file)
--- a/
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages.properties
+++ b/
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages.properties
@@
-1,7
+1,7
@@
SearchBar_0=Use "*" for wildcard searching
\r
SearchBar_1=Search
\r
SearchBar_2=Could not execute search
\r
SearchBar_0=Use "*" for wildcard searching
\r
SearchBar_1=Search
\r
SearchBar_2=Could not execute search
\r
-SearchBar_3=Please type at least one character
when using the "*" wildcard.
\r
+SearchBar_3=Please type at least one character
\r
SearchBar_4=Error opening search result.
\r
SearchBar_6=Taxa
\r
SearchBar_7=Synonyms
\r
SearchBar_4=Error opening search result.
\r
SearchBar_6=Taxa
\r
SearchBar_7=Synonyms
\r
diff --git
a/eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages_de.properties
b/eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages_de.properties
index 3ab85da0c8544c96a3d87e96f1d5e9a993a053eb..0546737ff481618bd80b48e251d466867f950ab7 100644
(file)
--- a/
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages_de.properties
+++ b/
eu.etaxonomy.taxeditor.navigation/OSGI-INF/l10n/messages_de.properties
@@
-1,7
+1,7
@@
SearchBar_0=Benutze "*" f\u00FCr Platzhalter-Suche
\r
SearchBar_1=Suche
\r
SearchBar_2=Suche konnte nicht ausgef\u00FChrt werden
\r
SearchBar_0=Benutze "*" f\u00FCr Platzhalter-Suche
\r
SearchBar_1=Suche
\r
SearchBar_2=Suche konnte nicht ausgef\u00FChrt werden
\r
-SearchBar_3=Bitte geben Sie mindestens ein
Zeichen ein, wenn Sie den "*" Platzhalter benutzen wolle
n
\r
+SearchBar_3=Bitte geben Sie mindestens ein
en Buchstaben ei
n
\r
SearchBar_4=Fehler beim f\u00fcffnen des Suchergebnisses
\r
SearchBar_6=Taxa
\r
SearchBar_7=Synonyme
\r
SearchBar_4=Fehler beim f\u00fcffnen des Suchergebnisses
\r
SearchBar_6=Taxa
\r
SearchBar_7=Synonyme
\r
diff --git
a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchBar.java
b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchBar.java
index bd04a0febe04f5be864afbb76ce684595bb4d0fe..9b40efb837458f62e5515fced9bf07a5e30717d0 100644
(file)
--- a/
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchBar.java
+++ b/
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchBar.java
@@
-179,7
+179,7
@@
public class SearchBar extends WorkbenchWindowControlContribution{
return;
}
return;
}
- if(
"*".equals(searchString.trim()
)){
+ if(
!searchString.trim().matches(".*\\p{L}+.*"
)){
MessagingUtils.warningDialog(Messages.SearchBar_2, this, Messages.SearchBar_3);
return;
}
MessagingUtils.warningDialog(Messages.SearchBar_2, this, Messages.SearchBar_3);
return;
}