From caceb054c6f46058ccfc9de051ecb0ac0409f984 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20M=C3=BCller?= Date: Mon, 29 Jun 2020 16:56:02 +0200 Subject: [PATCH] cleanup --- .../service/CdmServiceInterceptorException.java | 8 ++++++++ .../taxeditor/service/RemoteInvocationTermCacher.java | 8 ++++++++ .../ui/section/AbstractEntityCollectionElement.java | 9 ++------- .../taxeditor/ui/selection/EntitySelectionElement.java | 8 +++----- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceInterceptorException.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceInterceptorException.java index 005bf37ad..cb0ea3554 100644 --- a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceInterceptorException.java +++ b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceInterceptorException.java @@ -1,3 +1,11 @@ +/** +* Copyright (C) 2020 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.service; public class CdmServiceInterceptorException extends RuntimeException { diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/RemoteInvocationTermCacher.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/RemoteInvocationTermCacher.java index e64f8bc1d..7808c477b 100644 --- a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/RemoteInvocationTermCacher.java +++ b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/RemoteInvocationTermCacher.java @@ -1,3 +1,11 @@ +/** +* Copyright (C) 2020 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.service; import java.util.HashMap; diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionElement.java index b8f0c20f6..df7f77dcd 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionElement.java @@ -37,9 +37,9 @@ import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; /** * Visualizes an element of type ENTITY in an {@link AbstractEntityCollectionSection} - * and links listener functionalities to it. + * and links listener functionalities to it. * - * @param ENTITY the type of the element which is visualized by this class + * @param ENTITY the type of the element which is visualized by this class * * @author n.hoffmann * @created Nov 16, 2009 @@ -156,7 +156,6 @@ public abstract class AbstractEntityCollectionElement extends setBackground(selected ? SELECTED : getPersistentBackground()); } - /** {@inheritDoc} */ @Override public void propertyChange(PropertyChangeEvent event) { if (event == null) { @@ -170,7 +169,6 @@ public abstract class AbstractEntityCollectionElement extends public abstract void handleEvent(Object eventSource); - /** {@inheritDoc} */ @Override public void setBackground(Color color) { if(box.isDisposed() || container.isDisposed()){ @@ -192,12 +190,10 @@ public abstract class AbstractEntityCollectionElement extends } - /** {@inheritDoc} */ @Override public void widgetDefaultSelected(SelectionEvent e) { } - /** {@inheritDoc} */ @Override public Composite getLayoutComposite() { return container; @@ -221,7 +217,6 @@ public abstract class AbstractEntityCollectionElement extends "Parent element should be IConversationEnabled"); } - /** {@inheritDoc} */ @Override public void update(CdmDataChangeMap changeEvents) { } diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java index 98b83c180..294e39061 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java @@ -452,7 +452,6 @@ public class EntitySelectionElement extends this.selectionElement = selectionElement; } - /** {@inheritDoc} */ @Override public void widgetSelected(SelectionEvent e) { WizardDialog dialog = new WizardDialog(selectionElement.getShell(), @@ -462,10 +461,10 @@ public class EntitySelectionElement extends //if the edited entity has already been persisted //but the transient entity is still set in this //EntitySelectionElement, re-load it and set it - IService service = CdmStore.getService(entity); - if(entity.getId()==0){ + if(!entity.isPersited()){ + IService service = CdmStore.getService(entity); T loadedEntity = service.load(entity.getUuid()); - if(loadedEntity!=null){ + if(loadedEntity != null){ setEntity(loadedEntity); } } @@ -474,7 +473,6 @@ public class EntitySelectionElement extends } // not used - /** {@inheritDoc} */ @Override public void widgetDefaultSelected(SelectionEvent e) { } -- 2.34.1