Revision c97430d7
Added by Patrick Plitzner almost 8 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java | ||
---|---|---|
238 | 238 |
} |
239 | 239 |
} |
240 | 240 |
viewer.setInput(rootElements); |
241 |
refreshTree(); |
|
241 |
refreshTree(false);
|
|
242 | 242 |
previousCdmEntitySession.bind(); |
243 | 243 |
} |
244 | 244 |
} |
... | ... | |
369 | 369 |
* Refreshes the derivate hierarchy tree |
370 | 370 |
*/ |
371 | 371 |
public void refreshTree(){ |
372 |
refreshTree(true); |
|
373 |
} |
|
374 |
|
|
375 |
/** |
|
376 |
* Refreshes the derivate hierarchy tree |
|
377 |
* @param refreshViewer if <code>true</code> then also the |
|
378 |
* viewer will be refreshed. This was implemented due to |
|
379 |
* performance reasons. If passing <code>false</code> |
|
380 |
* does what was expected use <code>false</code> preferably. |
|
381 |
*/ |
|
382 |
public void refreshTree(boolean refreshViewer){ |
|
372 | 383 |
//refresh typedesignations |
373 | 384 |
labelProvider.refresh(); |
374 |
viewer.refresh(); |
|
385 |
if(refreshViewer){ |
|
386 |
viewer.refresh(); |
|
387 |
} |
|
375 | 388 |
} |
376 | 389 |
|
377 | 390 |
//FIXME:Remoting hack to make this work for remoting |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateLabelProvider.java | ||
---|---|---|
230 | 230 |
DerivedUnit derivedUnit = (DerivedUnit)derivate; |
231 | 231 |
if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.PreservedSpecimen){ |
232 | 232 |
//check for type designation |
233 |
if(typeDesignations.isEmpty()){
|
|
233 |
if(typeDesignations.get(derivedUnit)==null){
|
|
234 | 234 |
for (SpecimenTypeDesignation specimenTypeDesignation : CdmStore.getService(IOccurrenceService.class).listTypeDesignations(derivedUnit, null, null, null, null)) { |
235 | 235 |
addTypeDesignation(derivedUnit, specimenTypeDesignation); |
236 | 236 |
} |
... | ... | |
414 | 414 |
* @param multiLinkSingleReads |
415 | 415 |
*/ |
416 | 416 |
public void refresh() { |
417 |
this.multiLinkSingleReads = new HashSet<SingleRead>();
|
|
417 |
DerivateLabelProvider.multiLinkSingleReads = new HashSet<SingleRead>();
|
|
418 | 418 |
for(Entry<SingleRead, Collection<Sequence>> entry:CdmStore.getService(ISequenceService.class).getSingleReadSequencesMap().entrySet()){ |
419 | 419 |
if(entry.getValue().size()>1){ |
420 | 420 |
multiLinkSingleReads.add(entry.getKey()); |
421 | 421 |
} |
422 | 422 |
} |
423 |
this.typeDesignations = new HashMap<DerivedUnit, List<SpecimenTypeDesignation>>();
|
|
423 |
DerivateLabelProvider.typeDesignations = new HashMap<DerivedUnit, List<SpecimenTypeDesignation>>();
|
|
424 | 424 |
} |
425 | 425 |
|
426 | 426 |
private static void addTypeDesignation(DerivedUnit derivedUnit, SpecimenTypeDesignation typeDesignation){ |
Also available in: Unified diff
Fix label type info