- fixed potential session exceptions during closing/saving
authorPatric Plitzner <p.plitzner@bgbm.org>
Wed, 18 Jun 2014 07:08:36 +0000 (07:08 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Wed, 18 Jun 2014 07:08:36 +0000 (07:08 +0000)
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/view/derivateSearch/DerivateSearchView.java

index 4b0a5bad1071a7a8a3426031105b15ec669a5508..2ae721e3c98fd91bf5cf0f14fe7e4b304b8ae41b 100644 (file)
@@ -301,6 +301,9 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
      */
     @Override
     public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
+        if (!conversation.isBound()) {
+            conversation.bind();
+        }
         conversation.close();
 //        if(memento == null){
 //            return;
index 142bdbdb8722aaa2cd35e8ffb1a80f531798814e..ddd4b1a20dba1cd3283da47aa4fa965e6d88c98b 100644 (file)
@@ -1,12 +1,12 @@
 // $Id$
 /**
-* Copyright (C) 2013 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.
-*/
+ * Copyright (C) 2013 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.view.derivateSearch;
 
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -101,7 +101,7 @@ public class DerivateSearchView extends ViewPart implements IContextListener {
      */
     @Override
     public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
-        if(getConversationHolder()!=null){
+        if(getConversationHolder()!=null && getConversationHolder().isBound() && !getConversationHolder().isClosed()) {
             getConversationHolder().close();
         }
     }