Changeset 16536
- Timestamp:
- 2008-07-24T15:25:52+12:00 (16 years ago)
- Location:
- release-kits/shared/ant-tasks/orans
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
release-kits/shared/ant-tasks/orans/TreeCallTarget.java
r15143 r16536 119 119 //check that the target should be run given address,resume.mode, rusume.from and resume.to 120 120 String resumeFrom = this.getProject().getProperty("resume.from"); 121 String resumeDescend = this.getProject().getProperty("resume.descend"); 121 122 String resumeTo = this.getProject().getProperty("resume.to"); 122 String resumeMode = this.getProject().getProperty("resume.mode");123 124 boolean shouldExecOnFrom = false, shouldExecOnTo = false;125 123 126 124 //given resumeFrom, might we execute? 127 if ( resumeFrom == null ) { 128 shouldExecOnFrom = true; 129 130 } else { 131 132 //if the resumeFrom is a descendent of this, we must execute it no matter the Mode 133 if ( isDescendantOf(resumeFrom,address) ) { 134 shouldExecOnFrom = true; 135 136 } else { 137 138 if ( resumeMode == null ) { 139 //fallthrough mode 140 if ( isAfter(address,resumeFrom) ) { 141 shouldExecOnFrom = true; 142 } else { 143 shouldExecOnFrom = false; 144 } 145 146 } else if ( resumeMode.equals("descend") ) { 147 //descend mode 148 if ( isDescendantOf(address,resumeFrom) ) { 149 shouldExecOnFrom = true; 150 } else { 151 shouldExecOnFrom = false; 152 } 153 154 } else { 155 throw new BuildException( 156 "Only 'fallthrough' and 'descend' resume-modes are supported.", 157 getLocation() 158 ); 159 } 160 161 } 162 163 } 125 boolean shouldExecOnFrom = resumeFrom == null || isDescendantOf(resumeFrom,address) || isAfter(address,resumeFrom); 126 127 //given resumeDescend, might we execute? 128 boolean shouldExecuteOnDescend = resumeDescend == null || isDescendantOf(address,resumeFrom); 164 129 165 130 //given resumeTo, might we execute? 166 if ( resumeTo == null ) { 167 shouldExecOnTo = true; 168 } else { 169 if ( !isAfter(address,resumeTo) ) { 170 shouldExecOnTo = true; 171 } else { 172 shouldExecOnTo = false; 173 } 174 } 175 176 //check that both are true 177 boolean execute = ( shouldExecOnFrom && shouldExecOnTo ); 131 boolean shouldExecOnTo = resumeTo == null || !isAfter(address,resumeTo); 132 133 //check that all are true 134 boolean execute = shouldExecOnFrom && shouldExecuteOnDescend && shouldExecOnTo; 178 135 179 136 if ( execute ) {
Note:
See TracChangeset
for help on using the changeset viewer.