1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.gui; |
22 |
|
|
23 |
|
import jalview.api.FeatureSettingsModelI; |
24 |
|
import jalview.bin.Cache; |
25 |
|
import jalview.datamodel.AlignmentI; |
26 |
|
import jalview.datamodel.DBRefEntry; |
27 |
|
import jalview.datamodel.SequenceI; |
28 |
|
import jalview.fts.core.GFTSPanel; |
29 |
|
import jalview.fts.service.pdb.PDBFTSPanel; |
30 |
|
import jalview.fts.service.uniprot.UniprotFTSPanel; |
31 |
|
import jalview.io.FileFormatI; |
32 |
|
import jalview.io.gff.SequenceOntologyI; |
33 |
|
import jalview.util.DBRefUtils; |
34 |
|
import jalview.util.MessageManager; |
35 |
|
import jalview.util.Platform; |
36 |
|
import jalview.ws.seqfetcher.DbSourceProxy; |
37 |
|
|
38 |
|
import java.awt.BorderLayout; |
39 |
|
import java.awt.Font; |
40 |
|
import java.awt.event.ActionEvent; |
41 |
|
import java.awt.event.ActionListener; |
42 |
|
import java.awt.event.KeyAdapter; |
43 |
|
import java.awt.event.KeyEvent; |
44 |
|
import java.util.ArrayList; |
45 |
|
import java.util.Arrays; |
46 |
|
import java.util.Collections; |
47 |
|
import java.util.Iterator; |
48 |
|
import java.util.List; |
49 |
|
|
50 |
|
import javax.swing.JButton; |
51 |
|
import javax.swing.JCheckBox; |
52 |
|
import javax.swing.JInternalFrame; |
53 |
|
import javax.swing.JLabel; |
54 |
|
import javax.swing.JPanel; |
55 |
|
import javax.swing.JScrollPane; |
56 |
|
import javax.swing.JTextArea; |
57 |
|
import javax.swing.SwingConstants; |
58 |
|
import javax.swing.tree.DefaultMutableTreeNode; |
59 |
|
|
|
|
| 3.7% |
Uncovered Elements: 492 (511) |
Complexity: 132 |
Complexity Density: 0.38 |
|
60 |
|
public class SequenceFetcher extends JPanel implements Runnable |
61 |
|
{ |
62 |
|
JLabel dbeg = new JLabel(); |
63 |
|
|
64 |
|
JDatabaseTree database; |
65 |
|
|
66 |
|
JButton databaseButt; |
67 |
|
|
68 |
|
JLabel jLabel1 = new JLabel(); |
69 |
|
|
70 |
|
JCheckBox replacePunctuation = new JCheckBox(); |
71 |
|
|
72 |
|
JButton ok = new JButton(); |
73 |
|
|
74 |
|
JButton clear = new JButton(); |
75 |
|
|
76 |
|
JButton example = new JButton(); |
77 |
|
|
78 |
|
JButton close = new JButton(); |
79 |
|
|
80 |
|
JButton back = new JButton(); |
81 |
|
|
82 |
|
JPanel jPanel1 = new JPanel(); |
83 |
|
|
84 |
|
JTextArea textArea = new JTextArea(); |
85 |
|
|
86 |
|
JScrollPane jScrollPane1 = new JScrollPane(); |
87 |
|
|
88 |
|
JPanel jPanel2 = new JPanel(); |
89 |
|
|
90 |
|
JPanel jPanel3 = new JPanel(); |
91 |
|
|
92 |
|
JPanel jPanel4 = new JPanel(); |
93 |
|
|
94 |
|
BorderLayout borderLayout1 = new BorderLayout(); |
95 |
|
|
96 |
|
BorderLayout borderLayout2 = new BorderLayout(); |
97 |
|
|
98 |
|
BorderLayout borderLayout3 = new BorderLayout(); |
99 |
|
|
100 |
|
JInternalFrame frame; |
101 |
|
|
102 |
|
IProgressIndicator guiWindow; |
103 |
|
|
104 |
|
AlignFrame alignFrame; |
105 |
|
|
106 |
|
StringBuffer result; |
107 |
|
|
108 |
|
final String noDbSelected = "-- Select Database --"; |
109 |
|
|
110 |
|
private static jalview.ws.SequenceFetcher sfetch = null; |
111 |
|
|
112 |
|
private static boolean _initingFetcher = false; |
113 |
|
|
114 |
|
private static Thread initingThread = null; |
115 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
116 |
0 |
public JTextArea getTextArea()... |
117 |
|
{ |
118 |
0 |
return textArea; |
119 |
|
} |
120 |
|
|
121 |
|
|
122 |
|
|
123 |
|
|
124 |
|
|
125 |
|
@param |
126 |
|
|
127 |
|
@return |
128 |
|
|
|
|
| 51.4% |
Uncovered Elements: 17 (35) |
Complexity: 13 |
Complexity Density: 0.62 |
|
129 |
1102 |
public static jalview.ws.SequenceFetcher getSequenceFetcherSingleton(... |
130 |
|
final IProgressIndicator guiWindow) |
131 |
|
{ |
132 |
1102 |
if (_initingFetcher && initingThread != null && initingThread.isAlive()) |
133 |
|
{ |
134 |
0 |
if (guiWindow != null) |
135 |
|
{ |
136 |
0 |
guiWindow.setProgressBar( |
137 |
|
MessageManager.getString( |
138 |
|
"status.waiting_sequence_database_fetchers_init"), |
139 |
|
Thread.currentThread().hashCode()); |
140 |
|
} |
141 |
|
|
142 |
|
|
143 |
0 |
while (_initingFetcher && initingThread != null |
144 |
|
&& initingThread.isAlive()) |
145 |
|
{ |
146 |
0 |
try |
147 |
|
{ |
148 |
0 |
Thread.sleep(10); |
149 |
|
} catch (Exception e) |
150 |
|
{ |
151 |
|
} |
152 |
0 |
; |
153 |
|
} |
154 |
0 |
if (guiWindow != null) |
155 |
|
{ |
156 |
0 |
guiWindow.setProgressBar( |
157 |
|
MessageManager.getString( |
158 |
|
"status.waiting_sequence_database_fetchers_init"), |
159 |
|
Thread.currentThread().hashCode()); |
160 |
|
} |
161 |
|
} |
162 |
1102 |
if (sfetch == null) |
163 |
|
{ |
164 |
1 |
_initingFetcher = true; |
165 |
1 |
initingThread = Thread.currentThread(); |
166 |
|
|
167 |
|
|
168 |
|
|
169 |
1 |
if (guiWindow != null) |
170 |
|
{ |
171 |
1 |
guiWindow.setProgressBar( |
172 |
|
MessageManager.getString( |
173 |
|
"status.init_sequence_database_fetchers"), |
174 |
|
Thread.currentThread().hashCode()); |
175 |
|
} |
176 |
|
|
177 |
1 |
jalview.ws.SequenceFetcher sf = new jalview.ws.SequenceFetcher(); |
178 |
1 |
if (guiWindow != null) |
179 |
|
{ |
180 |
1 |
guiWindow.setProgressBar(null, Thread.currentThread().hashCode()); |
181 |
|
} |
182 |
1 |
sfetch = sf; |
183 |
1 |
_initingFetcher = false; |
184 |
1 |
initingThread = null; |
185 |
|
} |
186 |
1102 |
return sfetch; |
187 |
|
} |
188 |
|
|
189 |
|
private IProgressIndicator progressIndicator; |
190 |
|
|
191 |
|
private volatile boolean _isConstructing = false; |
192 |
|
|
193 |
|
private List<AlignFrame> newAlframes = null; |
194 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
195 |
0 |
public SequenceFetcher(IProgressIndicator guiIndic)... |
196 |
|
{ |
197 |
0 |
this(guiIndic, null, null); |
198 |
|
} |
199 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
200 |
0 |
public SequenceFetcher(IProgressIndicator guiIndic,... |
201 |
|
final String selectedDb, final String queryString) |
202 |
|
{ |
203 |
0 |
this._isConstructing = true; |
204 |
0 |
this.progressIndicator = guiIndic; |
205 |
0 |
final SequenceFetcher us = this; |
206 |
|
|
207 |
0 |
Thread sf = new Thread(new Runnable() |
208 |
|
{ |
209 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
210 |
0 |
@Override... |
211 |
|
public void run() |
212 |
|
{ |
213 |
0 |
if (getSequenceFetcherSingleton(progressIndicator) != null) |
214 |
|
{ |
215 |
0 |
us.initGui(progressIndicator, selectedDb, queryString); |
216 |
0 |
us._isConstructing = false; |
217 |
|
} |
218 |
|
else |
219 |
|
{ |
220 |
0 |
javax.swing.SwingUtilities.invokeLater(new Runnable() |
221 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
222 |
0 |
@Override... |
223 |
|
public void run() |
224 |
|
{ |
225 |
0 |
JvOptionPane.showInternalMessageDialog(Desktop.desktop, |
226 |
|
MessageManager.getString( |
227 |
|
"warn.couldnt_create_sequence_fetcher_client"), |
228 |
|
MessageManager.getString( |
229 |
|
"label.couldnt_create_sequence_fetcher"), |
230 |
|
JvOptionPane.ERROR_MESSAGE); |
231 |
|
} |
232 |
|
}); |
233 |
|
|
234 |
|
|
235 |
|
} |
236 |
|
} |
237 |
|
}); |
238 |
0 |
sf.start(); |
239 |
|
} |
240 |
|
|
241 |
|
|
242 |
|
|
243 |
|
|
244 |
|
|
245 |
|
@param |
246 |
|
@param |
247 |
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 3 |
Complexity Density: 0.38 |
|
248 |
0 |
public static List<AlignFrame> fetchAndShow(String database, String query)... |
249 |
|
{ |
250 |
0 |
final SequenceFetcher sf = new SequenceFetcher(Desktop.instance, |
251 |
|
database, query); |
252 |
0 |
while (sf._isConstructing) |
253 |
|
{ |
254 |
0 |
try |
255 |
|
{ |
256 |
0 |
Thread.sleep(50); |
257 |
|
} catch (Exception q) |
258 |
|
{ |
259 |
0 |
return Collections.emptyList(); |
260 |
|
} |
261 |
|
} |
262 |
0 |
sf.newAlframes = new ArrayList<>(); |
263 |
0 |
sf.run(); |
264 |
0 |
return sf.newAlframes; |
265 |
|
} |
266 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
267 |
|
private class DatabaseAuthority extends DefaultMutableTreeNode |
268 |
|
{ |
269 |
|
|
270 |
|
}; |
271 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
272 |
|
private class DatabaseSource extends DefaultMutableTreeNode |
273 |
|
{ |
274 |
|
|
275 |
|
}; |
276 |
|
|
277 |
|
|
278 |
|
|
279 |
|
|
280 |
|
@param |
281 |
|
|
282 |
|
@param |
283 |
|
|
284 |
|
@return |
285 |
|
|
|
|
| 0% |
Uncovered Elements: 21 (21) |
Complexity: 7 |
Complexity Density: 0.47 |
|
286 |
0 |
protected boolean setInitialQuery(String selectedDb, String queryString)... |
287 |
|
{ |
288 |
0 |
if (selectedDb == null || selectedDb.trim().length() == 0) |
289 |
|
{ |
290 |
0 |
return false; |
291 |
|
} |
292 |
0 |
try |
293 |
|
{ |
294 |
0 |
List<DbSourceProxy> sp = sfetch.getSourceProxy(selectedDb); |
295 |
0 |
for (DbSourceProxy sourcep : sp) |
296 |
|
{ |
297 |
0 |
if (sourcep.getTier() == 0) |
298 |
|
{ |
299 |
0 |
database.selection = Arrays |
300 |
|
.asList(new DbSourceProxy[] |
301 |
|
{ sourcep }); |
302 |
0 |
break; |
303 |
|
} |
304 |
|
} |
305 |
0 |
if (database.selection == null || database.selection.size() == 0) |
306 |
|
{ |
307 |
0 |
System.err.println( |
308 |
|
"Ignoring fetch parameter db='" + selectedDb + "'"); |
309 |
0 |
return false; |
310 |
|
} |
311 |
0 |
textArea.setText(queryString); |
312 |
|
} catch (Exception q) |
313 |
|
{ |
314 |
0 |
System.err.println("Ignoring fetch parameter db='" + selectedDb |
315 |
|
+ "' and query='" + queryString + "'"); |
316 |
0 |
return false; |
317 |
|
} |
318 |
0 |
return true; |
319 |
|
} |
320 |
|
|
321 |
|
|
322 |
|
|
323 |
|
|
324 |
|
@param |
325 |
|
@param |
326 |
|
@param |
327 |
|
|
|
|
| 0% |
Uncovered Elements: 20 (20) |
Complexity: 5 |
Complexity Density: 0.36 |
|
328 |
0 |
private void initGui(IProgressIndicator guiWindow, String selectedDb,... |
329 |
|
String queryString) |
330 |
|
{ |
331 |
0 |
this.guiWindow = guiWindow; |
332 |
0 |
if (guiWindow instanceof AlignFrame) |
333 |
|
{ |
334 |
0 |
alignFrame = (AlignFrame) guiWindow; |
335 |
|
} |
336 |
0 |
database = new JDatabaseTree(sfetch); |
337 |
0 |
try |
338 |
|
{ |
339 |
0 |
jbInit(); |
340 |
|
|
341 |
|
|
342 |
|
|
343 |
0 |
if (!setInitialQuery(selectedDb, queryString)) |
344 |
|
{ |
345 |
|
|
346 |
|
|
347 |
|
|
348 |
0 |
database.waitForInput(); |
349 |
|
} |
350 |
|
} catch (Exception ex) |
351 |
|
{ |
352 |
0 |
ex.printStackTrace(); |
353 |
|
} |
354 |
|
|
355 |
0 |
frame = new JInternalFrame(); |
356 |
0 |
frame.setContentPane(this); |
357 |
0 |
if (Platform.isAMac()) |
358 |
|
{ |
359 |
0 |
Desktop.addInternalFrame(frame, getFrameTitle(), false, 400, 240); |
360 |
|
} |
361 |
|
else |
362 |
|
{ |
363 |
0 |
Desktop.addInternalFrame(frame, getFrameTitle(), false, 400, 180); |
364 |
|
} |
365 |
|
} |
366 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
367 |
0 |
private String getFrameTitle()... |
368 |
|
{ |
369 |
0 |
return ((alignFrame == null) |
370 |
|
? MessageManager.getString("label.new_sequence_fetcher") |
371 |
|
: MessageManager |
372 |
|
.getString("label.additional_sequence_fetcher")); |
373 |
|
} |
374 |
|
|
375 |
|
GFTSPanel parentFTSframe = null; |
376 |
|
|
377 |
|
|
378 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
379 |
0 |
public void embedWithFTSPanel(GFTSPanel toClose)... |
380 |
|
{ |
381 |
0 |
back.setVisible(true); |
382 |
0 |
parentFTSframe = toClose; |
383 |
|
} |
|
|
| 0% |
Uncovered Elements: 47 (47) |
Complexity: 1 |
Complexity Density: 0.02 |
|
384 |
0 |
private void jbInit() throws Exception... |
385 |
|
{ |
386 |
0 |
this.setLayout(borderLayout2); |
387 |
|
|
388 |
0 |
database.setFont(JvSwingUtils.getLabelFont()); |
389 |
0 |
dbeg.setFont(new java.awt.Font("Verdana", Font.BOLD, 11)); |
390 |
0 |
jLabel1.setFont(new java.awt.Font("Verdana", Font.ITALIC, 11)); |
391 |
0 |
jLabel1.setHorizontalAlignment(SwingConstants.CENTER); |
392 |
0 |
jLabel1.setText(MessageManager |
393 |
|
.getString("label.separate_multiple_accession_ids")); |
394 |
|
|
395 |
0 |
replacePunctuation.setHorizontalAlignment(SwingConstants.CENTER); |
396 |
0 |
replacePunctuation |
397 |
|
.setFont(new java.awt.Font("Verdana", Font.ITALIC, 11)); |
398 |
0 |
replacePunctuation.setText( |
399 |
|
MessageManager.getString("label.replace_commas_semicolons")); |
400 |
0 |
ok.setText(MessageManager.getString("action.ok")); |
401 |
0 |
ok.addActionListener(new ActionListener() |
402 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
403 |
0 |
@Override... |
404 |
|
public void actionPerformed(ActionEvent e) |
405 |
|
{ |
406 |
0 |
ok_actionPerformed(); |
407 |
|
} |
408 |
|
}); |
409 |
0 |
clear.setText(MessageManager.getString("action.clear")); |
410 |
0 |
clear.addActionListener(new ActionListener() |
411 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
412 |
0 |
@Override... |
413 |
|
public void actionPerformed(ActionEvent e) |
414 |
|
{ |
415 |
0 |
clear_actionPerformed(); |
416 |
|
} |
417 |
|
}); |
418 |
|
|
419 |
0 |
example.setText(MessageManager.getString("label.example")); |
420 |
0 |
example.addActionListener(new ActionListener() |
421 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
422 |
0 |
@Override... |
423 |
|
public void actionPerformed(ActionEvent e) |
424 |
|
{ |
425 |
0 |
example_actionPerformed(); |
426 |
|
} |
427 |
|
}); |
428 |
0 |
close.setText(MessageManager.getString("action.cancel")); |
429 |
0 |
close.addActionListener(new ActionListener() |
430 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
431 |
0 |
@Override... |
432 |
|
public void actionPerformed(ActionEvent e) |
433 |
|
{ |
434 |
0 |
close_actionPerformed(e); |
435 |
|
} |
436 |
|
}); |
437 |
0 |
back.setText(MessageManager.getString("action.back")); |
438 |
0 |
back.addActionListener(new ActionListener() |
439 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
440 |
0 |
@Override... |
441 |
|
public void actionPerformed(ActionEvent e) |
442 |
|
{ |
443 |
0 |
parentFTSframe.btn_back_ActionPerformed(); |
444 |
|
} |
445 |
|
}); |
446 |
|
|
447 |
0 |
back.setVisible(false); |
448 |
0 |
textArea.setFont(JvSwingUtils.getLabelFont()); |
449 |
0 |
textArea.setLineWrap(true); |
450 |
0 |
textArea.addKeyListener(new KeyAdapter() |
451 |
|
{ |
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
452 |
0 |
@Override... |
453 |
|
public void keyPressed(KeyEvent e) |
454 |
|
{ |
455 |
0 |
if (e.getKeyCode() == KeyEvent.VK_ENTER) |
456 |
|
{ |
457 |
0 |
ok_actionPerformed(); |
458 |
|
} |
459 |
|
} |
460 |
|
}); |
461 |
0 |
jPanel3.setLayout(borderLayout1); |
462 |
0 |
borderLayout1.setVgap(5); |
463 |
0 |
jPanel1.add(back); |
464 |
0 |
jPanel1.add(example); |
465 |
0 |
jPanel1.add(clear); |
466 |
0 |
jPanel1.add(ok); |
467 |
0 |
jPanel1.add(close); |
468 |
0 |
jPanel2.setLayout(borderLayout3); |
469 |
0 |
databaseButt = |
470 |
|
new JButton( |
471 |
|
MessageManager.getString("action.select_ddbb")); |
472 |
0 |
databaseButt.addActionListener(new ActionListener() |
473 |
|
{ |
474 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
475 |
0 |
@Override... |
476 |
|
public void actionPerformed(ActionEvent arg0) |
477 |
|
{ |
478 |
0 |
hidePanel(); |
479 |
0 |
database.showDialog(); |
480 |
|
} |
481 |
|
}); |
482 |
0 |
databaseButt.setFont(JvSwingUtils.getLabelFont()); |
483 |
0 |
database.addActionListener(new ActionListener() |
484 |
|
{ |
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 4 |
Complexity Density: 0.4 |
|
485 |
0 |
@Override... |
486 |
|
public void actionPerformed(ActionEvent e) |
487 |
|
{ |
488 |
0 |
String currentSelection = database.getSelectedItem(); |
489 |
0 |
if (currentSelection == null) |
490 |
|
{ |
491 |
0 |
close_actionPerformed(null); |
492 |
|
} |
493 |
|
|
494 |
0 |
showPanel(); |
495 |
|
|
496 |
0 |
if ("pdb".equalsIgnoreCase(currentSelection)) |
497 |
|
{ |
498 |
0 |
pdbSourceAction(); |
499 |
|
} |
500 |
0 |
else if ("uniprot".equalsIgnoreCase(currentSelection)) |
501 |
|
{ |
502 |
0 |
uniprotSourceAction(); |
503 |
|
} |
504 |
|
else |
505 |
|
{ |
506 |
0 |
otherSourceAction(); |
507 |
|
} |
508 |
0 |
database.action = -1; |
509 |
|
} |
510 |
|
}); |
511 |
|
|
512 |
0 |
dbeg.setText(""); |
513 |
0 |
jPanel2.add(databaseButt, java.awt.BorderLayout.NORTH); |
514 |
0 |
jPanel2.add(dbeg, java.awt.BorderLayout.CENTER); |
515 |
0 |
JPanel jPanel2a = new JPanel(new BorderLayout()); |
516 |
0 |
jPanel2a.add(jLabel1, java.awt.BorderLayout.NORTH); |
517 |
0 |
jPanel2a.add(replacePunctuation, java.awt.BorderLayout.SOUTH); |
518 |
0 |
jPanel2.add(jPanel2a, java.awt.BorderLayout.SOUTH); |
519 |
|
|
520 |
0 |
jPanel3.add(jScrollPane1, java.awt.BorderLayout.CENTER); |
521 |
0 |
this.add(jPanel1, java.awt.BorderLayout.SOUTH); |
522 |
0 |
this.add(jPanel3, java.awt.BorderLayout.CENTER); |
523 |
0 |
this.add(jPanel2, java.awt.BorderLayout.NORTH); |
524 |
0 |
jScrollPane1.getViewport().add(textArea); |
525 |
|
} |
526 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
527 |
0 |
private void pdbSourceAction()... |
528 |
|
{ |
529 |
0 |
databaseButt.setText(database.getSelectedItem()); |
530 |
0 |
new PDBFTSPanel(this); |
531 |
0 |
frame.dispose(); |
532 |
|
} |
533 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
534 |
0 |
private void uniprotSourceAction()... |
535 |
|
{ |
536 |
0 |
databaseButt.setText(database.getSelectedItem()); |
537 |
0 |
new UniprotFTSPanel(this); |
538 |
0 |
frame.dispose(); |
539 |
|
} |
540 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 3 |
Complexity Density: 0.33 |
|
541 |
0 |
private void otherSourceAction()... |
542 |
|
{ |
543 |
0 |
try |
544 |
|
{ |
545 |
0 |
databaseButt.setText(database.getSelectedItem() |
546 |
0 |
+ (database.getSelectedSources().size() > 1 ? " (and " |
547 |
|
+ database.getSelectedSources().size() + " others)" |
548 |
|
: "")); |
549 |
0 |
String eq = database.getExampleQueries(); |
550 |
0 |
dbeg.setText(MessageManager.formatMessage("label.example_query_param", |
551 |
|
new String[] |
552 |
|
{ eq })); |
553 |
|
|
554 |
|
|
555 |
|
|
556 |
0 |
boolean enablePunct = !(eq != null && eq.indexOf(",") > -1); |
557 |
0 |
replacePunctuation.setEnabled(enablePunct); |
558 |
|
|
559 |
|
} catch (Exception ex) |
560 |
|
{ |
561 |
0 |
dbeg.setText(""); |
562 |
0 |
replacePunctuation.setEnabled(true); |
563 |
|
} |
564 |
0 |
jPanel2.repaint(); |
565 |
|
} |
566 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
567 |
0 |
protected void example_actionPerformed()... |
568 |
|
{ |
569 |
0 |
DbSourceProxy db = null; |
570 |
0 |
try |
571 |
|
{ |
572 |
0 |
textArea.setText(database.getExampleQueries()); |
573 |
|
} catch (Exception ex) |
574 |
|
{ |
575 |
|
} |
576 |
0 |
jPanel3.repaint(); |
577 |
|
} |
578 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
579 |
0 |
protected void clear_actionPerformed()... |
580 |
|
{ |
581 |
0 |
textArea.setText(""); |
582 |
0 |
jPanel3.repaint(); |
583 |
|
} |
584 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 3 |
Complexity Density: 0.75 |
|
585 |
0 |
public void close_actionPerformed(ActionEvent e)... |
586 |
|
{ |
587 |
0 |
try |
588 |
|
{ |
589 |
0 |
frame.setClosed(true); |
590 |
0 |
if (parentFTSframe!=null) |
591 |
|
{ |
592 |
0 |
parentFTSframe.btn_cancel_ActionPerformed(); |
593 |
|
} |
594 |
|
} catch (Exception ex) |
595 |
|
{ |
596 |
|
} |
597 |
|
} |
598 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
599 |
0 |
public void ok_actionPerformed()... |
600 |
|
{ |
601 |
0 |
databaseButt.setEnabled(false); |
602 |
0 |
example.setEnabled(false); |
603 |
0 |
textArea.setEnabled(false); |
604 |
0 |
ok.setEnabled(false); |
605 |
0 |
close.setEnabled(false); |
606 |
0 |
back.setEnabled(false); |
607 |
0 |
Thread worker = new Thread(this); |
608 |
0 |
worker.start(); |
609 |
|
} |
610 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
611 |
0 |
private void resetDialog()... |
612 |
|
{ |
613 |
0 |
databaseButt.setEnabled(true); |
614 |
0 |
example.setEnabled(true); |
615 |
0 |
textArea.setEnabled(true); |
616 |
0 |
ok.setEnabled(true); |
617 |
0 |
close.setEnabled(true); |
618 |
0 |
back.setEnabled(parentFTSframe != null); |
619 |
|
} |
620 |
|
|
|
|
| 0% |
Uncovered Elements: 129 (129) |
Complexity: 32 |
Complexity Density: 0.38 |
|
621 |
0 |
@Override... |
622 |
|
public void run() |
623 |
|
{ |
624 |
0 |
String error = ""; |
625 |
0 |
if (!database.hasSelection()) |
626 |
|
{ |
627 |
0 |
error += "Please select the source database\n"; |
628 |
|
} |
629 |
|
|
630 |
0 |
com.stevesoft.pat.Regex empty; |
631 |
0 |
if (replacePunctuation.isEnabled() && replacePunctuation.isSelected()) |
632 |
|
{ |
633 |
0 |
empty = new com.stevesoft.pat.Regex( |
634 |
|
|
635 |
|
"(\\s|[,; ])+", ";"); |
636 |
|
} |
637 |
|
else |
638 |
|
{ |
639 |
|
|
640 |
0 |
empty = new com.stevesoft.pat.Regex("(\\s|[; ])+", ";"); |
641 |
|
} |
642 |
0 |
textArea.setText(empty.replaceAll(textArea.getText())); |
643 |
|
|
644 |
0 |
if (!new com.stevesoft.pat.Regex("[A-Za-z0-9_.]") |
645 |
|
.search(textArea.getText())) |
646 |
|
{ |
647 |
0 |
error += "Please enter a (semi-colon separated list of) database id(s)"; |
648 |
|
} |
649 |
0 |
if (error.length() > 0) |
650 |
|
{ |
651 |
0 |
showErrorMessage(error); |
652 |
0 |
resetDialog(); |
653 |
0 |
return; |
654 |
|
} |
655 |
|
|
656 |
|
|
657 |
0 |
boolean addToLast = false; |
658 |
0 |
List<String> aresultq = new ArrayList<>(); |
659 |
0 |
List<String> presultTitle = new ArrayList<>(); |
660 |
0 |
List<AlignmentI> presult = new ArrayList<>(); |
661 |
0 |
List<AlignmentI> aresult = new ArrayList<>(); |
662 |
0 |
Iterator<DbSourceProxy> proxies = database.getSelectedSources() |
663 |
|
.iterator(); |
664 |
0 |
String[] qries; |
665 |
0 |
List<String> nextFetch = Arrays |
666 |
|
.asList(qries = textArea.getText().split(";")); |
667 |
0 |
Iterator<String> en = Arrays.asList(new String[0]).iterator(); |
668 |
0 |
int nqueries = qries.length; |
669 |
|
|
670 |
0 |
FeatureSettingsModelI preferredFeatureColours = null; |
671 |
0 |
while (proxies.hasNext() && (en.hasNext() || nextFetch.size() > 0)) |
672 |
|
{ |
673 |
0 |
if (!en.hasNext() && nextFetch.size() > 0) |
674 |
|
{ |
675 |
0 |
en = nextFetch.iterator(); |
676 |
0 |
nqueries = nextFetch.size(); |
677 |
|
|
678 |
0 |
qries = nextFetch.toArray(new String[nqueries]); |
679 |
0 |
nextFetch = new ArrayList<>(); |
680 |
|
} |
681 |
|
|
682 |
0 |
DbSourceProxy proxy = proxies.next(); |
683 |
0 |
try |
684 |
|
{ |
685 |
|
|
686 |
0 |
guiWindow.setProgressBar(MessageManager.formatMessage( |
687 |
|
"status.fetching_sequence_queries_from", new String[] |
688 |
|
{ Integer.valueOf(nqueries).toString(), |
689 |
|
proxy.getDbName() }), |
690 |
|
Thread.currentThread().hashCode()); |
691 |
0 |
if (proxy.getMaximumQueryCount() == 1) |
692 |
|
{ |
693 |
|
|
694 |
|
|
695 |
|
|
696 |
0 |
while (en.hasNext()) |
697 |
|
{ |
698 |
0 |
String acc = en.next(); |
699 |
0 |
if (!fetchSingleAccession(proxy, acc, aresultq, aresult)) |
700 |
|
{ |
701 |
0 |
nextFetch.add(acc); |
702 |
|
} |
703 |
|
} |
704 |
|
} |
705 |
|
else |
706 |
|
{ |
707 |
|
|
708 |
|
|
709 |
|
|
710 |
0 |
fetchMultipleAccessions(proxy, en, aresultq, aresult, nextFetch); |
711 |
|
} |
712 |
|
} catch (Exception e) |
713 |
|
{ |
714 |
0 |
showErrorMessage("Error retrieving " + textArea.getText() + " from " |
715 |
|
+ database.getSelectedItem()); |
716 |
|
|
717 |
|
|
718 |
0 |
System.err.println("Retrieval failed for source ='" |
719 |
|
+ database.getSelectedItem() + "' and query\n'" |
720 |
|
+ textArea.getText() + "'\n"); |
721 |
0 |
e.printStackTrace(); |
722 |
|
} catch (OutOfMemoryError e) |
723 |
|
{ |
724 |
0 |
showErrorMessage("Out of Memory when retrieving " |
725 |
|
+ textArea.getText() + " from " + database.getSelectedItem() |
726 |
|
+ "\nPlease see the Jalview FAQ for instructions for increasing the memory available to Jalview.\n"); |
727 |
0 |
e.printStackTrace(); |
728 |
|
} catch (Error e) |
729 |
|
{ |
730 |
0 |
showErrorMessage("Serious Error retrieving " + textArea.getText() |
731 |
|
+ " from " + database.getSelectedItem()); |
732 |
0 |
e.printStackTrace(); |
733 |
|
} |
734 |
|
|
735 |
|
|
736 |
0 |
if (aresult != null && aresult.size() > 0) |
737 |
|
{ |
738 |
0 |
FeatureSettingsModelI proxyColourScheme = proxy |
739 |
|
.getFeatureColourScheme(); |
740 |
0 |
if (proxyColourScheme != null) |
741 |
|
{ |
742 |
0 |
preferredFeatureColours = proxyColourScheme; |
743 |
|
} |
744 |
|
|
745 |
0 |
AlignmentI ar = null; |
746 |
0 |
if (proxy.isAlignmentSource()) |
747 |
|
{ |
748 |
0 |
addToLast = false; |
749 |
|
|
750 |
0 |
while (aresult.size() > 0) |
751 |
|
{ |
752 |
0 |
presult.add(aresult.remove(0)); |
753 |
0 |
presultTitle.add( |
754 |
|
aresultq.remove(0) + " " + getDefaultRetrievalTitle()); |
755 |
|
} |
756 |
|
} |
757 |
|
else |
758 |
|
{ |
759 |
0 |
String titl = null; |
760 |
0 |
if (addToLast && presult.size() > 0) |
761 |
|
{ |
762 |
0 |
ar = presult.remove(presult.size() - 1); |
763 |
0 |
titl = presultTitle.remove(presultTitle.size() - 1); |
764 |
|
} |
765 |
|
|
766 |
0 |
while (aresult.size() > 0) |
767 |
|
{ |
768 |
0 |
if (ar == null) |
769 |
|
{ |
770 |
0 |
ar = aresult.remove(0); |
771 |
|
} |
772 |
|
else |
773 |
|
{ |
774 |
0 |
ar.append(aresult.remove(0)); |
775 |
|
} |
776 |
|
} |
777 |
0 |
addToLast = true; |
778 |
0 |
presult.add(ar); |
779 |
0 |
presultTitle.add(titl); |
780 |
|
} |
781 |
|
} |
782 |
0 |
guiWindow.setProgressBar( |
783 |
|
MessageManager.getString("status.finshed_querying"), |
784 |
|
Thread.currentThread().hashCode()); |
785 |
|
} |
786 |
0 |
guiWindow |
787 |
|
.setProgressBar( |
788 |
0 |
(presult.size() > 0) |
789 |
|
? MessageManager |
790 |
|
.getString("status.parsing_results") |
791 |
|
: MessageManager.getString("status.processing"), |
792 |
|
Thread.currentThread().hashCode()); |
793 |
|
|
794 |
0 |
while (presult.size() > 0) |
795 |
|
{ |
796 |
0 |
parseResult(presult.remove(0), presultTitle.remove(0), null, |
797 |
|
preferredFeatureColours); |
798 |
|
} |
799 |
|
|
800 |
0 |
guiWindow.setProgressBar(null, Thread.currentThread().hashCode()); |
801 |
0 |
if (nextFetch.size() > 0) |
802 |
|
{ |
803 |
0 |
StringBuffer sb = new StringBuffer(); |
804 |
0 |
sb.append("Didn't retrieve the following " |
805 |
0 |
+ (nextFetch.size() == 1 ? "query" |
806 |
|
: nextFetch.size() + " queries") |
807 |
|
+ ": \n"); |
808 |
0 |
int l = sb.length(), lr = 0; |
809 |
0 |
for (String s : nextFetch) |
810 |
|
{ |
811 |
0 |
if (l != sb.length()) |
812 |
|
{ |
813 |
0 |
sb.append("; "); |
814 |
|
} |
815 |
0 |
if (lr - sb.length() > 40) |
816 |
|
{ |
817 |
0 |
sb.append("\n"); |
818 |
|
} |
819 |
0 |
sb.append(s); |
820 |
|
} |
821 |
0 |
showErrorMessage(sb.toString()); |
822 |
|
} |
823 |
0 |
resetDialog(); |
824 |
|
} |
825 |
|
|
826 |
|
|
827 |
|
|
828 |
|
|
829 |
|
@param |
830 |
|
@param |
831 |
|
|
832 |
|
@param |
833 |
|
|
834 |
|
@param |
835 |
|
|
836 |
|
@param |
837 |
|
|
838 |
|
@throws |
839 |
|
|
|
|
| 0% |
Uncovered Elements: 26 (26) |
Complexity: 7 |
Complexity Density: 0.39 |
|
840 |
0 |
void fetchMultipleAccessions(DbSourceProxy proxy,... |
841 |
|
Iterator<String> accessions, List<String> aresultq, |
842 |
|
List<AlignmentI> aresult, List<String> nextFetch) throws Exception |
843 |
|
{ |
844 |
0 |
StringBuilder multiacc = new StringBuilder(); |
845 |
0 |
List<String> tosend = new ArrayList<>(); |
846 |
0 |
while (accessions.hasNext()) |
847 |
|
{ |
848 |
0 |
String nel = accessions.next(); |
849 |
0 |
tosend.add(nel); |
850 |
0 |
multiacc.append(nel); |
851 |
0 |
if (accessions.hasNext()) |
852 |
|
{ |
853 |
0 |
multiacc.append(proxy.getAccessionSeparator()); |
854 |
|
} |
855 |
|
} |
856 |
|
|
857 |
0 |
try |
858 |
|
{ |
859 |
0 |
String query = multiacc.toString(); |
860 |
0 |
AlignmentI rslt = proxy.getSequenceRecords(query); |
861 |
0 |
if (rslt == null || rslt.getHeight() == 0) |
862 |
|
{ |
863 |
|
|
864 |
0 |
nextFetch.addAll(tosend); |
865 |
|
} |
866 |
|
else |
867 |
|
{ |
868 |
0 |
aresultq.add(query); |
869 |
0 |
aresult.add(rslt); |
870 |
0 |
if (tosend.size() > 1) |
871 |
|
{ |
872 |
0 |
checkResultForQueries(rslt, tosend, nextFetch, proxy); |
873 |
|
} |
874 |
|
} |
875 |
|
} catch (OutOfMemoryError oome) |
876 |
|
{ |
877 |
0 |
new OOMWarning("fetching " + multiacc + " from " |
878 |
|
+ database.getSelectedItem(), oome, this); |
879 |
|
} |
880 |
|
} |
881 |
|
|
882 |
|
|
883 |
|
|
884 |
|
|
885 |
|
@param |
886 |
|
@param |
887 |
|
@param |
888 |
|
|
889 |
|
@param |
890 |
|
|
891 |
|
@return |
892 |
|
|
|
|
| 0% |
Uncovered Elements: 19 (19) |
Complexity: 6 |
Complexity Density: 0.4 |
|
893 |
0 |
boolean fetchSingleAccession(DbSourceProxy proxy, String accession,... |
894 |
|
List<String> aresultq, List<AlignmentI> aresult) |
895 |
|
{ |
896 |
0 |
boolean success = false; |
897 |
0 |
try |
898 |
|
{ |
899 |
0 |
if (aresult != null) |
900 |
|
{ |
901 |
0 |
try |
902 |
|
{ |
903 |
|
|
904 |
0 |
Thread.sleep(5); |
905 |
|
} catch (Exception e) |
906 |
|
{ |
907 |
|
|
908 |
|
} |
909 |
|
} |
910 |
|
|
911 |
0 |
AlignmentI indres = null; |
912 |
0 |
try |
913 |
|
{ |
914 |
0 |
indres = proxy.getSequenceRecords(accession); |
915 |
|
} catch (OutOfMemoryError oome) |
916 |
|
{ |
917 |
0 |
new OOMWarning( |
918 |
|
"fetching " + accession + " from " + proxy.getDbName(), |
919 |
|
oome, this); |
920 |
|
} |
921 |
0 |
if (indres != null) |
922 |
|
{ |
923 |
0 |
aresultq.add(accession); |
924 |
0 |
aresult.add(indres); |
925 |
0 |
success = true; |
926 |
|
} |
927 |
|
} catch (Exception e) |
928 |
|
{ |
929 |
0 |
Cache.log.info("Error retrieving " + accession + " from " |
930 |
|
+ proxy.getDbName(), e); |
931 |
|
} |
932 |
0 |
return success; |
933 |
|
} |
934 |
|
|
935 |
|
|
936 |
|
|
937 |
|
|
938 |
|
|
939 |
|
|
940 |
|
@param |
941 |
|
@param |
942 |
|
@param |
943 |
|
@param |
944 |
|
|
|
|
| 0% |
Uncovered Elements: 24 (24) |
Complexity: 5 |
Complexity Density: 0.31 |
|
945 |
0 |
void checkResultForQueries(AlignmentI rslt, List<String> queries,... |
946 |
|
List<String> nextFetch, DbSourceProxy proxy) |
947 |
|
{ |
948 |
0 |
SequenceI[] rs = rslt.getSequencesArray(); |
949 |
|
|
950 |
0 |
for (String q : queries) |
951 |
|
{ |
952 |
0 |
DBRefEntry dbr = new DBRefEntry(); |
953 |
0 |
dbr.setSource(proxy.getDbSource()); |
954 |
0 |
dbr.setVersion(null); |
955 |
0 |
String accId = proxy.getAccessionIdFromQuery(q); |
956 |
0 |
dbr.setAccessionId(accId); |
957 |
0 |
boolean rfound = false; |
958 |
0 |
for (int r = 0; r < rs.length; r++) |
959 |
|
{ |
960 |
0 |
if (rs[r] != null) |
961 |
|
{ |
962 |
0 |
List<DBRefEntry> found = DBRefUtils.searchRefs(rs[r].getDBRefs(), |
963 |
|
accId); |
964 |
0 |
if (!found.isEmpty()) |
965 |
|
{ |
966 |
0 |
rfound = true; |
967 |
0 |
break; |
968 |
|
} |
969 |
|
} |
970 |
|
} |
971 |
0 |
if (!rfound) |
972 |
|
{ |
973 |
0 |
nextFetch.add(q); |
974 |
|
} |
975 |
|
} |
976 |
|
} |
977 |
|
|
978 |
|
|
979 |
|
|
980 |
|
@return |
981 |
|
|
982 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
983 |
0 |
public String getDefaultRetrievalTitle()... |
984 |
|
{ |
985 |
0 |
return "Retrieved from " + database.getSelectedItem(); |
986 |
|
} |
987 |
|
|
|
|
| 0% |
Uncovered Elements: 41 (41) |
Complexity: 11 |
Complexity Density: 0.44 |
|
988 |
0 |
AlignmentI parseResult(AlignmentI al, String title,... |
989 |
|
FileFormatI currentFileFormat, |
990 |
|
FeatureSettingsModelI preferredFeatureColours) |
991 |
|
{ |
992 |
|
|
993 |
0 |
if (al != null && al.getHeight() > 0) |
994 |
|
{ |
995 |
0 |
if (title == null) |
996 |
|
{ |
997 |
0 |
title = getDefaultRetrievalTitle(); |
998 |
|
} |
999 |
0 |
if (alignFrame == null) |
1000 |
|
{ |
1001 |
0 |
AlignFrame af = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH, |
1002 |
|
AlignFrame.DEFAULT_HEIGHT); |
1003 |
0 |
if (currentFileFormat != null) |
1004 |
|
{ |
1005 |
0 |
af.currentFileFormat = currentFileFormat; |
1006 |
|
|
1007 |
|
|
1008 |
|
|
1009 |
|
} |
1010 |
|
|
1011 |
0 |
List<SequenceI> alsqs = al.getSequences(); |
1012 |
0 |
synchronized (alsqs) |
1013 |
|
{ |
1014 |
0 |
for (SequenceI sq : alsqs) |
1015 |
|
{ |
1016 |
0 |
if (sq.getFeatures().hasFeatures()) |
1017 |
|
{ |
1018 |
0 |
af.setShowSeqFeatures(true); |
1019 |
0 |
break; |
1020 |
|
} |
1021 |
|
} |
1022 |
|
} |
1023 |
|
|
1024 |
0 |
if (preferredFeatureColours != null) |
1025 |
|
{ |
1026 |
0 |
af.getViewport().applyFeaturesStyle(preferredFeatureColours); |
1027 |
|
} |
1028 |
0 |
if (Cache.getDefault("HIDE_INTRONS", true)) |
1029 |
|
{ |
1030 |
0 |
af.hideFeatureColumns(SequenceOntologyI.EXON, false); |
1031 |
|
} |
1032 |
0 |
if (newAlframes != null) |
1033 |
|
{ |
1034 |
0 |
newAlframes.add(af); |
1035 |
|
} |
1036 |
0 |
Desktop.addInternalFrame(af, title, AlignFrame.DEFAULT_WIDTH, |
1037 |
|
AlignFrame.DEFAULT_HEIGHT); |
1038 |
|
|
1039 |
0 |
af.setStatus(MessageManager |
1040 |
|
.getString("label.successfully_pasted_alignment_file")); |
1041 |
|
|
1042 |
0 |
try |
1043 |
|
{ |
1044 |
0 |
af.setMaximum(Cache.getDefault("SHOW_FULLSCREEN", false)); |
1045 |
|
} catch (Exception ex) |
1046 |
|
{ |
1047 |
|
} |
1048 |
|
} |
1049 |
|
else |
1050 |
|
{ |
1051 |
0 |
alignFrame.viewport.addAlignment(al, title); |
1052 |
|
} |
1053 |
|
} |
1054 |
0 |
return al; |
1055 |
|
} |
1056 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
1057 |
0 |
void showErrorMessage(final String error)... |
1058 |
|
{ |
1059 |
0 |
resetDialog(); |
1060 |
0 |
javax.swing.SwingUtilities.invokeLater(new Runnable() |
1061 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1062 |
0 |
@Override... |
1063 |
|
public void run() |
1064 |
|
{ |
1065 |
0 |
JvOptionPane.showInternalMessageDialog(Desktop.desktop, error, |
1066 |
|
MessageManager.getString("label.error_retrieving_data"), |
1067 |
|
JvOptionPane.WARNING_MESSAGE); |
1068 |
|
} |
1069 |
|
}); |
1070 |
|
} |
1071 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1072 |
0 |
public IProgressIndicator getProgressIndicator()... |
1073 |
|
{ |
1074 |
0 |
return progressIndicator; |
1075 |
|
} |
1076 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1077 |
0 |
public void setProgressIndicator(IProgressIndicator progressIndicator)... |
1078 |
|
{ |
1079 |
0 |
this.progressIndicator = progressIndicator; |
1080 |
|
} |
1081 |
|
|
1082 |
|
|
1083 |
|
|
1084 |
|
|
1085 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1086 |
0 |
void showPanel()... |
1087 |
|
{ |
1088 |
0 |
frame.setVisible(true); |
1089 |
|
} |
1090 |
|
|
1091 |
|
|
1092 |
|
|
1093 |
|
|
1094 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1095 |
0 |
void hidePanel()... |
1096 |
|
{ |
1097 |
0 |
frame.setVisible(false); |
1098 |
|
} |
1099 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1100 |
0 |
public void setDatabaseChooserVisible(boolean b)... |
1101 |
|
{ |
1102 |
0 |
databaseButt.setVisible(b); |
1103 |
|
} |
1104 |
|
} |