adapt editor to proParte synonyms
authorKatja Luther <k.luther@bgbm.org>
Tue, 15 May 2018 10:07:21 +0000 (12:07 +0200)
committerKatja Luther <k.luther@bgbm.org>
Tue, 15 May 2018 10:10:52 +0000 (12:10 +0200)
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin.properties
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin_de.properties
eu.etaxonomy.taxeditor.editor/fragment.e4xmi
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/AppModelId.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/ConceptContainerE4.java [moved from eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/MisapplicationContainerE4.java with 75% similarity]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/MisappliedGroupE4.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/CreateProParteSynonymHandlerE4.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/NameEditorMenuPropertyTester.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptionElementDropAdapter.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/MoveDescriptionElementsOperation.java

index ab39a68ec23deaa11325d5ebd19a9709fd5bd190..40c1ce4e9e3646b7d4821818ec248745c8bc2c12 100644 (file)
@@ -128,7 +128,9 @@ command.label.47 = Reference
 command.label.48 = Datasource\r
 command.label.49 = Misapplication\r
 command.label.50 = Use Existing Image\r
+command.label.60 = Pro Parte Synonym\r
 command.name.36 = Create Misapplication\r
+command.name.60 = Create Pro Parte Synonym\r
 command.name.37 = Use Existing Image\r
 command.name.38 = Open Distribution Editor\r
 command.name.39 = New Datasource\r
index 0c7e6253ee452220981ee15ca30fef7d91c6f822..2d2efa470bb9b739fbda748a57f4cd968800c998 100644 (file)
@@ -127,8 +127,10 @@ command.label.46 = Name
 command.label.47 = Referenz
 command.label.48 = Datenquelle
 command.label.49 = Misapplication
+command.label.60 = Pro Parte Synonym
 command.label.50 = Benutze vorhandenes Bild
 command.name.36 = Erstelle Misapplication
+command.name.60 = Erstelle Pro Parte Synonym
 command.name.37 = Benutze vorhandenes Bild
 command.name.38 = \u00d6ffne Verbreitungs-Editor
 command.name.39 = Neue Datenquelle
index 40884c17a43cf63a547dfde6cea0a0158d8955fb..013b2740cf967db55add1ed459411b81f7be9a6e 100644 (file)
       <handlers xmi:id="_WWqoMIvQEee7R4eqeQiXZg" elementId="eu.etaxonomy.taxeditor.editor.name.e4.handler.SwapSynonymAndAcceptedHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.name.e4.handler.SwapSynonymAndAcceptedHandlerE4" command="_UFDx8IvQEee7R4eqeQiXZg"/>
       <handlers xmi:id="_edkd4IvQEee7R4eqeQiXZg" elementId="eu.etaxonomy.taxeditor.editor.name.e4.handler.SetBasionymHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.name.e4.handler.SetBasionymHandlerE4" command="_b2nCsIvQEee7R4eqeQiXZg"/>
       <handlers xmi:id="_lv9GYIvQEee7R4eqeQiXZg" elementId="eu.etaxonomy.taxeditor.editor.name.e4.handler.MoveSynonymToAnotherAcceptedTaxonHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.name.e4.handler.MoveSynonymToAnotherAcceptedTaxonHandlerE4" command="_jNvBQIvQEee7R4eqeQiXZg"/>
+      <handlers xmi:id="_g8QScFgWEeiQk_eTMvMviQ" elementId="eu.etaxonomy.taxeditor.editor.name.e4.handler.CreateProParteSynonymHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.name.e4.handler.CreateProParteSynonymHandlerE4" command="_HSKdYFgXEeiQk_eTMvMviQ"/>
       <menus xsi:type="menu:PopupMenu" xmi:id="_tLceQYl4Eeeox7omhvOBWg" elementId="eu.etaxonomy.taxeditor.editor.popupmenu.nameeditor">
         <children xsi:type="menu:Menu" xmi:id="_R6buoIl5Eeeox7omhvOBWg" elementId="eu.etaxonomy.taxeditor.editor.nameEditor.menu.new" label="%menu.label">
           <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_X1lWsEoREeiEhr9v9h_MoA" coreExpressionId="isNotMisapplication"/>
           <children xsi:type="menu:HandledMenuItem" xmi:id="_MCsX0Il8Eeeox7omhvOBWg" elementId="eu.etaxonomy.taxeditor.editor.nameEditor.menuItem.newMisapplication" label="%command.label.49" command="_c0byUIvPEee7R4eqeQiXZg">
             <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_G1zjMEoOEeiEhr9v9h_MoA" coreExpressionId="isAcceptedTaxon"/>
           </children>
+          <children xsi:type="menu:HandledMenuItem" xmi:id="_2S-_cFgWEeiQk_eTMvMviQ" elementId="eu.etaxonomy.taxeditor.editor.nameEditor.menuItem.newProParteSynonym" label="%command.label.60" command="_HSKdYFgXEeiQk_eTMvMviQ">
+            <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_9tgQQFgWEeiQk_eTMvMviQ" coreExpressionId="isAcceptedTaxon"/>
+          </children>
         </children>
         <children xsi:type="menu:MenuSeparator" xmi:id="_bxjbgE3LEeiplYSgvvNXRQ" elementId="eu.etaxonomy.taxeditor.editor.menuseparator.23"/>
         <children xsi:type="menu:DynamicMenuContribution" xmi:id="_drYq8E3LEeiplYSgvvNXRQ" elementId="eu.etaxonomy.taxeditor.editor.dynamicmenucontribution.nameEditor.openInCdmViewer" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.view.CdmViewerContextMenuE4"/>
     <elements xsi:type="commands:Command" xmi:id="_j2cfsJMmEeeR4YRjNqCKeA" elementId="eu.etaxonomy.taxeditor.editor.openSpecimenEditorForIndividualsAssociation" commandName="%command.name.OPEN_DERIVATIVE_EDITOR"/>
     <elements xsi:type="commands:Command" xmi:id="_0DKb4E3kEeivZbtHG8C6kA" elementId="eu.etaxonomy.taxeditor.editor.openSpecimenEditorForSpecimenOrObservation" commandName="%command.name.OPEN_DERIVATIVE_EDITOR"/>
     <elements xsi:type="commands:Command" xmi:id="_c3wW8FeBEeiJAP3GTkE0aQ" elementId="eu.etaxonomy.taxeditor.editor.command.descriptivedataseteditor.removeTaxon" commandName="%command.commandname.21"/>
+    <elements xsi:type="commands:Command" xmi:id="_HSKdYFgXEeiQk_eTMvMviQ" elementId="eu.etaxonomy.taxeditor.editor.name.createProParteSynonym" commandName="%command.name.60"/>
   </fragments>
   <fragments xsi:type="fragment:StringModelFragment" xmi:id="_pZmusEalEeeXMc6kSYO7Xg" featurename="children" parentElementId="eu.etaxonomy.taxeditor.menu.showView" positionInList="after:eu.etaxonomy.taxeditor.workbench.menuseparator.navigation">
     <elements xsi:type="menu:HandledMenuItem" xmi:id="_FPIHQKNwEeebGZ23ERGMGw" elementId="eu.etaxonomy.taxeditor.editor.showViewMenu.conceptGraph" label="%view.name.3" iconURI="" tooltip="%view.name.3" command="_WPjpoDSnEeek0dKsFNy--Q">
index 47d9af19ec3c9589366cbdd40d335e72f90e7c83..6784999f78d0acea81a0a5283b6f052fca4bc486 100644 (file)
@@ -187,6 +187,7 @@ public class AppModelId {
        public static final String HANDLER_EU_ETAXONOMY_TAXEDITOR_EDITOR_NAME_E4_HANDLER_CREATEHETEROTYPICSYNONYMHANDLERE4 = "eu.etaxonomy.taxeditor.editor.name.e4.handler.CreateHeterotypicSynonymHandlerE4";
        public static final String HANDLER_EU_ETAXONOMY_TAXEDITOR_EDITOR_NAME_E4_HANDLER_CREATEHOMOTYPICSYNONYMHANDLERE4 = "eu.etaxonomy.taxeditor.editor.name.e4.handler.CreateHomotypicSynonymHandlerE4";
        public static final String HANDLER_EU_ETAXONOMY_TAXEDITOR_EDITOR_NAME_E4_HANDLER_CREATEMISAPPLICATIONHANDLERE4 = "eu.etaxonomy.taxeditor.editor.name.e4.handler.CreateMisapplicationHandlerE4";
+       public static final String HANDLER_EU_ETAXONOMY_TAXEDITOR_EDITOR_NAME_E4_HANDLER_CREATEPROPARTESYNONYMHANDLERE4 = "eu.etaxonomy.taxeditor.editor.name.e4.handler.CreateProParteSynonymHandlerE4";
        public static final String HANDLER_EU_ETAXONOMY_TAXEDITOR_EDITOR_NAME_E4_HANDLER_CREATESYNONYMINHOMOTYPICALGROUPHANDLERE4 = "eu.etaxonomy.taxeditor.editor.name.e4.handler.CreateSynonymInHomotypicalGroupHandlerE4";
        public static final String HANDLER_EU_ETAXONOMY_TAXEDITOR_EDITOR_NAME_E4_HANDLER_DELETEALLEMPTYNAMESHANDLERE4 = "eu.etaxonomy.taxeditor.editor.name.e4.handler.DeleteAllEmptyNamesHandlerE4";
        public static final String HANDLER_EU_ETAXONOMY_TAXEDITOR_EDITOR_NAME_E4_HANDLER_DELETETAXONBASEHANDLERE4 = "eu.etaxonomy.taxeditor.editor.name.e4.handler.DeleteTaxonBaseHandlerE4";
@@ -30,11 +30,13 @@ import eu.etaxonomy.taxeditor.preference.Resources;
  * @date Aug 24, 2017
  *
  */
-public class MisapplicationContainerE4 extends AbstractGroupedContainerE4<Taxon> {
-       TaxonRelationship misapplication;
+public class ConceptContainerE4 extends AbstractGroupedContainerE4<Taxon> {
+       TaxonRelationship relationship;
+       private boolean isMisapplication;
 
-       public MisapplicationContainerE4(AbstractGroupE4 group, Taxon misappliedName) {
+       public ConceptContainerE4(AbstractGroupE4 group, Taxon misappliedName, boolean isMisapplication) {
                super(group, misappliedName);
+               this.isMisapplication = isMisapplication;
 
        }
 
@@ -46,9 +48,12 @@ public class MisapplicationContainerE4 extends AbstractGroupedContainerE4<Taxon>
                TaxonNameEditorE4 editor = getEditor();
                Taxon taxon = editor.getTaxon();
                for (TaxonRelationship rel: taxon.getTaxonRelations(getMisappliedName())){
-                       if (rel.getType().isAnyMisappliedName()){
-                               misapplication = rel;
+                       if (rel.getType().isAnyMisappliedName() && isMisapplication){
+                           relationship = rel;
                                break;
+                       }else if (rel.getType().equals(TaxonRelationshipType.PRO_PARTE_SYNONYM_FOR()) && !isMisapplication){
+                           relationship = rel;
+                break;
                        }
                }
                showSec();
@@ -58,7 +63,11 @@ public class MisapplicationContainerE4 extends AbstractGroupedContainerE4<Taxon>
 
        @Override
        protected void updateIcon() {
-               setIcon(MISAPPLIEDNAME_ICON);
+           if (isMisapplication){
+               setIcon(MISAPPLIEDNAME_ICON);
+           }else{
+               setIcon(CONCEPT_ICON);
+           }
        }
 
        private void showSec() {
@@ -67,14 +76,16 @@ public class MisapplicationContainerE4 extends AbstractGroupedContainerE4<Taxon>
                }
                String title = "";
                String author = "";
-               TaxonName misappliedNameName = HibernateProxyHelper.deproxy(getMisappliedName().getName());
-               if (StringUtils.isNotBlank(misappliedNameName.getAuthorshipCache())){
-                       author = ", non " + misappliedNameName.getAuthorshipCache();
+               TaxonName conceptName = HibernateProxyHelper.deproxy(getMisappliedName().getName());
+               if (isMisapplication && StringUtils.isNotBlank(conceptName.getAuthorshipCache())){
+                       author = ", non " + conceptName.getAuthorshipCache();
+               }else if (!isMisapplication && StringUtils.isNotBlank(conceptName.getAuthorshipCache())){
+                   author = conceptName.getAuthorshipCache();
                }
                if (getMisappliedName().getSec() == null) {
                    if (getMisappliedName().getAppendedPhrase() != null ){
                        title = getMisappliedName().getAppendedPhrase();
-                   }else{
+                   }else if (isMisapplication){
                        title = "auct.";
 
                    }
@@ -87,7 +98,7 @@ public class MisapplicationContainerE4 extends AbstractGroupedContainerE4<Taxon>
 
                        title += sec + getMisappliedName().getSec().getCacheStrategy().getCitation(getMisappliedName().getSec());
                }
-               if (misapplication.getType().equals(TaxonRelationshipType.PRO_PARTE_MISAPPLIED_NAME_FOR()) ){
+               if (relationship.getType().equals(TaxonRelationshipType.PRO_PARTE_MISAPPLIED_NAME_FOR()) || relationship.getType().equals(TaxonRelationshipType.PRO_PARTE_SYNONYM_FOR())){
                    title += " p.p. ";
         }
                title += author;
index 37a89d74eda8655cb043b06daab5d934b1668013..4faf79d55f7111a3bbdf2315b021a0ddf7cf7766 100644 (file)
@@ -32,10 +32,16 @@ public class MisappliedGroupE4 extends AbstractGroupE4{
        @Override
        protected void createContainers() {
                for(Taxon misapplication : getEditor().getTaxon().getMisappliedNames(true)){
-                   MisapplicationContainerE4 container = new MisapplicationContainerE4(this, misapplication);
+
+                   ConceptContainerE4 container = new ConceptContainerE4(this, misapplication, true);
                        this.add(container);
                        container.createContent();
                }
+               for(Taxon misapplication : getEditor().getTaxon().getProParteSynonyms()){
+            ConceptContainerE4 container = new ConceptContainerE4(this, misapplication, false);
+            this.add(container);
+            container.createContent();
+        }
        }
 
        @Override
@@ -47,6 +53,7 @@ public class MisappliedGroupE4 extends AbstractGroupE4{
 
        private boolean redrawNeeded() {
                Set<Taxon> misapplications = getEditor().getTaxon().getMisappliedNames(true);
+               misapplications.addAll(getEditor().getTaxon().getProParteSynonyms());
 
                Set<Taxon> presentMisapplication = new HashSet<Taxon>();
 
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/CreateProParteSynonymHandlerE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/CreateProParteSynonymHandlerE4.java
new file mode 100755 (executable)
index 0000000..9f40976
--- /dev/null
@@ -0,0 +1,68 @@
+/**
+* Copyright (C) 2018 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.editor.name.e4.handler;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.di.UISynchronize;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+import eu.etaxonomy.cdm.model.name.TaxonName;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.editor.name.e4.TaxonNameEditorE4;
+import eu.etaxonomy.taxeditor.editor.name.handler.NameEditorMenuPropertyTester;
+import eu.etaxonomy.taxeditor.editor.view.concept.operation.CreateConceptRelationOperation;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
+import eu.etaxonomy.taxeditor.parser.ParseHandler;
+
+/**
+ * @author k.luther
+ * @since 15.05.2018
+ *
+ */
+public class CreateProParteSynonymHandlerE4 {
+
+
+        @Execute
+        public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart,
+                MHandledMenuItem menuItem,
+                UISynchronize sync) {
+
+            TaxonNameEditorE4 editor = (TaxonNameEditorE4) activePart.getObject();
+
+            TaxonName conceptName = ParseHandler.createEmptyName();
+            Taxon concept = Taxon.NewInstance(conceptName, null);
+
+            TaxonRelationshipType type = TaxonRelationshipType.PRO_PARTE_SYNONYM_FOR();
+
+            AbstractPostOperation<?> operation;
+            operation = new CreateConceptRelationOperation(menuItem.getLocalizedLabel(),
+                    editor.getUndoContext(), editor.getTaxon(), concept, type, editor);
+            AbstractUtility.executeOperation(operation, sync);
+        }
+
+
+        @CanExecute
+        public boolean canExecute(@Named(IServiceConstants.ACTIVE_SELECTION)IStructuredSelection selection,
+                MHandledMenuItem menuItem){
+            boolean canExecute = false;
+            Object selectedElement = selection.getFirstElement();
+            canExecute = NameEditorMenuPropertyTester.isAccepted(selectedElement)
+                    && !NameEditorMenuPropertyTester.isProParteSynonym(selectedElement);
+            return canExecute;
+        }
+
+
+}
index 82fc05f0d01a7f7836ff7ad49cad7166408e4bb2..f0445b43009f55e42b9fbd0d05a3fe2a89e4cbe0 100644 (file)
@@ -190,4 +190,15 @@ public class NameEditorMenuPropertyTester extends PropertyTester {
            }
            return false;
        }
+
+    /**
+     * @param selectedElement
+     * @return
+     */
+    public static boolean isProParteSynonym(Object selectedElement) {
+        if(selectedElement instanceof Taxon && ((Taxon) selectedElement).isMisapplication()){
+            return true;
+        }
+        return false;
+    }
 }
index 92503a6748882d64d278d3f2b98a5d8b1e9331c4..6dc346fbb3c27cd34ec1923e54b3968f411b8014 100644 (file)
@@ -58,7 +58,7 @@ public class DescriptionElementDropAdapter extends EditViewerDropAdapter {
                Collection<DescriptionElementBase> descriptionElements = new ArrayList<DescriptionElementBase>();
 
                boolean isCopy = getCurrentOperation() == DND.DROP_COPY ? true : false;
-
+               DescriptionBase<?> description = null;
                // cannot drop a feature node onto itself
                if (droppedElements != null){
                        for (Object droppedElement : droppedElements) {
@@ -74,7 +74,7 @@ public class DescriptionElementDropAdapter extends EditViewerDropAdapter {
                                        if (descriptionElement.getInDescription().equals(target)) {
                                                return false;
                                        }
-                                       DescriptionBase<?> description = descriptionElement.getInDescription();
+                                       description = descriptionElement.getInDescription();
                                        description.removeElement(descriptionElement);
                                        target.addElement(descriptionElement);
 
@@ -87,13 +87,13 @@ public class DescriptionElementDropAdapter extends EditViewerDropAdapter {
                        TaxonNameEditorE4 editor = null;
                        Object activePart = EditorUtil.getActivePart();
                        if (activePart instanceof FactualDataPartE4){
-                           MPart selectionProvidingPart =(MPart) ((FactualDataPartE4)activePart).getSelectionProvidingPart();
+                           MPart selectionProvidingPart =((FactualDataPartE4)activePart).getSelectionProvidingPart();
                            Object obj = selectionProvidingPart.getObject();
                            if (obj instanceof TaxonNameEditorE4){
                                editor = (TaxonNameEditorE4) obj;
                            }
                        }
-                       AbstractPostTaxonOperation operation = new MoveDescriptionElementsOperation(Messages.DescriptionElementDropAdapter_MOVE_DESC, EditorUtil.getUndoContext(), target, descriptionElements, isCopy, null, sync);
+                       AbstractPostTaxonOperation operation = new MoveDescriptionElementsOperation(Messages.DescriptionElementDropAdapter_MOVE_DESC, EditorUtil.getUndoContext(), target, description, descriptionElements, isCopy, null, sync);
 
                        editor.getEditorInput().addOperation(operation);
                        editor.setDirty();
index f6613bda5ee3018d88da70aa8259147052c961bd..d850892d25e1861d66ad90015b71fd9e25c3f317 100644 (file)
@@ -38,8 +38,10 @@ public class MoveDescriptionElementsOperation extends AbstractPostTaxonOperation
 
        private Collection<DescriptionElementBase> descriptionElements;
        private DescriptionBase targetDescription;
+       private DescriptionBase sourceDescription;
        private IDescriptionService service;
        private UUID targetTaxonUuid;
+
        private String moveMessage;
        private boolean isCopy;
        private UISynchronize sync;
@@ -54,11 +56,12 @@ public class MoveDescriptionElementsOperation extends AbstractPostTaxonOperation
         * @param postOperationEnabled
         */
        public MoveDescriptionElementsOperation(String label,
-                       IUndoContext undoContext, DescriptionBase targetDescription,
+                       IUndoContext undoContext, DescriptionBase targetDescription, DescriptionBase sourceDescription,
                        Collection<DescriptionElementBase> descriptionElements, boolean isCopy,
                        IPostOperationEnabled postOperationEnabled, UISynchronize sync) {
                super(label, undoContext, postOperationEnabled);
                this.targetDescription = targetDescription;
+               this.sourceDescription = sourceDescription;
                this.descriptionElements = descriptionElements;
                this.isCopy = isCopy;
                this.sync = sync;
@@ -66,7 +69,7 @@ public class MoveDescriptionElementsOperation extends AbstractPostTaxonOperation
        }
 
        public MoveDescriptionElementsOperation(String label,
-               IUndoContext undoContext, UUID targetTaxonUuid,String moveMessage,
+               IUndoContext undoContext, UUID targetTaxonUuid, String moveMessage,
                Collection<DescriptionElementBase> descriptionElements, boolean isCopy,
                IPostOperationEnabled postOperationEnabled, UISynchronize sync) {
            super(label, undoContext, postOperationEnabled);
@@ -95,6 +98,7 @@ public class MoveDescriptionElementsOperation extends AbstractPostTaxonOperation
 
                } else {
                    UUID targetDescriptionUuid = targetDescription.getUuid();
+                   UUID sourceDescriptionUuid = sourceDescription.getUuid();
                    result = service.moveDescriptionElementsToDescription(descriptionElementsUuid, targetDescriptionUuid, isCopy);
 
                }