X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/blobdiff_plain/5291be06467aaace8e6a8bef365178a8d3ba2dd8..eeede4bd69f3aa1132cd1d058a3e1fcbba75b47e:/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/MessagingUtils.java diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/MessagingUtils.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/MessagingUtils.java index 7133c7271..c8f1e26a3 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/MessagingUtils.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/MessagingUtils.java @@ -194,6 +194,9 @@ public class MessagingUtils { server = activeCdmSource.getServer(); if(activeCdmSource instanceof CdmRemoteSource){ contextPath = ((CdmRemoteSource) activeCdmSource).getContextPath(); + if (contextPath != null && contextPath.startsWith("cdmserver/")){ + contextPath = contextPath.substring("cdmserver/".length()); + } } } @@ -202,7 +205,7 @@ public class MessagingUtils { } contextInfo.add("login : " + login); contextInfo.add("editor version : " + version); - contextInfo.add("server : " + server + " / " + name + (CdmUtils.isNotBlank(contextPath)?" / "+contextPath:"")); + contextInfo.add("server : " + server + " (" + name + ")" + (CdmUtils.isNotBlank(contextPath)?" / "+contextPath:"")); contextInfo.add("schema version : " + schemaVersion); contextInfo.add("os : " + System.getProperty("os.name")+" "+System.getProperty("os.version")+" "+System.getProperty("os.arch")); contextInfo.add("java : "+System.getProperty("java.version")); @@ -421,7 +424,7 @@ public class MessagingUtils { warningDialog(title, source, String.format("You are missing sufficient permissions for the operation \"%s\". %s", operationlabel, hint)); } else { title = "Error executing operation"; - errorDialog(title, source, String.format("An error occured while executing %s. %s", operationlabel, hint), pluginId, ex, true); + errorDialog(title, source, String.format("An error occurred while executing %s. %s", operationlabel, hint), pluginId, ex, true); } @@ -446,6 +449,12 @@ public class MessagingUtils { return MessageDialog.openQuestion(AbstractUtility.getShell(), title, message); } + public static int confirmDialog(String title, String message, String...labels){ + MessageDialog dialog =new MessageDialog(AbstractUtility.getShell(), title, null, message, MessageDialog.QUESTION,labels, 0); + int result = dialog.open(); + return result; + } + /** * Displays a message {@link org.eclipse.jface.dialogs.MessageDialog}. *