(int progress)
| 518 | } |
| 519 | |
| 520 | @Override |
| 521 | public int doInBackgroundAsync(int progress) { |
| 522 | Map<String, ZipEntry> contents = ResourceLoader.getZipContents(path, true); |
| 523 | // extract the zip file contents |
| 524 | xmlFiles.clear(); |
| 525 | otherFiles.clear(); |
| 526 | for (String next : contents.keySet()) { |
| 527 | String s = ResourceLoader.getURIPath(path + "!/" + next); |
| 528 | if (next.endsWith(".trk") |
| 529 | || next.endsWith(".xml") |
| 530 | || next.endsWith(".ejss")) { |
| 531 | xmlFiles.add(s); |
| 532 | } else { |
| 533 | otherFiles.add(s); |
| 534 | } |
| 535 | } |
| 536 | contents = null; |
| 537 | if (xmlFiles.isEmpty()) { |
| 538 | String msg = XML.getName(path)+ " contains no editable xml files."; |
| 539 | JOptionPane.showMessageDialog(frame, msg, "No Editable Content", JOptionPane.WARNING_MESSAGE); |
| 540 | return progress_done; |
| 541 | } |
| 542 | // remove file that will be edited so the original |
| 543 | // will not be included in the output zip |
| 544 | editedFilePath = xmlFiles.remove(0); |
| 545 | String text = ResourceLoader.getString(editedFilePath); |
| 546 | setEditorText(text); |
| 547 | return progress_done; |
| 548 | } |
| 549 | |
| 550 | @Override |
| 551 | public void doneAsync() { |
nothing calls this directly
no test coverage detected