public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
throws ExecutionException {\r
\r
- Taxon fromTaxon;\r
- // Start the main progress monitor.\r
- IProgressMonitor newMonitor = StoreUtil.startMainMonitor(monitor,"Changing Synonym to Concept Relationship", 2);\r
- \r
- // Do one step\r
- newMonitor.worked(1);\r
+// // Get name from synonym\r
+// TaxonNameBase<?, ?> synonymName = synonym.getName();\r
+// \r
+// // remove synonym from taxon\r
+// taxon.removeSynonym(synonym);\r
+// \r
+// // Create a taxon with synonym name\r
+// Taxon fromTaxon = Taxon.NewInstance(synonymName, null);\r
+// \r
+// // Add taxon relation \r
+// fromTaxon.addTaxonRelation(taxon, taxonRelationshipType, null, null);\r
\r
- try {\r
- // Operation steps\r
-\r
- // // Get name from synonym\r
- // TaxonNameBase<?, ?> synonymName = synonym.getName();\r
- // \r
- // // remove synonym from taxon\r
- // taxon.removeSynonym(synonym);\r
- // \r
- // // Create a taxon with synonym name\r
- // Taxon fromTaxon = Taxon.NewInstance(synonymName, null);\r
- // \r
- // // Add taxon relation \r
- // fromTaxon.addTaxonRelation(taxon, taxonRelationshipType, null, null);\r
- \r
- fromTaxon = CdmStore.getTaxonService().changeSynonymToRelatedTaxon(synonym, taxon, taxonRelationshipType, null, null);\r
- StoreUtil.isCanceled(newMonitor, 1);\r
- \r
- // TaxonRelationshipType.\r
- // logger.warn("Not yet implemented.");\r
- }\r
- finally {\r
- \r
- // Stop the progress monitor.\r
- newMonitor.done();\r
- }\r
+ monitor.worked(20);\r
+ Taxon fromTaxon = CdmStore.getTaxonService().changeSynonymToRelatedTaxon(synonym, taxon, taxonRelationshipType, null, null);\r
+ monitor.worked(40);\r
+ \r
+// TaxonRelationshipType.\r
+// logger.warn("Not yet implemented.");\r
\r
return postExecute(fromTaxon);\r
}\r