Ignore:
Timestamp:
09/04/14 16:38:21 (10 years ago)
Author:
dmay
Message:

Implement new command, that generates Jacareto indices. Also, get rid of all previous index hacks.

File:
1 edited

Legend:

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

    r1691 r1722  
    157157        // get the Java classname, ignore the package hierarchy if present 
    158158        String[] parts = getSpecification().getType().split("\\."); 
    159         String name = parts[parts.length - 1]; 
    160159 
    161160        // find the correct Jacareto index 
    162161        // jacareto indices start at 1 
    163         int jacIndex = getIndex() + 1; 
    164  
    165         // FIXME: some class specific hacks 
    166         if (name.equals("JFrame")) { 
    167             jacIndex++; 
    168         } 
    169         else if (name.equals("JLayeredPane")) { 
    170             jacIndex--; 
    171         } 
    172         else if (name.equals("JTextField")) { 
    173             jacIndex = 1; 
    174         } 
    175  
     162        int jacIndex = ((JFCGUIElementSpec) getSpecification()).getAltIndex() + 1; 
    176163        str = parts[parts.length - 1] + "_(" + jacIndex + ")"; 
    177164 
Note: See TracChangeset for help on using the changeset viewer.