command.label.2 = Remove as Candidate(s) for Duplicate Removal
command.label.3 = De-Duplicate Group
command.label.4 = Delete
-command.label.5 = Convert Team to Person
+command.label.5 = Convert to Person
command.name = Merge Group
command.name.0 = Set as Target for Group Merge
command.name.1 = Dynamic Open Bulk Editor
command.name.5 = Remove as Candidate for Group Merge
command.name.6 = Set Marker Flag
command.name.7 = delete
-command.name.8 = convert Team to Person
-command.name.9 = convert Person to Team
+command.name.8 = convert to Person
+command.name.9 = convert to Team
specification.label = Merge Candidate Annotation
specification.label.0 = Merge Target Annotation
-command.label.6 = Convert Person to Team
+command.label.6 = Convert to Team
command.name.10 = convert Person to Team
\ No newline at end of file
command.label.1 = Markiere als Kandidat(en) f\u00fcr Duplikatenentfernung
command.label.2 = Entferne Kandidat f\u00fcr Duplikatenentfernung
command.label.3 = Dedupliziere Gruppe
-command.label.4 = L\u00f6schen
\ No newline at end of file
+command.label.4 = L\u00f6schen
+command.label.5 = Umwandeln in Person
+command.label.6 = Umwandeln in Team
\ No newline at end of file
import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation;\r
import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotationModel;\r
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;\r
+import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;\r
import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
import eu.etaxonomy.taxeditor.store.CdmStore;\r
\r
try {\r
team = CdmStore.getService(IAgentService.class).convertPerson2Team(person);\r
} catch (IllegalArgumentException e) {\r
- MessagingUtils.errorDialog("Can not convert Team to Person", null, e.getMessage(), null,e, true);\r
+ MessagingUtils.errorDialog("Can not convert Person into a Team", null, e.getLocalizedMessage(), TaxeditorBulkeditorPlugin.PLUGIN_ID,e, true);\r
} catch (MergeException e) {\r
- MessagingUtils.errorDialog("Can not convert Team to Person", null, e.getMessage(), null,e, true);\r
+ MessagingUtils.errorDialog("Can not convert Person into a Team", null, e.getMessage(), TaxeditorBulkeditorPlugin.PLUGIN_ID,e, true);\r
}\r
}else{\r
- MessagingUtils.informationDialog("Can not convert Team to Person", "convertTeam2Person can only be called on a team.");\r
+ MessagingUtils.informationDialog("Can not convert Person into a Team", "convert Person to Team can only be called on a person.");\r
}\r
\r
if (team != null){\r
import eu.etaxonomy.cdm.model.common.Group;
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
import eu.etaxonomy.cdm.model.common.User;
-
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation;
import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotationModel;
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
+import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
import eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView;
-
-
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
result = service.delete((TeamOrPersonBase)object);
}
} catch (Exception e){
- MessagingUtils.messageDialog("Exception occured. Could not delete", getClass(), e.getMessage(), null);
+ MessagingUtils.errorDialog("Exception occured. Delete not possible", getClass(), e.getMessage(), TaxeditorBulkeditorPlugin.PLUGIN_ID, null, true);
}
if (result.isError() || result.isAbort()){
if (!result.getExceptions().isEmpty()) {
- MessagingUtils.messageDialog("Could not delete", getClass(), result.getExceptions().toString(), null);
+ String message = null;
+ int i = result.getExceptions().size();
+ for (Exception e:result.getExceptions()){
+ i--;
+ message+= e.getMessage();
+ if (i>0){
+ message+= ", ";
+ }
+ }
+
+
+ MessagingUtils.messageDialog("Delete not possible", getClass(), result.getExceptions().toString(), null);
}else{
- MessagingUtils.messageDialog("Could not delete", getClass(), "The object could not be deleted. An exception occured.", null);
+ MessagingUtils.messageDialog("Delete not possible", getClass(), "The object could not be deleted. An exception occured.", null);
}
}
if (result.isOk() ){
((BulkEditor) editor).removeAnnotatedLine(annotation);
- if(result.getUpdatedObjects().size() != 0 && !result.getExceptions().isEmpty()){
+ if(result.getUpdatedObjects().size() != 0 || !result.getExceptions().isEmpty()){
MessagingUtils.informationDialog("Delete successfull", "The object is deleted but there are updated objects: " + result.toString());
}
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.api.service.IClassificationService;
import eu.etaxonomy.cdm.model.common.CdmBase;
-
import eu.etaxonomy.cdm.model.taxon.TaxonNaturalComparator;
-import eu.etaxonomy.cdm.model.taxon.TaxonNodeComparator;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.cdm.model.taxon.TaxonNodeByRankAndNameComparator;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.model.DataChangeBridge;
import eu.etaxonomy.taxeditor.model.IDataChangeBehavior;
/** {@inheritDoc} */
@Override
protected IAdaptable getInitialInput() {
- Comparator comparator;
+ Comparator<TaxonNode> comparator;
if (PreferencesUtil.getSortNodesNaturally()){
comparator = new TaxonNaturalComparator();
} else{
- comparator = new TaxonNodeComparator();
+ comparator = new TaxonNodeByRankAndNameComparator();
}
TaxonNodeNavigatorComparator viewerComparator = new TaxonNodeNavigatorComparator(comparator);
this.getCommonViewer().setComparator(viewerComparator);
package eu.etaxonomy.taxeditor.navigation.navigator;
-import java.util.Arrays;
import java.util.Comparator;
-
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
-
-import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-
import eu.etaxonomy.cdm.model.taxon.TaxonNaturalComparator;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.IdentifiableSourceElement;
public class TaxonNodeNavigatorComparator extends ViewerComparator{
- public TaxonNodeNavigatorComparator(Comparator<TaxonBase> comparator){
+ public TaxonNodeNavigatorComparator(Comparator<TaxonNode> comparator){
super(comparator);
}
MessagingUtils.informationDialog("Synonym created but taxon is not deleted.", exceptionString);
} else if (result.isAbort() || result.isError()){
- MessagingUtils.errorDialog("Synonym could not created", null, result.toString(), null, null, true);
+ MessagingUtils.errorDialog("Synonym could not created", null, result.toString(), TaxeditorNavigationPlugin.PLUGIN_ID, null, true);
}
} catch (IllegalArgumentException e) {
MessagingUtils.errorDialog("Operation failed", this, e.getMessage(), TaxeditorNavigationPlugin.PLUGIN_ID, e, false);
<java.codelevel>1.6</java.codelevel>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cdmlib.version>3.7.0</cdmlib.version>
- <!-- TODO can we use project.version ????? -->
<tycho.version>0.22.0</tycho.version>
<taxeditor.version>3.7.0</taxeditor.version>
<update.dir>snapshot</update.dir>