commit 93e35cecaed1d37213ecd06ab3a6119092b68830
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Tue May 31 11:21:02 2016 +0200

    Show message when data model creation was succeessful and refresh data
    source view #5758

diff --git a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
index 24fddb501..9675726a1 100644
--- a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
+++ b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
@@ -47,6 +47,8 @@ CdmStoreConnector_COULD_NOT_CONNECT_TO_CHOSEN_DATASOURCE=Could not connect to ch
 CdmStoreConnector_COULD_NOT_CREATE_DATAMODEL=Could not create data model
 CdmStoreConnector_CREATING_DATAMODEL=Creating data model for %s
 CdmStoreConnector_ERROR_DURING_DATAMODEL_CREATION=An error occurred while trying to create data model for data source: %s\nPlease clear the data base and retry.
+CdmStoreConnector_SUCCESS=Success
+CdmStoreConnector_DATA_MODEL_CREATION_SUCCESSFUL=Data model created successfully
 CdmStoreConnector_REASON=Reason: 
 CdmStoreConnector_SCHEME_NOT_COMPATIBLE=The database schema for the chosen datasource '%s' \n is not compatible for this version of the taxonomic editor. \n\n%s
 CdmStoreConnector_UPDATE_DATASOUREC_OR_CHOOSE_NEW_DATASOURCE=Please update the chosen datasource or choose a new data source to connect to in the Datasource View.
diff --git a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
index 924a4500f..8f3745f4f 100644
--- a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
+++ b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
@@ -47,6 +47,8 @@ CdmStoreConnector_COULD_NOT_CONNECT_TO_CHOSEN_DATASOURCE=Verbindung zur ausgew
 CdmStoreConnector_COULD_NOT_CREATE_DATAMODEL=Could not create data model
 CdmStoreConnector_CREATING_DATAMODEL=Erstelle Datenmodell für %s
 CdmStoreConnector_ERROR_DURING_DATAMODEL_CREATION=Ein Fehler ist aufgetreten bei der Erstellung des Datenmodells für: %s\nBitte leeren Sie die Datenbank und versuchen es erneut.
+CdmStoreConnector_SUCCESS=Erfolgreich
+CdmStoreConnector_DATA_MODEL_CREATION_SUCCESSFUL=Datenmodell wurde efolgreich erstellt
 CdmStoreConnector_REASON=Grund: 
 CdmStoreConnector_SCHEME_NOT_COMPATIBLE=Das Datenbankschema für die gewählte Datenquelle '%s' \n ist nicht kompatibel mit dieser Version des Editors. \n\n%s
 CdmStoreConnector_UPDATE_DATASOUREC_OR_CHOOSE_NEW_DATASOURCE=Bitte aktualisieren Sie die ausgewählte Datenquelle oder wählen Sie eine neue Datenquelle aus.
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
index 4091a2eb6..e71b2d0a2 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
@@ -62,6 +62,8 @@ public class Messages extends NLS {
 	public static String CdmStoreConnector_CHECK_IF_REACHABLE;
 	public static String CdmStoreConnector_COMPATIBILITY_CHECK_FAILED;
 	public static String CdmStoreConnector_COULD_NOT_CONNECT_TO_CHOSEN_DATASOURCE;
+	public static String CdmStoreConnector_SUCCESS;
+	public static String CdmStoreConnector_DATA_MODEL_CREATION_SUCCESSFUL;
 	public static String CdmStoreConnector_COULD_NOT_CREATE_DATAMODEL;
 	public static String CdmStoreConnector_CREATING_DATAMODEL;
 	public static String CdmStoreConnector_ERROR_DURING_DATAMODEL_CREATION;
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStoreConnector.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStoreConnector.java
index 1313b0473..9b49a293b 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStoreConnector.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStoreConnector.java
@@ -36,12 +36,14 @@ import eu.etaxonomy.cdm.model.metadata.CdmMetaData;
 import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
 import eu.etaxonomy.cdm.model.name.Rank;
 import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.CdmProgressMonitorAdapter;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
 import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog;
+import eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart;
 
 
 /**
@@ -111,10 +113,15 @@ class CdmStoreConnector extends Job {
             try {
                 Thread.currentThread().setPriority(10);
                 applicationController = getApplicationController(cdmSource,subprogressMonitor);
+                MessagingUtils.informationDialog(Messages.CdmStoreConnector_SUCCESS, Messages.CdmStoreConnector_DATA_MODEL_CREATION_SUCCESSFUL);
+                CdmDataSourceViewPart dataSourceView = (CdmDataSourceViewPart) AbstractUtility.getView("eu.etaxonomy.taxeditor.view.datasource", false);
+                if(dataSourceView!=null){
+                    dataSourceView.refresh();
+                }
                 return Status.OK_STATUS;
             } catch (Exception e) {
                 if(! causeIsCancelationExceptionRecursive(e)){
-                    MessagingUtils.errorDialog(Messages.CdmStoreConnector_COULD_NOT_CREATE_DATAMODEL, CdmStoreConnector.class, 
+                    MessagingUtils.errorDialog(Messages.CdmStoreConnector_COULD_NOT_CREATE_DATAMODEL, CdmStoreConnector.class,
                     		String.format(Messages.CdmStoreConnector_ERROR_DURING_DATAMODEL_CREATION, cdmSource.getName()), TaxeditorStorePlugin.PLUGIN_ID, e, true);
                     return Status.CANCEL_STATUS;
                 }
@@ -123,8 +130,7 @@ class CdmStoreConnector extends Job {
                 Thread.currentThread().setPriority(oldPriority);
             }
         }
-
-            return Status.CANCEL_STATUS;
+        return Status.CANCEL_STATUS;
 
     }
 
