Revision 662c457c
Added by Cherian Mathew about 9 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/MoveFactualDataHandler.java | ||
---|---|---|
100 | 100 |
CdmStore.getService(IDescriptionService.class).saveOrUpdate(description); |
101 | 101 |
navigator.getConversationHolder().bind(); |
102 | 102 |
navigator.getConversationHolder().commit(); |
103 |
} |
|
103 | 104 |
|
104 |
Display.getDefault().asyncExec(new Runnable(){
|
|
105 |
Display.getDefault().asyncExec(new Runnable(){ |
|
105 | 106 |
|
106 |
@Override |
|
107 |
public void run() { |
|
108 |
try { |
|
109 |
//close and re-open to refresh factual data view |
|
110 |
MultiPageTaxonEditor sourceEditor = (MultiPageTaxonEditor) EditorUtil.findEditorByTaxonNodeUuid(sourceTaxonNode.getUuid()); |
|
111 |
MultiPageTaxonEditor targetEditor = (MultiPageTaxonEditor) EditorUtil.findEditorByTaxonNodeUuid(targetTaxonNode.getUuid()); |
|
112 |
if(targetEditor != null){ |
|
113 |
AbstractUtility.close(sourceEditor); |
|
114 |
AbstractUtility.close(targetEditor); |
|
115 |
} |
|
116 |
EditorUtil.openTaxonNode(sourceTaxonNode.getUuid()); |
|
117 |
EditorUtil.openTaxonNode(targetTaxonNode.getUuid()); |
|
118 |
} catch (PartInitException e) { |
|
119 |
MessagingUtils.error(this.getClass(), e); |
|
120 |
throw new RuntimeException(e); |
|
121 |
} catch (Exception e) { |
|
122 |
MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage()); |
|
107 |
@Override |
|
108 |
public void run() { |
|
109 |
try { |
|
110 |
//close and re-open to refresh factual data view |
|
111 |
MultiPageTaxonEditor sourceEditor = (MultiPageTaxonEditor) EditorUtil.findEditorByTaxonNodeUuid(sourceTaxonNode.getUuid()); |
|
112 |
MultiPageTaxonEditor targetEditor = (MultiPageTaxonEditor) EditorUtil.findEditorByTaxonNodeUuid(targetTaxonNode.getUuid()); |
|
113 |
if(targetEditor != null){ |
|
114 |
AbstractUtility.close(sourceEditor); |
|
115 |
AbstractUtility.close(targetEditor); |
|
123 | 116 |
} |
117 |
EditorUtil.openTaxonNode(sourceTaxonNode.getUuid()); |
|
118 |
EditorUtil.openTaxonNode(targetTaxonNode.getUuid()); |
|
119 |
} catch (PartInitException e) { |
|
120 |
MessagingUtils.error(this.getClass(), e); |
|
121 |
throw new RuntimeException(e); |
|
122 |
} catch (Exception e) { |
|
123 |
MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage()); |
|
124 | 124 |
} |
125 |
} |
|
125 | 126 |
|
126 |
}); |
|
127 |
} |
|
127 |
}); |
|
128 | 128 |
} |
129 | 129 |
} |
130 | 130 |
} |
Also available in: Unified diff
merge from trunk