Ignore:
Timestamp:
10/18/12 16:04:02 (12 years ago)
Author:
fglaser
Message:

*Changed log-file component element format from

<component parent="parenthash">

<param name="hash" value="componenthash">
...

</component>
to
<component hash="componenthash">

<param name="parent" value="parenthash">
...

</component>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-jfcmonitor/src/main/java/de/ugoe/cs/autoquest/jfcmonitor/JFCComponent.java

    r932 r933  
    289289        setTitle(); 
    290290        StringBuilder builder = new StringBuilder(); 
    291         builder.append("<component"); 
    292         if (parent != null){ 
    293                 if (!JFCComponent.isKnown(parent.component)) 
    294                         throw new AssertionError("Referenced parent is not known."); 
    295                 builder.append(" parent=\"" + Integer.toHexString(parent.component.hashCode()) + "\""); 
    296         } 
    297         builder.append(">"+ StringTools.ENDLINE); 
     291        builder.append("<component hash=\""); 
     292        builder.append(Integer.toHexString(component.hashCode()) + "\" >" + StringTools.ENDLINE); 
    298293        builder.append(" <param name=\"title\" value=\"" + title + "\" />" + StringTools.ENDLINE); 
    299294        builder.append(" <param name=\"class\" value=\"" + componentClass + "\" />" + 
     
    301296        builder.append(" <param name=\"icon\" value=\"" + icon + "\" />" + StringTools.ENDLINE); 
    302297        builder.append(" <param name=\"index\" value=\"" + index + "\" />" + StringTools.ENDLINE); 
    303         builder.append(" <param name=\"hash\" value=\"" + 
    304             Integer.toHexString(component.hashCode()) + "\" />" + StringTools.ENDLINE); 
     298        if (parent != null){ 
     299                if (!JFCComponent.isKnown(parent.component)) 
     300                        throw new AssertionError("Referenced parent is not known."); 
     301                builder.append(" <param name=\"parent\" value=\"" + Integer.toHexString(parent.component.hashCode())); 
     302                builder.append("\" />" + StringTools.ENDLINE); 
     303        } 
    305304        builder.append(getInheritanceTree()); 
    306305        builder.append("</component>" + StringTools.ENDLINE); 
     306         
    307307        return builder.toString(); 
    308308    } 
     
    471471        StringBuilder builder = new StringBuilder(); 
    472472        Class<? extends Object> classobject = component.getClass(); 
    473         builder.append(" <ancestors>"); 
     473        builder.append(" <ancestors>" + StringTools.ENDLINE); 
    474474        while(classobject.getSuperclass() != null){ 
    475475                classobject = classobject.getSuperclass(); 
Note: See TracChangeset for help on using the changeset viewer.