Merge branch 'develop' into unify_derivative_views
authorPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 11 Nov 2015 10:07:36 +0000 (11:07 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 11 Nov 2015 10:07:36 +0000 (11:07 +0100)
1  2 
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/plugin.properties
eu.etaxonomy.taxeditor.editor/plugin.xml
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/DeleteDerivateOperation.java

index 8247b5d6c70d0e34a7581e3cc808932ae08c8a4c,55c9c006b7565d7affc579117b18ac9f03a0db96..d6cc82eab6afb4ebd88098025c85e00b3b2df4ea
@@@ -101,6 -101,7 +101,6 @@@ command.name.23 = New Referenc
  command.name.24 = New Name\r
  command.name.25 = New Team\r
  command.name.26 = New Person\r
 -command.name.27 = New Specimen\r
  category.name.5 = -- Polytomous Keys\r
  command.name.28 = New Child Node\r
  command.name.29 = New Sibling Node\r
@@@ -160,4 -161,5 +160,5 @@@ commandParameter.name = taxonUUI
  Bundle-Name = Editor Bundle\r
  command.name.48 = delete\r
  command.name.49 = delete\r
- command.name.50 = delete
+ command.name.50 = delete\r
 -command.name.51 = delete
++command.name.51 = delete
index 97d534dec393cee5b10c5847ec005d388a44b9f7,8a6792b11c6b2dafeb36e86c7e647bd009b09c97..4d31b47f48c470435630df20f0705bd28fbf6656
              id="eu.etaxonomy.taxeditor.editor.group.authority"
              name="%editor.name.4">
        </editor>
 -      <editor
 -            class="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView"
 -            default="false"
 -            icon="icons/derivate_view-16x16-32.png"
 -            id="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView"
 -            name="%editor.name.5">
 -      </editor>
        <editor
              class="eu.etaxonomy.taxeditor.editor.view.dataimport.SpecimenImportEditor"
              default="false"
                 id="eu.etaxonomy.taxeditor.editor.view.validation.problems"
                 name="%view.name.6">
           </view>
 +         <view
 +               class="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView"
 +               icon="icons/derivate_view-16x16-32.png"
 +               id="eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView"
 +               name="Derivative Editor"
 +               restorable="true">
 +         </view>
        </extension>
        
        <!-- VALIDATION RELATED STUFF -->
                 name="eu.etaxonomy.navigation.menu.new.separator2"
                 visible="true">
           </separator>
 -         <command
 -               commandId="eu.etaxonomy.taxeditor.editor.command.new.specimen"
 -               label="%command.label.3"
 -               style="push">
 -            <visibleWhen
 -                  checkEnabled="true">
 -               <reference
 -                     definitionId="isCdmStoreConnected">
 -               </reference>
 -            </visibleWhen>
 -         </command>
           <separator
                 name="eu.etaxonomy.navigation.menu.new.separator3"
                 visible="true">
        </menuContribution>
        <menuContribution
              locationURI="menu:eu.etaxonomy.taxeditor.menu.showView?before=eu.etaxonomy.taxeditor.store.showViewMenu.details">
 -         <separator
 -               name="eu.etaxonomy.taxeditor.editor.showViewMenu"
 -               visible="true">
 -         </separator>
           <command
                 commandId="org.eclipse.ui.views.showView"
                 label="%command.label.4"
                 </and>
              </visibleWhen>
           </command>
 +         <separator
 +               name="eu.etaxonomy.taxeditor.store.separator_derivative_start"
 +               visible="true">
 +         </separator>
 +         <command
 +               commandId="eu.etaxonomy.taxeditor.editor.openSpecimenEditor"
 +               label="Derivative Editor"
 +               style="push">
 +            <visibleWhen
 +                  checkEnabled="true">
 +               <reference
 +                     definitionId="isCdmStoreConnected">
 +               </reference>
 +            </visibleWhen>
 +         </command>
 +         <separator
 +               name="eu.etaxonomy.taxeditor.editor.separator1"
 +               visible="true">
 +         </separator>
 +      </menuContribution>
 +      <menuContribution
 +            locationURI="menu:eu.etaxonomy.taxeditor.menu.showView?after=org.eclipse.ui.views.showView.supplemental">
 +         <separator
 +               name="eu.etaxonomy.taxeditor.store.showViewMenu.validation.separator"
 +               visible="true">
 +         </separator>
 +         <command
 +               commandId="org.eclipse.ui.views.showView"
 +               label="%command.name.40"
 +               style="push">
 +            <parameter
 +                  name="org.eclipse.ui.views.showView.viewId"
 +                  value="eu.etaxonomy.taxeditor.editor.view.validation.problems">
 +            </parameter>
 +            <visibleWhen
 +                  checkEnabled="true">
 +               <reference
 +                     definitionId="isCdmStoreConnected">
 +               </reference>
 +            </visibleWhen>
 +         </command>
        </menuContribution>
        <menuContribution
              locationURI="menu:org.eclipse.ui.main.menu.navigate">
                 label="%command.label.52"
                 style="push">
           </command>
 -         <command
 -               commandId="eu.etaxonomy.taxeditor.editor.derivate.createFieldUnit"
 -               label="%command.label.53"
 -               style="push">
 -         </command>
           <command
                 commandId="eu.etaxonomy.taxeditor.editor.derivate.deepDelete"
                 icon="icons/deep-delete-16x16-32.png"
        </menuContribution>
        <menuContribution
              allPopups="false"
 -            locationURI="popup:eu.etaxonomy.taxeditor.navigation.navigatorpopup?after=taxeditor-navigation.separator2">
 +            locationURI="toolbar:eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView">
           <command
 -               commandId="eu.etaxonomy.taxeditor.editor.handler.openDerivateView"
 -               label="%command.label.55"
 -               style="push">
 +               commandId="eu.etaxonomy.taxeditor.editor.derivative.listenToSelectionChange"
 +               icon="icons/synced.gif"
 +               label="Link with Taxon Editor"
 +               style="toggle">
              <visibleWhen
                    checkEnabled="false">
 -               <and>
 -                  <reference
 -                        definitionId="isCdmStoreConnected">
 -                  </reference>
 -                  <reference
 -                        definitionId="isTaxonNode">
 -                  </reference>
 -               </and>
 -            </visibleWhen>
 -         </command>
 -         <separator
 -               name="eu.etaxonomy.taxeditor.editor.separator1"
 -               visible="true">
 -         </separator>
 -      </menuContribution>
 -      <menuContribution
 -            locationURI="menu:eu.etaxonomy.taxeditor.menu.showView?after=org.eclipse.ui.views.showView.supplemental">
 -         <separator
 -               name="eu.etaxonomy.taxeditor.store.showViewMenu.validation.separator"
 -               visible="true">
 -         </separator>
 -         <command
 -               commandId="org.eclipse.ui.views.showView"
 -               label="%command.name.40"
 -               style="push">
 -            <parameter
 -                  name="org.eclipse.ui.views.showView.viewId"
 -                  value="eu.etaxonomy.taxeditor.editor.view.validation.problems">
 -            </parameter>
 -            <visibleWhen
 -                  checkEnabled="true">
                 <reference
                       definitionId="isCdmStoreConnected">
                 </reference>
              id="eu.etaxonomy.taxeditor.editor.command.new.person"
              name="%command.name.26">
        </command>
 -      <command
 -            categoryId="eu.etaxonomy.taxeditor.editor.new.category"
 -            defaultHandler="eu.etaxonomy.taxeditor.editor.handler.create.NewSpecimenHandler"
 -            id="eu.etaxonomy.taxeditor.editor.command.new.specimen"
 -            name="%command.name.27">
 -      </command>
        <category
              id="eu.etaxonomy.taxeditor.editor.key.category"
              name="%category.name.5">
              id="eu.etaxonomy.taxeditor.editor.view.concept.command.open"
              name="%command.name.33">
        </command>
+       <command
+             categoryId="eu.etaxonomy.taxeditor.editor.view.concept.category"
+             defaultHandler="eu.etaxonomy.taxeditor.editor.view.concept.handler.DeleteConceptRelationHandler"
+             id="eu.etaxonomy.taxeditor.editor.view.concept.command.delete"
+             name="%command.name.51">
+       </command>
        <category
              id="eu.etaxonomy.taxeditor.bulkeditor.group.category"
              name="%category.name.7">
        <command
              defaultHandler="eu.etaxonomy.taxeditor.editor.handler.OpenDerivateViewHandler"
              id="eu.etaxonomy.taxeditor.editor.openSpecimenEditor"
 -            name="Open Specimen Editor">
 +            name="Open Derivative Editor">
           <commandParameter
                 id="eu.etaxonomy.taxeditor.specimenUuidParameter"
                 name="Specimen UUID parameter"
                 typeId="eu.etaxonomy.taxeditor.specimenUuidParameterType">
           </commandParameter>
        </command>
 +      <command
 +            defaultHandler="eu.etaxonomy.taxeditor.editor.view.derivate.handler.ListenToSelectionChangeHandler"
 +            id="eu.etaxonomy.taxeditor.editor.derivative.listenToSelectionChange"
 +            name="Link with editor">
 +      </command>
          
     </extension>
     <extension
index 409416da2eb438d3da8ce2adb54417dfbac93e0d,bfb5f5751547c5d54daf8bbe8fc89eb73de2e959..f5956fa1bebf439a99de347d0b52c9efb07a8d8f
@@@ -27,6 -27,7 +27,6 @@@ import eu.etaxonomy.cdm.model.molecular
  import eu.etaxonomy.cdm.model.molecular.SingleRead;
  import eu.etaxonomy.taxeditor.editor.Messages;
  import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 -import eu.etaxonomy.taxeditor.model.AbstractUtility;
  import eu.etaxonomy.taxeditor.model.MessagingUtils;
  import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
  import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@@@ -79,12 -80,12 +79,12 @@@ public class DeleteDerivateOperation ex
                  && treeNode.getValue().equals(element)
                  && treeNode.getParent()!=null
                  && treeNode.getParent().getValue() instanceof Sequence){
-             deleteResult = CdmStore.getService(IOccurrenceService.class).deleteSingleRead(((SingleRead)element).getUuid(),
+             deleteResult = CdmStore.getService(ISequenceService.class).deleteSingleRead(((SingleRead)element).getUuid(),
                      ((Sequence) treeNode.getParent().getValue()).getUuid());
          } else if(element instanceof Sequence){
-             deleteResult = CdmStore.getService(ISequenceService.class).delete(element.getUuid(), deleteConfigurator);
+             deleteResult = CdmStore.getService(ISequenceService.class).delete(element.getUuid());
          } else {
-             deleteResult = CdmStore.getService(IOccurrenceService.class).deleteDerivateHierarchy(element.getUuid(), deleteConfigurator);
+             deleteResult = CdmStore.getService(IOccurrenceService.class).delete(element.getUuid(), deleteConfigurator);
          }
          if(deleteResult.isOk()){
              if(getPostOperationEnabled() instanceof DerivateView){
                  //update DerivateView
                  derivateView.getConversationHolder().commit();
                  IStatus returnStatus = postExecute(null);
 -                //close if no more items left
 -                if(derivateView.getViewer().getTree().getItemCount()<1){
 -                    AbstractUtility.close(derivateView);
 -                }
                  return returnStatus;
              }
          }