Revision 32504fef
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/Messages.java | ||
---|---|---|
242 | 242 |
public static String FeatureTreeEditorComposite_REMOVE_FEATURE; |
243 | 243 |
|
244 | 244 |
|
245 |
public static String NonViralNameDetails_confirmDeleteOfZoologicalNameParts; |
|
246 |
|
|
247 |
|
|
248 |
public static String NonViralNameDetails_descriptionDeleteZoologicalNameParts; |
|
249 |
|
|
250 |
|
|
251 |
public static String NonViralNameDetails_confirmDeleteOfBacterialNameParts; |
|
252 |
|
|
253 |
|
|
254 |
public static String NonViralNameDetails_desciptionDeleteOfBacterialNameParts; |
|
255 |
|
|
256 |
|
|
257 |
public static String NonViralNameDetails_confirmDeleteOfFungiNameParts; |
|
258 |
|
|
259 |
|
|
260 |
public static String NonViralNameDetails_descriptionDeleteOfFungiNameParts; |
|
261 |
|
|
262 |
|
|
263 |
public static String NonViralNameDetails_confirmDeleteOfCultivarNameParts; |
|
264 |
|
|
265 |
|
|
266 |
public static String NonViralNameDetails_descriptionDeleteOfCultivarNameParts; |
|
267 |
|
|
268 |
|
|
245 | 269 |
|
246 | 270 |
|
247 | 271 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties | ||
---|---|---|
200 | 200 |
FeatureTreeEditorComposite_FEATURE_TREE=Feature Tree |
201 | 201 |
FeatureTreeEditorComposite_OPEN_TREE=Open Tree |
202 | 202 |
FeatureTreeEditorComposite_REMOVE_FEATURE=Remove a feature from this feature tree. |
203 |
|
|
204 |
NonViralNameDetails_confirmDeleteOfZoologicalNameParts=The publication and original publication year needs to be removed |
|
205 |
NonViralNameDetails_descriptionDeleteZoologicalNameParts=If you click Yes, the original publication and publication year is removed and the nomenclatural code is changed. |
|
206 |
NonViralNameDetails_confirmDeleteOfBacterialNameParts=The name approbiation needs to be removed |
|
207 |
NonViralNameDetails_desciptionDeleteOfBacterialNameParts=If you click Ok, the name approbiation is removed and the nomenclatural code is changed. |
|
208 |
NonViralNameDetails_confirmDeleteOfFungiNameParts=The fungi information anamorph will be lost |
|
209 |
NonViralNameDetails_descriptionDeleteOfFungiNameParts=If you click Ok, the anamorph flag is removed and the nomenclatural code is changed. |
|
210 |
NonViralNameDetails_confirmDeleteOfCultivarNameParts=The cultivar name needs to be removed |
|
211 |
NonViralNameDetails_descriptionDeleteOfCultivarNameParts=If you click Ok, the cultivar name is removed and the nomenclatural code is changed |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties | ||
---|---|---|
200 | 200 |
FeatureTreeEditorComposite_FEATURE_TREE=Merkmalsbaum |
201 | 201 |
FeatureTreeEditorComposite_OPEN_TREE=Merkmalsbaum ?ffnen |
202 | 202 |
FeatureTreeEditorComposite_REMOVE_FEATURE=Merkmal vom Merkmalsbaum entfernen |
203 |
|
|
204 |
NonViralNameDetails_confirmDeleteOfZoologicalNameParts=Breed, Publication Date und Original Publication Date m?ssen entfernt werden. |
|
205 |
NonViralNameDetails_descriptionDeleteZoologicalNameParts=Best?tigen Sie, wenn Sie Breed, Publication Date und Original Publication Date l?schen und den Nomenklatorischen Code des Namens ?ndern wollen. |
|
206 |
NonViralNameDetails_confirmDeleteOfBacterialNameParts=Name Approbiation muss entfernt werden. |
|
207 |
NonViralNameDetails_desciptionDeleteOfBacterialNameParts=Best?tigen Sie, wenn Sie Name Approbiation l?schen wollen und den Nomenklatorischen Code ?ndern wollen. |
|
208 |
NonViralNameDetails_confirmDeleteOfFungiNameParts=Die Information, ob der Pilz anamorph ist, muss gel?scht werden |
|
209 |
NonViralNameDetails_descriptionDeleteOfFungiNameParts=Best?tigen Sie, wenn Sie die Information, ob der Pilz anamorph ist, l?schen und den Nomenklatorischen Code ?ndern wollen. |
|
210 |
NonViralNameDetails_confirmDeleteOfCultivarNameParts=Der Cultivar Name muss gel?scht werden |
|
211 |
NonViralNameDetails_descriptionDeleteOfCultivarNameParts=Best?tigen Sie, wenn Sie den Cultivar Name l?schen und den Nomenklatorischen Code ?ndern wollen. |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameDetailElement.java | ||
---|---|---|
17 | 17 |
import eu.etaxonomy.cdm.model.name.INonViralName; |
18 | 18 |
import eu.etaxonomy.cdm.model.name.NomenclaturalCode; |
19 | 19 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
20 |
import eu.etaxonomy.taxeditor.l10n.Messages; |
|
21 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
|
20 | 22 |
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys; |
21 | 23 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
22 | 24 |
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement; |
... | ... | |
186 | 188 |
} else if(eventSource==textLsid){ |
187 | 189 |
getEntity().setLsid(textLsid.parseText()); |
188 | 190 |
} else if (eventSource == combo_nomenclaturalCode){ |
189 |
getEntity().setNameType(combo_nomenclaturalCode.getSelection()); |
|
190 |
this.updateContent(); |
|
191 |
section_hybrid.setEntity(getEntity()); |
|
192 |
section_author.setEntity(getEntity()); |
|
193 |
section_name.setEntity(getEntity()); |
|
191 |
boolean change = checkForDeletableParts(combo_nomenclaturalCode.getSelection()); |
|
192 |
if (change){ |
|
193 |
getEntity().setNameType(combo_nomenclaturalCode.getSelection()); |
|
194 |
|
|
195 |
this.updateContent(); |
|
196 |
section_hybrid.setEntity(getEntity()); |
|
197 |
section_author.setEntity(getEntity()); |
|
198 |
section_name.setEntity(getEntity()); |
|
199 |
}else{ |
|
200 |
combo_nomenclaturalCode.setSelection(getEntity().getNameType()); |
|
201 |
} |
|
194 | 202 |
} else if(eventSource == this.text_nameApprobation){ |
195 | 203 |
((IBacterialName)getEntity()).setNameApprobation(text_nameApprobation.getText()); |
196 | 204 |
} |
197 | 205 |
} |
206 |
private boolean checkForDeletableParts(NomenclaturalCode selection) { |
|
207 |
NomenclaturalCode actualCode = getEntity().getNameType(); |
|
208 |
if (selection.equals(actualCode)){ |
|
209 |
return true; |
|
210 |
} |
|
211 |
if (actualCode.equals(NomenclaturalCode.ICZN) ){ |
|
212 |
if(getEntity().getOriginalPublicationYear() != null || getEntity().getPublicationYear() != null || getEntity().getBreed() != null){ |
|
213 |
if (MessagingUtils.confirmDialog(Messages.NonViralNameDetails_confirmDeleteOfZoologicalNameParts, Messages.NonViralNameDetails_descriptionDeleteZoologicalNameParts)){ |
|
214 |
getEntity().setOriginalPublicationYear(null); |
|
215 |
getEntity().setPublicationYear(null); |
|
216 |
getEntity().setBreed(null); |
|
217 |
return true; |
|
218 |
} |
|
219 |
}else { |
|
220 |
return true; |
|
221 |
} |
|
222 |
|
|
223 |
} |
|
224 |
if (actualCode.equals(NomenclaturalCode.ICNB)){ |
|
225 |
if (getEntity().getNameApprobation() != null){ |
|
226 |
if (MessagingUtils.confirmDialog(Messages.NonViralNameDetails_confirmDeleteOfBacterialNameParts, Messages.NonViralNameDetails_desciptionDeleteOfBacterialNameParts)){ |
|
227 |
getEntity().setNameApprobation(null); |
|
228 |
return true; |
|
229 |
} |
|
230 |
}else{ |
|
231 |
return true; |
|
232 |
} |
|
233 |
|
|
234 |
} |
|
235 |
if (actualCode.equals(NomenclaturalCode.Fungi)){ |
|
236 |
if (!getEntity().isAnamorphic() ){ |
|
237 |
if (MessagingUtils.confirmDialog(Messages.NonViralNameDetails_confirmDeleteOfFungiNameParts, Messages.NonViralNameDetails_descriptionDeleteOfFungiNameParts)){ |
|
238 |
getEntity().setAnamorphic(false); |
|
239 |
return true; |
|
240 |
} |
|
241 |
}else{ |
|
242 |
return true; |
|
243 |
} |
|
244 |
} |
|
245 |
if (actualCode.equals(NomenclaturalCode.ICNCP)){ |
|
246 |
if (getEntity().getCultivarName() != null){ |
|
247 |
if (MessagingUtils.confirmDialog(Messages.NonViralNameDetails_confirmDeleteOfCultivarNameParts, Messages.NonViralNameDetails_descriptionDeleteOfCultivarNameParts)){ |
|
248 |
getEntity().setCultivarName(null); |
|
249 |
return true; |
|
250 |
} |
|
251 |
}else{ |
|
252 |
return true; |
|
253 |
} |
|
254 |
|
|
255 |
} |
|
256 |
if (actualCode.equals(NomenclaturalCode.ICNAFP)){ |
|
257 |
return true; |
|
258 |
} |
|
259 |
return false; |
|
260 |
} |
|
261 |
|
|
198 | 262 |
@Override |
199 | 263 |
protected void handleToggleableCacheField() { |
200 | 264 |
boolean pushedState = toggleable_cache.getState(); |
Also available in: Unified diff
dialog to avoid lost data while change nc