if (!monitor.isCanceled()) {
CdmProgressMonitorAdapter subprogressMonitor = CdmProgressMonitorAdapter
- .CreateSubMonitor(monitor, IProgressMonitor.UNKNOWN);
+ .CreateSubMonitor(monitor, 7);
// This is where we instantiate the application controller
try {
applicationController = CdmApplicationController.NewInstance(
return new Status(IStatus.ERROR, "Could not connect to CDM Store", "An error occurred while trying to connect to datasource: " + dataSource.getName(), e);
}
}
-
+
monitor.done();
if (!monitor.isCanceled()) {
*/
@Override
public void setEntity(ENTITY entity) {
- if(entity != null && hasCollectionChanged(entity)){
+ if(entity != null){
super.setEntity(entity);
internalUpdateSection(false);
}
/**
* Whether the entities specific collection changed
*
+ * KLUDGE this seemingly leads to errors
+ *
* @param newEntity
* @return
*/
private boolean hasCollectionChanged(ENTITY newEntity){
- // return true on null
- if(getEntity() == null || newEntity == null) return true;
-
- // if the entities differ the collection has changed
- if(! getEntity().equals(newEntity)) return true;
-
- Collection<ELEMENT> oldCollection = getCollection(getEntity());
- Collection<ELEMENT> newCollection = getCollection(newEntity);
-
- // return true on null
- if(oldCollection == null || newCollection == null) return true;
-
- // if the collections are object equal, check if the content is equal, too
- if(oldCollection.equals(newCollection)){
-
- boolean equal = CollectionUtils.isEqualCollection(oldCollection, newCollection);
- // return true when collections are not equal
- return equal ? false : true;
- }
return true;
+
+// // return true on null
+// if(getEntity() == null || newEntity == null) return true;
+//
+// // if the entities differ the collection has changed
+// if(! getEntity().equals(newEntity)) return true;
+//
+// Collection<ELEMENT> oldCollection = getCollection(getEntity());
+// Collection<ELEMENT> newCollection = getCollection(newEntity);
+//
+// // return true on null
+// if(oldCollection == null || newCollection == null) return true;
+//
+// // if the collections are object equal, check if the content is equal, too
+// if(oldCollection.equals(newCollection)){
+//
+// boolean equal = CollectionUtils.isEqualCollection(oldCollection, newCollection);
+// // return true when collections are not equal
+// return equal ? false : true;
+// }
+// return true;
}
/**
import java.util.Collection;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.service.INameService;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.name.TypeDesignationBase;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/** {@inheritDoc} */
@Override
public void removeElement(TypeDesignationBase element) {
- getEntity().removeTypeDesignation(element);
+ CdmStore.getService(INameService.class).deleteTypeDesignation(getEntity(), element);
+
+// getEntity().removeTypeDesignation(element);
}
/*