Adapt to service layer change
authorPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 9 Apr 2019 11:27:06 +0000 (13:27 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 9 Apr 2019 11:27:11 +0000 (13:27 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/character/CharacterDropAdapter.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/character/CharacterEditor.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/operation/AddOntologyTermOperation.java

index 3199923..9e73391 100644 (file)
@@ -64,7 +64,7 @@ public class CharacterDropAdapter extends FeatureTreeDropAdapter {
                         //drop on feature tree
                         target = ((FeatureTree)getViewer().getInput()).getRoot();
                     }
-                    CdmStore.getService(IFeatureNodeService.class).createChildFeatureNode(target, character, characterEditor.getVocabulary().getUuid());
+                    CdmStore.getService(IFeatureNodeService.class).createChildFeatureNode(target.getUuid(), character, characterEditor.getVocabulary().getUuid());
                    }
                }
                getViewer().refresh();
index 13d6b71..0c549f6 100644 (file)
@@ -193,7 +193,6 @@ public class CharacterEditor implements IFeatureTreeEditor,IConversationEnabled,
 
         propertiesTreeEditorComposite = addFeatureTreeEditor(composite_1);
         initFeatureTreeComposite(TermType.Property, propertiesTreeEditorComposite,
-
                 new CharacterDragListener(structuresTreeEditorComposite.getViewer(), propertiesTreeEditorComposite.getViewer()),
                 null,
                 new Transfer[] {CharacterTransfer.getInstance()},
@@ -227,10 +226,10 @@ public class CharacterEditor implements IFeatureTreeEditor,IConversationEnabled,
                     return;
                 }
                 Collection<Character> characters = createCharacters((TreeSelection)structureTreeSelection, (TreeSelection)propertyTreeSelection);
+                FeatureNode<Character> parent = ((FeatureTree<Character>) characterTreeEditorComposite.getViewer().getInput()).getRoot();
                 for (Character character : characters) {
                     //add new Character to feature tree
-                    FeatureNode<Character> parent = ((FeatureTree<Character>) characterTreeEditorComposite.getViewer().getInput()).getRoot();
-                    CdmStore.getService(IFeatureNodeService.class).createChildFeatureNode(parent, character, vocabulary.getUuid());
+                    CdmStore.getService(IFeatureNodeService.class).createChildFeatureNode(parent.getUuid(), character, vocabulary.getUuid());
                 }
                 characterTreeEditorComposite.getViewer().refresh();
             }
index 0fe066f..64dd592 100644 (file)
@@ -50,7 +50,7 @@ public class AddOntologyTermOperation extends AbstractPostOperation<FeatureNode>
     public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
         Feature feature = Feature.NewInstance(wrapper.getDescription(), wrapper.getLabel(), null);
         feature.setUri(URI.create(wrapper.getUri()));
-        CdmStore.getService(IFeatureNodeService.class).createChildFeatureNode(target, feature, vocabulary.getUuid());
+        CdmStore.getService(IFeatureNodeService.class).createChildFeatureNode(target.getUuid(), feature, vocabulary.getUuid());
 
         UpdateResult updateResult = CdmStore.getService(IFeatureNodeService.class).addChildFeatureNode(target.getUuid(), element.getUuid());
         return postExecute(updateResult.getCdmEntity());