Project

General

Profile

« Previous | Next » 

Revision 757377b5

Added by Katja Luther about 8 years ago

fix concurrentModificationException

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java
14 14
import java.text.Collator;
15 15
import java.util.Comparator;
16 16
import java.util.HashSet;
17
import java.util.Iterator;
17 18
import java.util.List;
18 19
import java.util.Set;
19 20
import java.util.UUID;
......
223 224
	/** {@inheritDoc} */
224 225
	@Override
225 226
	public void refresh() {
226
		//initModel();
227
		filterExcludedObjects();
228 227
		super.refresh();
229 228
	}
230 229

  
......
312 311
		try {
313 312
			if(model != null){
314 313
				progressMonitor.beginTask("Looking for entities", model.size());
315
				for(UuidAndTitleCache<T> element : model){
314
				filterExcludedObjects();
315
				Iterator<UuidAndTitleCache<T>> iterator = model.iterator();
316
				UuidAndTitleCache<T> element;
317
				while(iterator.hasNext()){
318
				    element = iterator.next();
316 319
					contentProvider.add(element, itemsFilter);
317 320
					if (progressMonitor.isCanceled()) {
318 321
						throw new OperationCanceledException();
......
486 489
			            if (status == IStatus.OK) {
487 490

  
488 491
			                T entity = (T) wizard.getEntity();
489
			                model.add(new UuidAndTitleCache<T>(entity.getUuid(),
490
			                        entity.getId(),
491
			                        getTitle(entity)));
492
			               // model.add(new UuidAndTitleCache<T>(entity.getUuid(), entity.getId(), getTitle(entity)));
492 493
			                refresh();
493 494
			                setPattern(entity);
494 495
			                getConversationHolder().bind();

Also available in: Unified diff