Ignore:
Timestamp:
11/14/12 10:48:37 (12 years ago)
Author:
fglaser
Message:
  • Automatic class hierarchy scanning for to select correct mapping added
  • JFCComponentTree can now be inititialized with an existing GUIModel
  • JFCSimplifiedLogParser now writes the class itself as the first entry in ancestors children
  • newtrace updated to reflect changes in test case
Location:
trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/guimodel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/guimodel/JFCComponentTree.java

    r965 r984  
    6969     * </p> 
    7070     */ 
    71     private GUIModel guiModel = new GUIModel(); 
     71    private GUIModel guiModel; 
    7272 
    7373    /** 
     
    9696        parentRelations = new HashMap<Integer, JFCGUIElementSpec>(); 
    9797        guiElements = new HashMap<Integer, JFCGUIElement>(); 
     98        guiModel = new GUIModel(); 
     99    } 
     100     
     101    /** 
     102     * <p> 
     103     * Creates a JFCComponentTree with an already existing guiModel 
     104     * @param guiModel 
     105     * </p> 
     106     */ 
     107    public JFCComponentTree(GUIModel guiModel){ 
     108        guiElementSpecs = new HashMap<Integer, JFCGUIElementSpec>(); 
     109        childRelations = new HashMap<Integer, List<JFCGUIElementSpec>>(); 
     110        parentRelations = new HashMap<Integer, JFCGUIElementSpec>(); 
     111        guiElements = new HashMap<Integer, JFCGUIElement>(); 
     112        this.guiModel = guiModel; 
    98113    } 
    99114 
  • trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/guimodel/JFCGUIElementSpec.java

    r966 r984  
    8888     */ 
    8989    private List<Integer> formerElementHashes = new ArrayList<Integer>(); 
     90     
     91    /** 
     92     * <p> 
     93     * Class hierarchy of the class itself 
     94     * </p> 
     95     */ 
     96    private List<String> classHierarchy = null; 
    9097 
    9198    /* 
     
    364371        this.elementHash = newElementHash; 
    365372    } 
     373     
     374    /** 
     375     * <p> 
     376     * Sets the class hierarchy of the specified GUI element. 
     377     * @param classHierarchy 
     378     * </p> 
     379     */ 
     380    public void setClassHierarchy(List<String> classHierarchy){ 
     381        this.classHierarchy = classHierarchy; 
     382    } 
    366383 
    367384    /** 
     
    405422    @Override 
    406423    public String[] getClassHierarchy() { 
    407         // TODO Auto-generated method stub 
    408         System.out.println("TODO: implement IGUIElementSpec.getClassHierarchy "); 
    409         return null; 
     424        if (classHierarchy == null){ 
     425                return new String[]{(getType())}; 
     426        } 
     427        else 
     428                return classHierarchy.toArray(new String[classHierarchy.size()]); 
    410429    } 
    411430 
Note: See TracChangeset for help on using the changeset viewer.