Changeset 1490 for trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLServer.java
- Timestamp:
- 04/07/14 08:42:08 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLServer.java
r1276 r1490 16 16 17 17 import de.ugoe.cs.autoquest.eventcore.guimodel.IFrame; 18 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement; 18 19 19 20 /** … … 86 87 } 87 88 89 /* (non-Javadoc) 90 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement#getDistanceTo(IGUIElement) 91 */ 92 @Override 93 public double getDistanceTo(IGUIElement otherElement) { 94 if (otherElement instanceof HTMLServer) { 95 if (this.equals(otherElement)) { 96 return DISTANCE_NONE; 97 } 98 else { 99 return DISTANCE_DISTINCT_SERVER; 100 } 101 } 102 else if (otherElement instanceof HTMLDocument) { 103 if (this.equals(((HTMLDocument) otherElement).getServer())) { 104 return DISTANCE_SAME_SERVER; 105 } 106 else { 107 return DISTANCE_DISTINCT_SERVER; 108 } 109 } 110 else if (otherElement instanceof HTMLPageElement) { 111 HTMLServerSpec serverSpec = 112 ((HTMLPageElementSpec) otherElement.getSpecification()).getPage().getServer(); 113 114 if (this.getSpecification().getSimilarity(serverSpec)) { 115 return DISTANCE_SAME_SERVER; 116 } 117 else { 118 return DISTANCE_DISTINCT_SERVER; 119 } 120 } 121 122 return DISTANCE_DISTINCT_SERVER; 123 } 124 88 125 }
Note: See TracChangeset
for help on using the changeset viewer.