ref #9448: remove E4 from file names - coninue and cleanup
authorKatja Luther <k.luther@bgbm.org>
Wed, 2 Jun 2021 11:16:03 +0000 (13:16 +0200)
committerKatja Luther <k.luther@bgbm.org>
Wed, 2 Jun 2021 11:16:03 +0000 (13:16 +0200)
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/derivate/DerivateView.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/AppModelId.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ImageElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerChooser.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerContextMenuE4.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtil.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtilE4.java with 99% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsViewerE4.java

index af68394f3f763d371274396d7c3e0bdb2fa4c467..74d6307f1abf75015847762e522301cd84f63539 100755 (executable)
@@ -12,6 +12,7 @@ package eu.etaxonomy.taxeditor.editor.name.handler;
 import org.eclipse.core.expressions.PropertyTester;
 import org.eclipse.jface.viewers.IStructuredSelection;
 
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
@@ -142,7 +143,7 @@ public class NameEditorMenuPropertyTester extends PropertyTester {
 
        public static boolean isSynonymOrTaxonInHomotypicalGroupWithMoreSynonyms(Object selectedElement) {
                if (isSynonym(selectedElement) || isAccepted(selectedElement)){
-                       TaxonBase<?> synonym = (TaxonBase<?>) selectedElement;
+                       TaxonBase<?> synonym = HibernateProxyHelper.deproxy(selectedElement, TaxonBase.class);
                        return synonym.getHomotypicGroup().getTypifiedNames().size()>1;
                }
                return false;
index b34c78daccaf80200c41408019929779840533d7..a2488c5eb0cdaed6f4a7a6a2c4077a42cd992bee 100644 (file)
@@ -458,7 +458,6 @@ public class DerivateView implements IPartContentHasFactualData, IConversationEn
     @Override
     public void changed(Object element) {
         setDirty(true);
-        //firePropertyChange(IEditorPart.PROP_DIRTY);
         viewer.update(new TreeNode(element), null);
         viewer.refresh();
     }
index f4ebd6bbd5e025cad5d8c489ed0113096987d365..4a2723fe9a1f93f10802063f28e421b9cb28bbf7 100644 (file)
@@ -84,7 +84,7 @@ import eu.etaxonomy.taxeditor.operation.e4.CdmHandlerE4;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 import eu.etaxonomy.taxeditor.ui.dialog.ReportTextDialog;
-import eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4;
+import eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewer;
 import eu.etaxonomy.taxeditor.view.e4.details.DetailsPartE4;
 import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart;
 
@@ -417,13 +417,13 @@ public abstract class AbstractUtility {
 
     public static void refreshDetailsViewer(EPartService partService) {
         if (getDetailsView(partService) != null) {
-            ((AbstractCdmDataViewerE4) getDetailsView(partService).getViewer()).refresh();
+            ((AbstractCdmDataViewer) getDetailsView(partService).getViewer()).refresh();
         }
     }
 
     public static void reflowDetailsViewer(EPartService partService) {
         if (getDetailsView(partService) != null) {
-            ((AbstractCdmDataViewerE4) getDetailsView(partService).getViewer()).reflow();
+            ((AbstractCdmDataViewer) getDetailsView(partService).getViewer()).reflow();
         }
     }
 
index d6e877489abc5f4ca7c0378f9a1b3fa40d2bf998..11baa9aac56cae8b83dcdbca9b9b1f3525b7a435 100644 (file)
@@ -349,8 +349,8 @@ public class AppModelId {
        public static final String PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_STORE_PARTDESCRIPTOR_OCCURENCESEARCH = "eu.etaxonomy.taxeditor.store.partdescriptor.occurencesearch";
        public static final String PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_STORE_PARTDESCRIPTOR_SEARCHDIALOG = "eu.etaxonomy.taxeditor.store.partdescriptor.SearchDialog";
        public static final String PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_STORE_PARTDESCRIPTOR_TERMSEARCH = "eu.etaxonomy.taxeditor.store.partdescriptor.termsearch";
-       public static final String PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_VIEW_DATAIMPORT_E4_GBIFRESPONSEIMPORTVIEWE4 = "eu.etaxonomy.taxeditor.view.dataimport.e4.GbifResponseImportViewE4";
-       public static final String PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_VIEW_DATAIMPORT_E4_SPECIMENIMPORTVIEWE4 = "eu.etaxonomy.taxeditor.view.dataimport.e4.SpecimenImportViewE4";
+       public static final String PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_VIEW_DATAIMPORT_E4_GBIFRESPONSEIMPORTVIEWE4 = "eu.etaxonomy.taxeditor.view.dataimport.e4.GbifResponseImportView";
+       public static final String PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_VIEW_DATAIMPORT_E4_SPECIMENIMPORTVIEWE4 = "eu.etaxonomy.taxeditor.view.dataimport.e4.SpecimenImportView";
        public static final String PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_VIEW_DATASOURCE = "eu.etaxonomy.taxeditor.view.datasource";
        public static final String PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_VIEW_E4_DETAILS_DETAILSPARTE4 = "eu.etaxonomy.taxeditor.view.e4.details.DetailsPartE4";
        public static final String PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_VIEW_E4_SUPPLEMENTALDATA_SUPPLEMENTALDATAPARTE4 = "eu.etaxonomy.taxeditor.view.e4.supplementaldata.SupplementalDataPartE4";
index 1f8875516879c689acf63b0a0881b747d29cd5f5..40678d5736ca836469e8e4b443ee1199f92786db 100644 (file)
@@ -36,7 +36,7 @@ import eu.etaxonomy.cdm.common.UriUtils;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4;
+import eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewer;
 import eu.etaxonomy.taxeditor.view.e4.details.DetailsPartE4;
 import eu.etaxonomy.taxeditor.view.e4.supplementaldata.SupplementalDataPartE4;
 
@@ -82,7 +82,7 @@ public class ImageElement extends AbstractCdmFormElement implements PaintListene
                     IEclipseContext context =  getFormFactory().getContext().getActiveChild();
                     DetailsPartE4 detailsView = AbstractUtility.getDetailsView(partService);
                     if(detailsView!=null){
-                        AbstractCdmDataViewerE4 viewer = (AbstractCdmDataViewerE4) detailsView.getViewer();
+                        AbstractCdmDataViewer viewer = (AbstractCdmDataViewer) detailsView.getViewer();
                         if(viewer!=null){
                             viewer.reflow();
                         }
@@ -92,7 +92,7 @@ public class ImageElement extends AbstractCdmFormElement implements PaintListene
                     if(mPartSupplemental!=null){
                         SupplementalDataPartE4 supplementalPart = (SupplementalDataPartE4)mPartSupplemental.getObject();
                         if(supplementalPart!=null){
-                            AbstractCdmDataViewerE4 viewer = (AbstractCdmDataViewerE4) (supplementalPart).getViewer();
+                            AbstractCdmDataViewer viewer = (AbstractCdmDataViewer) (supplementalPart).getViewer();
                             if(viewer!=null){
                                 viewer.refresh();
                             }
index 52991a8d805819b9155d9c4b3eec556d9a4fd7ac..f2a880937cd1727f1d79673518f0796518f1eefc 100644 (file)
@@ -74,7 +74,7 @@ public class CdmViewerChooser extends PopupDialog implements ISelectionChangedLi
      */
     public void chooseViewer(Object input){
         this.input = input;
-        this.nameViewerMap = CdmViewerUtilE4.getAvailableViewers(input);
+        this.nameViewerMap = CdmViewerUtil.getAvailableViewers(input);
 
         //if only one editor is available then open it
         if(nameViewerMap.size()==1){
index c638270837073d52307bc60f03dac4a81e656193..373a604841b7871408c1763abb3a1d77d1d811c9 100644 (file)
@@ -50,9 +50,9 @@ public class CdmViewerContextMenuE4 {
             return;
         }
 
-        List<UuidAndTitleCache<? extends ICdmBase>> uuidTypes = CdmViewerUtilE4.transformSelectionToUuidAndTitleCacheList(selectedObject);
+        List<UuidAndTitleCache<? extends ICdmBase>> uuidTypes = CdmViewerUtil.transformSelectionToUuidAndTitleCacheList(selectedObject);
 
-        Map<Command, String> enabledCommands = CdmViewerUtilE4.getAvailableViewers(uuidTypes, commandService, handlerService);
+        Map<Command, String> enabledCommands = CdmViewerUtil.getAvailableViewers(uuidTypes, commandService, handlerService);
 
         //check if only one or multiple viewers/commands are available
         if (!enabledCommands.isEmpty()){
similarity index 99%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtilE4.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtil.java
index 4724514adb549421a2082292c808dfe1b3ec40e9..296a7a2eaf43d2a800436bda14057ffc0091b387 100644 (file)
@@ -40,7 +40,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @author pplitzner
  * @date Jul 7, 2015
  */
-public class CdmViewerUtilE4 {
+public class CdmViewerUtil {
 
     /**
      * Returns a map of available commands to open the given input. Keys are the
index 175d26fbfcf7cb59b545825ddf7794ecb781ce9d..8bd6b10766d379ec15debc6bea2793cd82c6f914 100755 (executable)
@@ -145,7 +145,7 @@ import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermMediaSection;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
 import eu.etaxonomy.taxeditor.view.detail.CdmSectionPart;
-import eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4;
+import eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewer;
 
 /**
  * The DetailsViewer handles the content of the details view (
@@ -156,7 +156,7 @@ import eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4;
  * @author pplitzner
  * @date 18.07.2017
  */
-public class DetailsViewerE4 extends AbstractCdmDataViewerE4 {
+public class DetailsViewerE4 extends AbstractCdmDataViewer {
 
     private ISelection selection;
     private boolean detailsEnabled = true;