@Test public void testListToString_ellipseAfterTenFiles() { final ArrayList<File> targetFiles = new ArrayList<>(); for (int i = 0; i < 14; i++) { targetFiles.add(new File("blabla_" + i)); } assertTrue(EEToNetCDFExportDialog.listToString(targetFiles).contains("...")); }
static String listToString(List<File> targetFiles) { int fileCount = 0; final StringBuilder stringBuilder = new StringBuilder(); for (File targetFile : targetFiles) { stringBuilder.append(targetFile.getAbsolutePath()); stringBuilder.append("\n"); fileCount++; if (fileCount >= 10) { stringBuilder.append("..."); break; } } return stringBuilder.toString(); }
EEToNetCDFExportDialog extends ProductChangeAwareDialog { static String listToString(List<File> targetFiles) { int fileCount = 0; final StringBuilder stringBuilder = new StringBuilder(); for (File targetFile : targetFiles) { stringBuilder.append(targetFile.getAbsolutePath()); stringBuilder.append("\n"); fileCount++; if (fileCount >= 10) { stringBuilder.append("..."); break; } } return stringBuilder.toString(); } }
EEToNetCDFExportDialog extends ProductChangeAwareDialog { static String listToString(List<File> targetFiles) { int fileCount = 0; final StringBuilder stringBuilder = new StringBuilder(); for (File targetFile : targetFiles) { stringBuilder.append(targetFile.getAbsolutePath()); stringBuilder.append("\n"); fileCount++; if (fileCount >= 10) { stringBuilder.append("..."); break; } } return stringBuilder.toString(); } EEToNetCDFExportDialog(AppContext appContext, String helpId); }
EEToNetCDFExportDialog extends ProductChangeAwareDialog { static String listToString(List<File> targetFiles) { int fileCount = 0; final StringBuilder stringBuilder = new StringBuilder(); for (File targetFile : targetFiles) { stringBuilder.append(targetFile.getAbsolutePath()); stringBuilder.append("\n"); fileCount++; if (fileCount >= 10) { stringBuilder.append("..."); break; } } return stringBuilder.toString(); } EEToNetCDFExportDialog(AppContext appContext, String helpId);  }
EEToNetCDFExportDialog extends ProductChangeAwareDialog { static String listToString(List<File> targetFiles) { int fileCount = 0; final StringBuilder stringBuilder = new StringBuilder(); for (File targetFile : targetFiles) { stringBuilder.append(targetFile.getAbsolutePath()); stringBuilder.append("\n"); fileCount++; if (fileCount >= 10) { stringBuilder.append("..."); break; } } return stringBuilder.toString(); } EEToNetCDFExportDialog(AppContext appContext, String helpId);   }