- refresh is invoked on the entire tree since caching the children
already boosts the performance
for (Object o : (Collection<?>)objectAffectedByOperation) {
if(o instanceof TermVocabularyDto){
contentProvider.removeVocabularyFromCache((TermVocabularyDto) o);
for (Object o : (Collection<?>)objectAffectedByOperation) {
if(o instanceof TermVocabularyDto){
contentProvider.removeVocabularyFromCache((TermVocabularyDto) o);
}
else if(o instanceof TermDto){
contentProvider.removeVocabularyFromCache(((TermDto) o).getVocabularyDto());
}
else if(o instanceof TermDto){
contentProvider.removeVocabularyFromCache(((TermDto) o).getVocabularyDto());
- viewer.refresh(((TermDto) o).getVocabularyDto());
- viewer.refresh(o);
itemsToSelect.add((TermDto) o);
}
}
}
if(objectAffectedByOperation instanceof TermVocabularyDto){
contentProvider.removeVocabularyFromCache((TermVocabularyDto) objectAffectedByOperation);
itemsToSelect.add((TermDto) o);
}
}
}
if(objectAffectedByOperation instanceof TermVocabularyDto){
contentProvider.removeVocabularyFromCache((TermVocabularyDto) objectAffectedByOperation);
itemsToSelect.add((AbstractTermDto) objectAffectedByOperation);
}
else if(objectAffectedByOperation instanceof TermDto){
TermDto termDto = (TermDto) objectAffectedByOperation;
itemsToSelect.add(termDto);
contentProvider.removeVocabularyFromCache(termDto.getVocabularyDto());
itemsToSelect.add((AbstractTermDto) objectAffectedByOperation);
}
else if(objectAffectedByOperation instanceof TermDto){
TermDto termDto = (TermDto) objectAffectedByOperation;
itemsToSelect.add(termDto);
contentProvider.removeVocabularyFromCache(termDto.getVocabularyDto());
- viewer.refresh(termDto.getVocabularyDto());
- }
- else{
- viewer.refresh(objectAffectedByOperation);
}
if(!itemsToSelect.isEmpty()){
StructuredSelection selection = new StructuredSelection(itemsToSelect);
}
if(!itemsToSelect.isEmpty()){
StructuredSelection selection = new StructuredSelection(itemsToSelect);
viewer.expandToLevel(termDto, 1);
}
}
viewer.expandToLevel(termDto, 1);
}
}
if(term.isInstanceOf(DefinedTermBase.class)){
DefinedTermBase definedTermBase = (DefinedTermBase) term;
CdmStore.getService(ITermService.class).merge(definedTermBase);
if(term.isInstanceOf(DefinedTermBase.class)){
DefinedTermBase definedTermBase = (DefinedTermBase) term;
CdmStore.getService(ITermService.class).merge(definedTermBase);
- viewer.refresh(TermDto.fromTerm(definedTermBase));
}
else if(term.isInstanceOf(TermVocabulary.class)){
TermVocabulary voc = (TermVocabulary) term;
CdmStore.getService(IVocabularyService.class).merge(voc);
}
else if(term.isInstanceOf(TermVocabulary.class)){
TermVocabulary voc = (TermVocabulary) term;
CdmStore.getService(IVocabularyService.class).merge(voc);
- viewer.refresh(new TermVocabularyDto(voc.getUuid(), voc.getRepresentations(), voc.getTermType()));
}
}
setDirty(false);
input.initialiseVocabularies();
changedTerms.clear();
}
}
setDirty(false);
input.initialiseVocabularies();
changedTerms.clear();
EventUtility.postEvent(WorkbenchEventConstants.REFRESH_SUPPLEMENTAL, true);
}
EventUtility.postEvent(WorkbenchEventConstants.REFRESH_SUPPLEMENTAL, true);
}