Revision 41e2f693
Added by Cherian Mathew over 9 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStoreConnector.java | ||
---|---|---|
34 | 34 |
import eu.etaxonomy.cdm.model.metadata.CdmMetaData; |
35 | 35 |
import eu.etaxonomy.cdm.model.metadata.CdmMetaData.MetaDataPropertyName; |
36 | 36 |
import eu.etaxonomy.taxeditor.model.CdmProgressMonitorAdapter; |
37 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
|
37 | 38 |
import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog; |
38 | 39 |
import eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart; |
39 | 40 |
|
... | ... | |
128 | 129 |
} |
129 | 130 |
}); |
130 | 131 |
|
131 |
StoreUtil.info("Application context initialized.");
|
|
132 |
MessagingUtils.info("Application context initialized.");
|
|
132 | 133 |
return Status.OK_STATUS; |
133 | 134 |
} else { |
134 | 135 |
// Show datasource view if not shown yet |
... | ... | |
201 | 202 |
|
202 | 203 |
if (!result) { |
203 | 204 |
// Show an error message |
204 |
StoreUtil
|
|
205 |
.errorDialog(
|
|
205 |
MessagingUtils
|
|
206 |
.messageDialog(
|
|
206 | 207 |
"DatabaseCompatibilityCheck failed", |
207 | 208 |
this, |
208 | 209 |
"The database schema for the chosen " |
... | ... | |
246 | 247 |
cdmSource.checkConnection(); |
247 | 248 |
monitor.worked(1); |
248 | 249 |
} catch (CdmSourceException e) { |
249 |
StoreUtil.errorDialog("Could not connect to chosen datasource",
|
|
250 |
MessagingUtils.messageDialog("Could not connect to chosen datasource",
|
|
250 | 251 |
this, "Reason: " + e.getMessage(), e); |
251 | 252 |
monitor.setCanceled(true); |
252 | 253 |
} |
Also available in: Unified diff
Moved all logging and dialog functionality to the new class MessagingUtils.
Refactoring code to adapt to above change.
Added new custom error dialog - CdmErrorDialog
Added runtime exception handling to the ApplicationWorkbenchAdvisor by adding a custom status handler