Revision af45abb8
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/MessagingUtils.java | ||
---|---|---|
549 | 549 |
+ "connected to a datasource. You may choose a datasource to connect to or create a new one in the datasource view."); |
550 | 550 |
} |
551 | 551 |
|
552 |
/** |
|
553 |
* Standard warning dialog for the case when the datasource is not available |
|
554 |
* |
|
555 |
* @param source |
|
556 |
*/ |
|
557 |
public static void dataSourceNotAvailableWarningDialog(Object source) { |
|
558 |
MessagingUtils |
|
559 |
.warningDialog( |
|
560 |
"The datasource is not available", |
|
561 |
source, |
|
562 |
"The choosen datasource is not available, please contact the administrator."); |
|
563 |
} |
|
564 |
|
|
565 |
|
|
552 | 566 |
/** |
553 | 567 |
* Displays a warning {@link org.eclipse.jface.dialogs.MessageDialog}. |
554 | 568 |
* |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.java | ||
---|---|---|
58 | 58 |
import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository; |
59 | 59 |
import eu.etaxonomy.taxeditor.io.ExportManager; |
60 | 60 |
import eu.etaxonomy.taxeditor.io.ImportManager; |
61 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
|
62 | 61 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
63 | 62 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
64 | 63 |
import eu.etaxonomy.taxeditor.remoting.cache.CdmRemoteCacheManager; |
... | ... | |
67 | 66 |
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin; |
68 | 67 |
import eu.etaxonomy.taxeditor.ui.dialog.RemotingLoginDialog; |
69 | 68 |
import eu.etaxonomy.taxeditor.util.ProgressMonitorClientManager; |
70 |
import eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart; |
|
71 | 69 |
import eu.etaxonomy.taxeditor.webapp.CDMServer; |
72 | 70 |
|
73 | 71 |
/** |
... | ... | |
131 | 129 |
return instance; |
132 | 130 |
} else{// if (instance == null || !instance.isConnected) { |
133 | 131 |
|
134 |
MessagingUtils.noDataSourceWarningDialog(instance); |
|
132 |
MessagingUtils.dataSourceNotAvailableWarningDialog(instance); |
|
133 |
|
|
135 | 134 |
|
136 |
AbstractUtility.showView(CdmDataSourceViewPart.ID); |
|
137 | 135 |
return null; |
138 | 136 |
} |
139 | 137 |
} |
... | ... | |
266 | 264 |
ICdmSource cdmSource) { |
267 | 265 |
instance = new CdmStore(applicationController, cdmSource); |
268 | 266 |
CdmApplicationState.setCdmServiceCacher(new CdmServiceCacher()); |
269 |
|
|
267 |
|
|
270 | 268 |
} |
271 | 269 |
|
272 | 270 |
private CdmStore(ICdmApplicationConfiguration applicationController, |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java | ||
---|---|---|
479 | 479 |
startManagedServer(); |
480 | 480 |
} else { |
481 | 481 |
connect(); |
482 |
PreferencesUtil.setNomenclaturalCodePreferences(); |
|
482 |
if (CdmStore.isActive()){ |
|
483 |
PreferencesUtil.setNomenclaturalCodePreferences(); |
|
484 |
} |
|
485 |
|
|
483 | 486 |
} |
484 | 487 |
} |
485 | 488 |
|
Also available in: Unified diff
fix #6209: adapt the message if a datasource is not available