()
| 322 | } |
| 323 | |
| 324 | public final void work() { |
| 325 | int max_sets_ctr = sets.size(); |
| 326 | for (int sets_ctr = 0; sets_ctr < max_sets_ctr; sets_ctr++) { |
| 327 | current_set = ((Set) sets.get(sets_ctr)); |
| 328 | System.out.println(); |
| 329 | System.out.println("[Build] Creating Set " + current_set.name); |
| 330 | try { |
| 331 | File set_dir = new File(current_set.name); |
| 332 | set_dir.mkdir(); |
| 333 | } catch(Exception e) { |
| 334 | System.out.println("[Error] Can't create folder for set " + current_set.name); |
| 335 | } |
| 336 | |
| 337 | int max_entity_ctr = current_set.entity.size(); |
| 338 | Object ovector[] = current_set.entity.toArray(); |
| 339 | Entity vector[] = new Entity[ovector.length]; |
| 340 | System.arraycopy(ovector, 0, vector, 0, ovector.length); |
| 341 | |
| 342 | sort(vector, vector.length - 1); |
| 343 | |
| 344 | for (int entity_ctr = 0; entity_ctr < max_entity_ctr; entity_ctr++) { |
| 345 | ByteArrayOutputStream data_out = new ByteArrayOutputStream(); |
| 346 | Entity e = vector[entity_ctr]; |
| 347 | String file = current_set.name + "/" + e.name + ".html"; |
| 348 | String data = null; |
| 349 | System.out.println("[Build] Creating " + e.name); |
| 350 | try { |
| 351 | PrintStream out = new PrintStream(new BufferedOutputStream(data_out)); |
| 352 | printHeader(out, e.name); |
| 353 | out.println("<table width=\"100%\" cols=\"2\" border=\"0\" bgcolor=\"navy\"><tr align=\"left\"><td align=\"left\"><font color=\"white\">DevIL Documentation</font></td><td align=\"right\"><font color=\"white\">"); |
| 354 | try { |
| 355 | String link = vector[entity_ctr - 1].name + ".html"; |
| 356 | out.println("<a class=\"color\" href=\"" + link + "\">Previous</a> |"); |
| 357 | } catch(IndexOutOfBoundsException aex) { |
| 358 | out.println("Previous |"); |
| 359 | } |
| 360 | out.println("<a class=\"color\" href=\"index.html\">" + current_set.name + "</a> |"); |
| 361 | try { |
| 362 | String link = vector[entity_ctr + 1].name + ".html"; |
| 363 | out.println("<a class=\"color\" href=\"" + link + "\">Next</a>"); |
| 364 | } catch(IndexOutOfBoundsException aex) { |
| 365 | out.println("Next "); |
| 366 | } |
| 367 | out.println("</font></td></tr></table><br/><table><tr><td> </td><td>"); |
| 368 | out.println("<p><h3>" + e.name + "</h3></p><table><tr><td> </td><td>"); |
| 369 | |
| 370 | if (e instanceof Value) { |
| 371 | out.println(""); |
| 372 | out.println("<p><font size=\"-1\">" + conv(((Value) e).description) + "</font></p>"); |
| 373 | out.println(""); |
| 374 | } else { |
| 375 | Function f = ((Function) e); |
| 376 | String str = f.description; |
| 377 | |
| 378 | // check for images links in form of [/img:<link>] |
| 379 | str = conv(str); |
| 380 | out.println("<p><font size=\"-1\">" + str + "</font></p>"); |
| 381 |
no test coverage detected