Changeset 1678 for trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/guimodel
- Timestamp:
- 08/14/14 17:07:17 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/guimodel/JFCGUIElement.java
r1674 r1678 87 87 * @return the name 88 88 */ 89 String getName() {89 public String getName() { 90 90 return specification.getName(); 91 91 } … … 128 128 * 129 129 * @see 130 * de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#updateSpecification(de.ugoe.cs.autoquest .eventcore131 * . guimodel.IGUIElementSpec)130 * de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#updateSpecification(de.ugoe.cs.autoquest 131 * .eventcore .guimodel.IGUIElementSpec) 132 132 */ 133 133 @Override … … 152 152 } 153 153 154 /*155 * (non-Javadoc)156 *157 * @see java.lang.Object#toString()158 */159 154 public String getJacaretoHierarchy() { 160 String str = getElementDescriptor() + "_(" + getIndex() + ")"; 155 String str; 156 157 // get the Java classname, ignore the package hierarchy if present 158 String[] parts = getSpecification().getType().split("\\."); 159 String name = parts[parts.length - 1]; 160 161 // find the correct Jacareto index 162 // jacareto indices start at 1 163 int jacIndex = getIndex() + 1; 164 // some class specific hacks 165 if (name.equals("JFrame")) { 166 jacIndex++; 167 } 168 else if (name.equals("JLayeredPane")) { 169 jacIndex--; 170 } 171 172 str = parts[parts.length - 1] + "_(" + jacIndex + ")"; 173 161 174 if (getParent() != null) { 162 175 return ((JFCGUIElement) getParent()).getJacaretoHierarchy() + "." + str; … … 164 177 return str; 165 178 } 166 179 167 180 /* 168 181 * (non-Javadoc) … … 178 191 } 179 192 180 /* (non-Javadoc) 193 /* 194 * (non-Javadoc) 195 * 181 196 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getDistanceTo(IGUIElement) 182 197 */
Note: See TracChangeset
for help on using the changeset viewer.