comparison dwtx/text/edits/TextEditCopier.d @ 159:7926b636c282

...
author Frank Benoit <benoit@tionex.de>
date Wed, 27 Aug 2008 01:57:58 +0200
parents f70d9508c95c
children
comparison
equal deleted inserted replaced
158:25f1f92fa3df 159:7926b636c282
66 * @param edit the edit to copy 66 * @param edit the edit to copy
67 * 67 *
68 * @see #perform() 68 * @see #perform()
69 */ 69 */
70 public this(TextEdit edit) { 70 public this(TextEdit edit) {
71 super(); 71 // super();
72 Assert.isNotNull(edit); 72 Assert.isNotNull(edit);
73 fEdit= edit; 73 fEdit= edit;
74 fCopies= new HashMap(); 74 fCopies= new HashMap();
75 } 75 }
76 76
82 public TextEdit perform() { 82 public TextEdit perform() {
83 TextEdit result= doCopy(fEdit); 83 TextEdit result= doCopy(fEdit);
84 if (result !is null) { 84 if (result !is null) {
85 for (Iterator iter= fCopies.keySet().iterator(); iter.hasNext();) { 85 for (Iterator iter= fCopies.keySet().iterator(); iter.hasNext();) {
86 TextEdit edit= cast(TextEdit)iter.next(); 86 TextEdit edit= cast(TextEdit)iter.next();
87 edit.postProcessCopy(this); 87 edit.postProcessCopy_package(this);
88 } 88 }
89 } 89 }
90 return result; 90 return result;
91 } 91 }
92 92
104 } 104 }
105 105
106 //---- helper methods -------------------------------------------- 106 //---- helper methods --------------------------------------------
107 107
108 private TextEdit doCopy(TextEdit edit) { 108 private TextEdit doCopy(TextEdit edit) {
109 TextEdit result= edit.doCopy(); 109 TextEdit result= edit.doCopy_package();
110 List children= edit.internalGetChildren(); 110 List children= edit.internalGetChildren();
111 if (children !is null) { 111 if (children !is null) {
112 List newChildren= new ArrayList(children.size()); 112 List newChildren= new ArrayList(children.size());
113 for (Iterator iter= children.iterator(); iter.hasNext();) { 113 for (Iterator iter= children.iterator(); iter.hasNext();) {
114 TextEdit childCopy= doCopy(cast(TextEdit)iter.next()); 114 TextEdit childCopy= doCopy(cast(TextEdit)iter.next());