git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
55fbd0c
)
JAL-3144 don't change comma to semi-colon if not requested!
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 30 Jan 2019 15:40:53 +0000
(15:40 +0000)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 30 Jan 2019 15:40:53 +0000
(15:40 +0000)
src/jalview/gui/SequenceFetcher.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/SequenceFetcher.java
b/src/jalview/gui/SequenceFetcher.java
index
f06bd97
..
323fef9
100755
(executable)
--- a/
src/jalview/gui/SequenceFetcher.java
+++ b/
src/jalview/gui/SequenceFetcher.java
@@
-417,15
+417,17
@@
public class SequenceFetcher extends JPanel implements Runnable
/*
* tidy inputs and check there is something to search for
*/
/*
* tidy inputs and check there is something to search for
*/
- String t0 = textArea.getText();
- String text = text.trim(); // BH 2019.01.30
+ String text = textArea.getText();
+ final String t0 = text;
if (replacePunctuation.isEnabled() && replacePunctuation.isSelected())
{
text = text.replace(",", ";");
}
if (replacePunctuation.isEnabled() && replacePunctuation.isSelected())
{
text = text.replace(",", ";");
}
- text = text.replaceAll("(\\s|[,; ])+", ";");
- if (!t0.equals(text)) // BH 2019.01.30 no need to do setting if it is the same
- textArea.setText(text);
+ text = text.replaceAll("(\\s|[; ])+", ";");
+ if (!t0.equals(text))
+ {
+ textArea.setText(text);
+ }
if (text.isEmpty())
{
// todo i18n
if (text.isEmpty())
{
// todo i18n
@@
-464,9
+466,8
@@
public class SequenceFetcher extends JPanel implements Runnable
List<DbSourceProxy> sources = sfetch
.getSourceProxy((String) database.getSelectedItem());
Iterator<DbSourceProxy> proxies = sources.iterator();
List<DbSourceProxy> sources = sfetch
.getSourceProxy((String) database.getSelectedItem());
Iterator<DbSourceProxy> proxies = sources.iterator();
- String[] qries;
- List<String> nextFetch = Arrays
- .asList(qries = textArea.getText().split(";"));
+ String[] qries = textArea.getText().trim().split(";");
+ List<String> nextFetch = Arrays.asList(qries);
Iterator<String> en = Arrays.asList(new String[0]).iterator();
int nqueries = qries.length;
Iterator<String> en = Arrays.asList(new String[0]).iterator();
int nqueries = qries.length;