/**
*
- * @param uuid
+ * @param taxonNodeUuid
* @param conversation
* @return
*/
- public static TaxonEditorInput NewInstance(UUID uuid){
+ public static TaxonEditorInput NewInstance(UUID taxonNodeUuid){
ConversationHolder conversation = CdmStore.NewTransactionalConversation();
- TaxonNode taxonNode = CdmStore.getTaxonService().getTaxonNodeByUuid(uuid);
+ TaxonNode taxonNode = CdmStore.getTaxonService().getTaxonNodeByUuid(taxonNodeUuid);
if(taxonNode == null){
MessageDialog.openWarning(EditorUtil.getShell(), "Not yet implemented", "Selected element is not type TaxonBase.");
return null;
}
- Taxon taxon;
-
// FIXME had to disable synonym handling for now while implementing taxonNode
// if (taxonBase instanceof Synonym) {
// // TODO: in case of pro parte synonym or any other where we might have multiple
/**\r
* Tag for the IFile.fullPath of the file resource.\r
*/\r
- private static final String TAXON_UUID = "uuid"; //$NON-NLS-1$\r
+ private static final String TAXON_NODE_UUID = "uuid"; //$NON-NLS-1$\r
\r
/* (non-Javadoc)\r
* @see org.eclipse.ui.IElementFactory#createElement(org.eclipse.ui.IMemento)\r
*/\r
public IAdaptable createElement(IMemento memento) {\r
// Get the uuid\r
- String uuid = memento.getString(TAXON_UUID);\r
- if (uuid == null) {\r
+ String taxonNodeUuid = memento.getString(TAXON_NODE_UUID);\r
+ if (taxonNodeUuid == null) {\r
return null;\r
}\r
// StoreUtil.checktaxonExists(UUID.fromString(uuid));\r
- if (CdmStore.getTaxonService().getTaxonByUuid(UUID.fromString(uuid)) == null) {\r
- logger.warn("Couldn't find taxon with UUID " + uuid);\r
+ if (CdmStore.getTaxonService().getTaxonNodeByUuid(UUID.fromString(taxonNodeUuid)) == null) {\r
+ logger.warn("Couldn't find taxon node with UUID " + taxonNodeUuid);\r
return null;\r
}\r
- logger.info("Creating taxon from memento w UUID " + uuid);\r
- return TaxonEditorInput.NewInstance(UUID.fromString(uuid));\r
+ logger.info("Creating taxon node from memento w UUID " + taxonNodeUuid);\r
+ return TaxonEditorInput.NewInstance(UUID.fromString(taxonNodeUuid));\r
}\r
\r
/**\r
* @param input the file editor input\r
*/\r
public static void saveState(IMemento memento, TaxonEditorInput input) {\r
- String uuid = input.getTaxon().getUuid().toString();\r
- memento.putString(TAXON_UUID, uuid);\r
+ String uuid = input.getTaxonNode().getUuid().toString();\r
+ memento.putString(TAXON_NODE_UUID, uuid);\r
}\r
}
\ No newline at end of file