Tweak performance for typeDesignation cache in label provider
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / view / derivate / DerivateView.java
index 811c1e3343a34bb7fd07b8585d9a661f75fa95b2..25ebd89bd2dbec93dcebef48c7b7775e192e577b 100644 (file)
@@ -238,7 +238,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
                 derivates = CdmStore.getService(IOccurrenceService.class).load(new ArrayList(derivativeUuids), SPECIMEN_INIT_STRATEGY);
             }
             updateRootEntities(derivates);
-            refreshTree(false);
+            labelProvider.initCache(derivates);
             previousCdmEntitySession.bind();
         }
     }
@@ -390,22 +390,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
      * Refreshes the derivate hierarchy tree
      */
     public void refreshTree(){
-        refreshTree(true);
-    }
-
-    /**
-     * Refreshes the derivate hierarchy tree
-     * @param refreshViewer if <code>true</code> then also the
-     * viewer will be refreshed. This was implemented due to
-     * performance reasons. If passing <code>false</code>
-     * does what was expected use <code>false</code> preferably.
-     */
-    public void refreshTree(boolean refreshViewer){
-        //refresh typedesignations
-        labelProvider.refresh();
-        if(refreshViewer){
-            viewer.refresh();
-        }
+        viewer.refresh();
     }
 
     //FIXME:Remoting hack to make this work for remoting