Revision cd900bac
Added by Andreas Müller almost 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/CdmDataSourceRepository.java | ||
---|---|---|
62 | 62 |
memento = readMemento(); |
63 | 63 |
lastUsedCdmSourceName = memento != null ? memento.getString(CURRENT_DATASOURCE) : DEFAULT_DATASOURCE_NAME; |
64 | 64 |
lastUsedCdmSourcePostFix = memento != null ? memento.getString(CURRENT_DATASOURCE_POSTFIX) : DEFAULT_DATASOURCE_POSTFIX; |
65 |
|
|
66 | 65 |
} |
67 | 66 |
} |
68 | 67 |
|
... | ... | |
133 | 132 |
return null; |
134 | 133 |
} |
135 | 134 |
|
136 |
|
|
137 | 135 |
/** |
138 | 136 |
* <p>Getter for the field <code>currentDataSource</code>.</p> |
139 | 137 |
* |
... | ... | |
185 | 183 |
*/ |
186 | 184 |
public static boolean setCurrentCdmSource(ICdmSource cdmSource) { |
187 | 185 |
currentCdmSource = cdmSource; |
188 |
// NomenclaturalCode dataSourceNomenclaturalCode = cdmSource.getNomenclaturalCode(); |
|
189 |
// NomenclaturalCode applicationNomenclaturalCode = PreferencesUtil.getPreferredNomenclaturalCode(true); |
|
190 |
// |
|
191 |
// if( dataSourceNomenclaturalCode != null && ! dataSourceNomenclaturalCode.equals(applicationNomenclaturalCode)){ |
|
192 |
// PreferencesUtil.setPreferredNomenclaturalCode(dataSourceNomenclaturalCode, true); |
|
193 |
// MessagingUtils.informationDialog("Nomenclatural Code Change", "The Datasource that was just " + |
|
194 |
// "loaded has a different nomenclatural code than the one stored in Preferences. " + |
|
195 |
// "The nomenclatural code was changed in the application."); |
|
196 |
// } |
|
197 | 186 |
return true; |
198 | 187 |
} |
199 | 188 |
|
... | ... | |
317 | 306 |
} |
318 | 307 |
} |
319 | 308 |
|
320 |
|
|
321 | 309 |
private static IMemento initializeMemento() { |
322 | 310 |
|
323 | 311 |
XMLMemento memento = XMLMemento.createWriteRoot(TAG_DATASOURCE); |
Also available in: Unified diff
cleanup