Changeset 385


Ignore:
Timestamp:
02/15/12 15:02:03 (12 years ago)
Author:
sherbold
Message:
  • de.ugoe.cs.eventbench.jfc.data.JFCTargetComparator adapted as follows: ignores window titles that start with "Pos(", i.e., positions; ignores index of GUI objects of class "Class" (optimization for working with ArgoUML)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/data/JFCTargetComparator.java

    r380 r385  
    170170                String[] widgetInfo = widgetString.split("','"); 
    171171                JFCWidget widget = new JFCWidget(); 
    172                 widget.titles.add(widgetInfo[0]); 
     172                if (widgetInfo[0].startsWith("'Pos(")) { 
     173                        widget.titles.add("Pos"); 
     174                } else { 
     175                        widget.titles.add(widgetInfo[0]); 
     176                } 
    173177                widget.widgetClass = widgetInfo[1]; 
    174                 widget.index = widgetInfo[2]; 
    175                 widget.text = widgetInfo[3]; 
     178                widget.text = widgetInfo[2]; 
     179                widget.index = widgetInfo[3]; 
    176180                widget.hashCodes.add(widgetInfo[4]); 
    177181                return widget; 
     
    311315                                hashCodesCopy.retainAll(other.hashCodes); 
    312316 
    313                                 return (widgetClass.equals(other.widgetClass) 
    314                                                 && index.equals(other.index) && text.equals(other.text) && (!titlesCopy 
    315                                                 .isEmpty() || !hashCodesCopy.isEmpty())); 
     317                                boolean retVal; 
     318                                if (widgetClass.equals("Class")) { 
     319                                        retVal = (widgetClass.equals(other.widgetClass) 
     320                                                        && text.equals(other.text) && (!titlesCopy 
     321                                                        .isEmpty() || !hashCodesCopy.isEmpty())); 
     322                                } else { 
     323                                        retVal = (widgetClass.equals(other.widgetClass) 
     324                                                        && index.equals(other.index) 
     325                                                        && text.equals(other.text) && (!titlesCopy 
     326                                                        .isEmpty() || !hashCodesCopy.isEmpty())); 
     327                                } 
     328                                return retVal; 
    316329                        } 
    317330                        return false; 
     
    328341                        int hashCode = 0; 
    329342                        hashCode = multiplier * hashCode + widgetClass.hashCode(); 
    330                         hashCode = multiplier * hashCode + index.hashCode(); 
     343                        if (!widgetClass.equals("Class")) { 
     344                                hashCode = multiplier * hashCode + index.hashCode(); 
     345                        } 
    331346                        hashCode = multiplier * hashCode + text.hashCode(); 
    332347                        return hashCode; 
Note: See TracChangeset for help on using the changeset viewer.