Changeset 538


Ignore:
Timestamp:
13-05-10 20:20:19 (2 years ago)
Author:
rbraam
Message:

Set the index.html in the right order.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Configuration-Documentation-Generator/trunk/src/cdg/AsConfigDocParser.java

    r326 r538  
    1515import java.io.IOException; 
    1616import java.util.ArrayList; 
     17import java.util.Arrays; 
    1718import java.util.Date; 
    1819import nl.fmc.configuration.Attribute; 
     
    5960    private ArrayList asFiles=null; 
    6061    private ArrayList flaFiles=null; 
     62    private ArrayList<String> succesFiles=new ArrayList(); 
    6163    private BufferedWriter indexWriter; 
    6264    /** Creates a new instance of AsConfigDocParser */ 
     
    8284        }catch(IOException ioe){ 
    8385            throw ioe; 
    84         }finally{         
     86        }finally{ 
     87            //sort the ahrefs. 
     88            String[] ahrefs = new String[succesFiles.size()]; 
     89            succesFiles.toArray(ahrefs); 
     90            Arrays.sort(ahrefs); 
     91            for (int i=0; i < ahrefs.length; i++){ 
     92                indexWriter.append(ahrefs[i]); 
     93            } 
    8594            indexWriter.append("\n</body>\n</html>"); 
    8695            indexWriter.close(); 
     
    137146                    boolean success=parseAsFile2Doc(file,newFile);     
    138147                    if (success){ 
    139                         indexWriter.append("<a href=\""+newFileString+"\">"+(file.getName().substring(0,file.getName().length()-3))+"</a><br/>\n"); 
     148                        succesFiles.add("<a href=\""+newFileString+"\">"+(file.getName().substring(0,file.getName().length()-3))+"</a><br/>\n");                         
    140149                    } 
    141150                }                 
     
    171180            } 
    172181        }else{ 
    173             System.out.println("Can't create xml: "+dest.getAbsolutePath()); 
     182            System.out.println("Can't create xml: "+dest.getAbsolutePath()+" no @component found."); 
    174183            doDelete=true; 
    175184        } 
Note: See TracChangeset for help on using the changeset viewer.