Project

General

Profile

« Previous | Next » 

Revision 93e35cec

Added by Patrick Plitzner almost 8 years ago

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

View differences:

eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
47 47
CdmStoreConnector_COULD_NOT_CREATE_DATAMODEL=Could not create data model
48 48
CdmStoreConnector_CREATING_DATAMODEL=Creating data model for %s
49 49
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.
50
CdmStoreConnector_SUCCESS=Success
51
CdmStoreConnector_DATA_MODEL_CREATION_SUCCESSFUL=Data model created successfully
50 52
CdmStoreConnector_REASON=Reason: 
51 53
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
52 54
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.
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
47 47
CdmStoreConnector_COULD_NOT_CREATE_DATAMODEL=Could not create data model
48 48
CdmStoreConnector_CREATING_DATAMODEL=Erstelle Datenmodell f?r %s
49 49
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.
50
CdmStoreConnector_SUCCESS=Erfolgreich
51
CdmStoreConnector_DATA_MODEL_CREATION_SUCCESSFUL=Datenmodell wurde efolgreich erstellt
50 52
CdmStoreConnector_REASON=Grund: 
51 53
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
52 54
CdmStoreConnector_UPDATE_DATASOUREC_OR_CHOOSE_NEW_DATASOURCE=Bitte aktualisieren Sie die ausgew?hlte Datenquelle oder w?hlen Sie eine neue Datenquelle aus.
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
62 62
	public static String CdmStoreConnector_CHECK_IF_REACHABLE;
63 63
	public static String CdmStoreConnector_COMPATIBILITY_CHECK_FAILED;
64 64
	public static String CdmStoreConnector_COULD_NOT_CONNECT_TO_CHOSEN_DATASOURCE;
65
	public static String CdmStoreConnector_SUCCESS;
66
	public static String CdmStoreConnector_DATA_MODEL_CREATION_SUCCESSFUL;
65 67
	public static String CdmStoreConnector_COULD_NOT_CREATE_DATAMODEL;
66 68
	public static String CdmStoreConnector_CREATING_DATAMODEL;
67 69
	public static String CdmStoreConnector_ERROR_DURING_DATAMODEL_CREATION;
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStoreConnector.java
36 36
import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
37 37
import eu.etaxonomy.cdm.model.name.Rank;
38 38
import eu.etaxonomy.taxeditor.Messages;
39
import eu.etaxonomy.taxeditor.model.AbstractUtility;
39 40
import eu.etaxonomy.taxeditor.model.CdmProgressMonitorAdapter;
40 41
import eu.etaxonomy.taxeditor.model.MessagingUtils;
41 42
import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;
42 43
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
43 44
import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
44 45
import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog;
46
import eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart;
45 47

  
46 48

  
47 49
/**
......
111 113
            try {
112 114
                Thread.currentThread().setPriority(10);
113 115
                applicationController = getApplicationController(cdmSource,subprogressMonitor);
116
                MessagingUtils.informationDialog(Messages.CdmStoreConnector_SUCCESS, Messages.CdmStoreConnector_DATA_MODEL_CREATION_SUCCESSFUL);
117
                CdmDataSourceViewPart dataSourceView = (CdmDataSourceViewPart) AbstractUtility.getView("eu.etaxonomy.taxeditor.view.datasource", false);
118
                if(dataSourceView!=null){
119
                    dataSourceView.refresh();
120
                }
114 121
                return Status.OK_STATUS;
115 122
            } catch (Exception e) {
116 123
                if(! causeIsCancelationExceptionRecursive(e)){
117
                    MessagingUtils.errorDialog(Messages.CdmStoreConnector_COULD_NOT_CREATE_DATAMODEL, CdmStoreConnector.class, 
124
                    MessagingUtils.errorDialog(Messages.CdmStoreConnector_COULD_NOT_CREATE_DATAMODEL, CdmStoreConnector.class,
118 125
                    		String.format(Messages.CdmStoreConnector_ERROR_DURING_DATAMODEL_CREATION, cdmSource.getName()), TaxeditorStorePlugin.PLUGIN_ID, e, true);
119 126
                    return Status.CANCEL_STATUS;
120 127
                }
......
123 130
                Thread.currentThread().setPriority(oldPriority);
124 131
            }
125 132
        }
126

  
127
            return Status.CANCEL_STATUS;
133
        return Status.CANCEL_STATUS;
128 134

  
129 135
    }
130 136

  

Also available in: Unified diff