comparison dwtx/text/edits/TextEditGroup.d @ 156:a9566845f1cb

...
author Frank Benoit <benoit@tionex.de>
date Mon, 25 Aug 2008 19:03:46 +0200
parents f70d9508c95c
children 7926b636c282
comparison
equal deleted inserted replaced
155:8442b6b2da2d 156:a9566845f1cb
164 * the edits managed by this group. 164 * the edits managed by this group.
165 * 165 *
166 * @return the managed text edits 166 * @return the managed text edits
167 */ 167 */
168 public TextEdit[] getTextEdits() { 168 public TextEdit[] getTextEdits() {
169 return (TextEdit[]) fEdits.toArray(new TextEdit[fEdits.size()]); 169 return arraycast!(TextEdit)( fEdits.toArray());
170 } 170 }
171 171
172 /** 172 /**
173 * Returns the text region covered by the edits managed via this 173 * Returns the text region covered by the edits managed via this
174 * edit group. If the group doesn't manage any edits <code>null 174 * edit group. If the group doesn't manage any edits <code>null
182 if (size is 0) { 182 if (size is 0) {
183 return null; 183 return null;
184 } else if (size is 1) { 184 } else if (size is 1) {
185 return (cast(TextEdit)fEdits.get(0)).getRegion(); 185 return (cast(TextEdit)fEdits.get(0)).getRegion();
186 } else { 186 } else {
187 return TextEdit.getCoverage((TextEdit[])fEdits.toArray(new TextEdit[fEdits.size()])); 187 return TextEdit.getCoverage(arraycast!(TextEdit)(fEdits.toArray()));
188 } 188 }
189 } 189 }
190 } 190 }