comparison dwtx/jface/text/source/projection/ProjectionAnnotationModel.d @ 162:1a5b8f8129df

...
author Frank Benoit <benoit@tionex.de>
date Mon, 08 Sep 2008 00:51:37 +0200
parents f70d9508c95c
children
comparison
equal deleted inserted replaced
161:f8d52b926852 162:1a5b8f8129df
116 return expandAll(offset, length, true); 116 return expandAll(offset, length, true);
117 } 117 }
118 118
119 /** 119 /**
120 * Collapses all annotations that overlap with the given range and are collapsed. 120 * Collapses all annotations that overlap with the given range and are collapsed.
121 * 121 *
122 * @param offset the range offset 122 * @param offset the range offset
123 * @param length the range length 123 * @param length the range length
124 * @return <code>true</code> if any annotation has been collapse, <code>false</code> 124 * @return <code>true</code> if any annotation has been collapse, <code>false</code>
125 * otherwise 125 * otherwise
126 * @since 3.2 126 * @since 3.2
145 if (collapsing) 145 if (collapsing)
146 fireModelChanged(); 146 fireModelChanged();
147 147
148 return collapsing; 148 return collapsing;
149 } 149 }
150 150
151 /** 151 /**
152 * Expands all annotations that overlap with the given range and are collapsed. Fires a model change event if 152 * Expands all annotations that overlap with the given range and are collapsed. Fires a model change event if
153 * requested. 153 * requested.
154 * 154 *
155 * @param offset the offset of the range 155 * @param offset the offset of the range
156 * @param length the length of the range 156 * @param length the length of the range
157 * @param fireModelChanged <code>true</code> if a model change event 157 * @param fireModelChanged <code>true</code> if a model change event
158 * should be fired, <code>false</code> otherwise 158 * should be fired, <code>false</code> otherwise
159 * @return <code>true</code> if any annotation has been expanded, <code>false</code> otherwise 159 * @return <code>true</code> if any annotation has been expanded, <code>false</code> otherwise
160 */ 160 */
161 protected bool expandAll(int offset, int length, bool fireModelChanged) { 161 protected bool expandAll(int offset, int length, bool fireModelChanged_) {
162 162
163 bool expanding= false; 163 bool expanding= false;
164 164
165 Iterator iterator= getAnnotationIterator(); 165 Iterator iterator= getAnnotationIterator();
166 while (iterator.hasNext()) { 166 while (iterator.hasNext()) {
173 expanding= true; 173 expanding= true;
174 } 174 }
175 } 175 }
176 } 176 }
177 177
178 if (expanding && fireModelChanged) 178 if (expanding && fireModelChanged_)
179 fireModelChanged(); 179 fireModelChanged();
180 180
181 return expanding; 181 return expanding;
182 } 182 }
183 183