import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.TitleCacheComparator;
import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
public void performSearch(final BulkEditorQuery bulkEditorQuery) {
if(searchJob!=null && searchJob.getState()!=Job.NONE){
- MessagingUtils.informationDialog("Search not possible", "Please wait for the last search to finish or cancel it.");
+ MessagingUtils.informationDialog(Messages.AbstractBulkEditorInput_MULTIPLE_SEARCH_TITLE, Messages.AbstractBulkEditorInput_MULTIPLE_SEARCH_MESSAGE);
return;
}
model.clear();
IIdentifiableEntityServiceConfigurator configurator = bulkEditorQuery.getSearchConfigurator();
Comparator queryComparator = (bulkEditorQuery.getComparator() != null) ? bulkEditorQuery.getComparator() : new TitleCacheComparator();
- String jobLabel = "Loading "+getName();
+ String jobLabel = Messages.AbstractBulkEditorInput_LOADING+getName();
searchJob = Job.create(jobLabel, (ICoreRunnable) monitor -> {
monitor.beginTask(jobLabel, IProgressMonitor.UNKNOWN);
int pageNumber = 0;
try {
CdmStore.getCommonService().merge(mergeTarget.getUuid(), entity.getUuid(), (Class<? extends CdmBase>)entity.getClass());
} catch (MergeException e) {
- MessagingUtils.errorDialog("Bulk Editor Merge Error",
+ MessagingUtils.errorDialog(Messages.AbstractBulkEditorInput_MERGE_ERROR_TITLE,
this,
- "Could not merge chosen objects of type " + entity.getClass().getName(),
+ String.format(Messages.AbstractBulkEditorInput_MERGE_ERROR_MESSAGE, entity.getClass().getName()),
TaxeditorBulkeditorPlugin.PLUGIN_ID,
e,
true);
public String getText(T entity) {
if(entity instanceof IdentifiableEntity){
IdentifiableEntity identifiableEntity = (IdentifiableEntity) HibernateProxyHelper.deproxy(entity);
- String text = "";
+ String text = ""; //$NON-NLS-1$
if(markedMergeCandidates.contains(entity)){
- text += "[Candidate] ";
+ text += Messages.AbstractBulkEditorInput_CANDIDATE;
}
else if(markedMergeTarget==entity){
- text += "[Target] ";
+ text += Messages.AbstractBulkEditorInput_TARGET;
}
text += identifiableEntity.getTitleCache();
return text;
}
- return "No text. Implement in subclass";
+ return "No text. Implement in subclass"; //$NON-NLS-1$
}
public BasicEventList<T> getModel() {
public class Messages extends NLS {
private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.l10n.messages"; //$NON-NLS-1$
+ public static String AbstractBulkEditorInput_CANDIDATE;
+ public static String AbstractBulkEditorInput_LOADING;
+ public static String AbstractBulkEditorInput_MERGE_ERROR_MESSAGE;
+ public static String AbstractBulkEditorInput_MERGE_ERROR_TITLE;
+ public static String AbstractBulkEditorInput_MULTIPLE_SEARCH_MESSAGE;
+ public static String AbstractBulkEditorInput_MULTIPLE_SEARCH_TITLE;
+ public static String AbstractBulkEditorInput_TARGET;
public static String USER_CREATOR_user_exists_title;
public static String USER_CREATOR_user_exists;
public static String BulkEditorE4_CANCEL;
+AbstractBulkEditorInput_CANDIDATE=[Candidate]
+AbstractBulkEditorInput_LOADING=Loading
+AbstractBulkEditorInput_MERGE_ERROR_MESSAGE=Could not merge chosen objects of type %s
+AbstractBulkEditorInput_MERGE_ERROR_TITLE=Merging failes
+AbstractBulkEditorInput_MULTIPLE_SEARCH_MESSAGE=Please wait for the last search to finish or cancel it.
+AbstractBulkEditorInput_MULTIPLE_SEARCH_TITLE=Search not possible
+AbstractBulkEditorInput_TARGET=[Target]
BulkEditorE4_CANCEL=Cancel
BulkEditorE4_DONT_SAVE=Don't save (and Search)
BulkEditorE4_SAVE_AND_SEARCH=Save (and Search)
+AbstractBulkEditorInput_CANDIDATE=[Kandidat]
+AbstractBulkEditorInput_LOADING=Lade
+AbstractBulkEditorInput_MERGE_ERROR_MESSAGE=Zusammenführen von Objekten des Typen %s fehlgeschlagen
+AbstractBulkEditorInput_MERGE_ERROR_TITLE=Zusammenführen fehlgeschlagen
+AbstractBulkEditorInput_MULTIPLE_SEARCH_MESSAGE=Bitte warten Sie, bis die letzte Suche beendet wurde oder brechen Sie sie ab.
+AbstractBulkEditorInput_MULTIPLE_SEARCH_TITLE=Suche nicht möglich
+AbstractBulkEditorInput_TARGET=[Ziel]
BulkEditorE4_CANCEL=Abbrechen
BulkEditorE4_DONT_SAVE=Nicht specichern (und suchen)
BulkEditorE4_SAVE_AND_SEARCH=Speichern (und suchen)