Fix selection handling for DetailsView
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / view / detail / DetailsViewPart.java
index b41cf48c8f5e39b59388c396c1f28c5899e23182..f6ff7123b8f4e478f67d2deb602da4caf3c5f755 100644 (file)
@@ -22,6 +22,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.internal.e4.compatibility.CompatibilityPart;
 
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
@@ -81,7 +82,11 @@ public class DetailsViewPart extends AbstractCdmEditorViewPart implements IPartC
                    EPartService partService = TaxeditorStorePlugin.getDefault().getWorkbench().getService(EPartService.class);
                    Collection<MPart> parts = partService.getParts();
                    for (MPart mPart : parts) {
-                       if(selectionProvidingPart.equals(mPart.getObject())){
+                       Object object = mPart.getObject();
+                       if(object instanceof CompatibilityPart){
+                           object = ((CompatibilityPart) object).getPart();
+                       }
+                       if(selectionProvidingPart.equals(object)){
                            isSelectionProvidingPartStillActive = true;
                            break;
                        }