commit 9ad85674efcfcd560b1723209d9526c2b7f5d01a
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Mon Aug 21 17:48:32 2017 +0200

    ref #6911 Migrate concept view

diff --git a/eu.etaxonomy.taxeditor.editor/fragment.e4xmi b/eu.etaxonomy.taxeditor.editor/fragment.e4xmi
index 6a2af068d..8b56be667 100644
--- a/eu.etaxonomy.taxeditor.editor/fragment.e4xmi
+++ b/eu.etaxonomy.taxeditor.editor/fragment.e4xmi
@@ -104,11 +104,25 @@
         </children>
         <children xsi:type="menu:HandledMenuItem" xmi:id="_m00sEIGxEeehlNPrK_b5JA" elementId="eu.etaxonomy.taxeditor.editor.factualData.moveDescriptionElement" label="%command.label.29" command="_QJzBcIG4EeehlNPrK_b5JA"/>
         <children xsi:type="menu:MenuSeparator" xmi:id="_nRINkIGxEeehlNPrK_b5JA" elementId="eu.etaxonomy.taxeditor.editor.menuseparator.9"/>
-        <children xsi:type="menu:DynamicMenuContribution" xmi:id="_4KNqkIGxEeehlNPrK_b5JA" elementId="eu.etaxonomy.taxeditor.editor.dynamicmenucontribution.0" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.view.CdmViewerContextMenuE4"/>
+        <children xsi:type="menu:DynamicMenuContribution" xmi:id="_4KNqkIGxEeehlNPrK_b5JA" elementId="eu.etaxonomy.taxeditor.editor.factual.dynamicmenucontribution.cdmViewer" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.view.CdmViewerContextMenuE4"/>
         <children xsi:type="menu:MenuSeparator" xmi:id="_pOAxAIGxEeehlNPrK_b5JA" elementId="eu.etaxonomy.taxeditor.editor.menuseparator.10"/>
         <children xsi:type="menu:HandledMenuItem" xmi:id="_rLS9EIGxEeehlNPrK_b5JA" elementId="eu.etaxonomy.taxeditor.editor.factualData.delete" label="%command.label.30" command="_AqgMcIG5EeehlNPrK_b5JA"/>
       </menus>
     </elements>
+    <elements xsi:type="basic:PartDescriptor" xmi:id="_KJxRIIZ4EeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.view.concept.e4.ConceptViewPartE4" label="%view.name.2" iconURI="" closeable="true" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.view.concept.e4.ConceptViewPartE4">
+      <handlers xmi:id="_fEoFAIZ5EeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.view.concept.e4.handler.DeleteConceptRelationHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.view.concept.e4.handler.DeleteConceptRelationHandlerE4" command="_Ob4xIIZ5EeeOc9DZcjNN7g"/>
+      <handlers xmi:id="_VtwU4IZ8EeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.view.concept.e4.handler.CreateConceptRelationHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.view.concept.e4.handler.CreateConceptRelationHandlerE4" command="_2torwIZ7EeeOc9DZcjNN7g"/>
+      <handlers xmi:id="_R3QgQIaDEeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.handler.0" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.view.concept.e4.handler.OpenRelatedConceptHandlerE4" command="_OKtWAIaDEeeOc9DZcjNN7g"/>
+      <handlers xmi:id="_fs6ogIaDEeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.view.concept.e4.handler.OpenRelatedConceptInBulkEditorHandlerE4" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.view.concept.e4.handler.OpenRelatedConceptInBulkEditorHandlerE4" command="_cMeq0IaHEeeOc9DZcjNN7g"/>
+      <menus xsi:type="menu:PopupMenu" xmi:id="_KJxRJYZ4EeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.popupmenu.conceptview">
+        <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_MhPIsIaBEeeOc9DZcjNN7g" coreExpressionId="isCdmStoreConnected"/>
+        <children xsi:type="menu:DynamicMenuContribution" xmi:id="_dXzzUIZ4EeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.dynamicmenucontribution.2" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.view.concept.e4.CreateConceptRelationMenuE4"/>
+        <children xsi:type="menu:MenuSeparator" xmi:id="_Jt9pcIZ5EeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.menuseparator.11"/>
+        <children xsi:type="menu:DynamicMenuContribution" xmi:id="_2SGGoIZ4EeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.concept.dynamicmenucontribution.cdmViewer" contributionURI="bundleclass://eu.etaxonomy.taxeditor.store/eu.etaxonomy.taxeditor.view.CdmViewerContextMenuE4"/>
+        <children xsi:type="menu:MenuSeparator" xmi:id="_lcXJgIaBEeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.menuseparator.12"/>
+        <children xsi:type="menu:HandledMenuItem" xmi:id="_KT8rYIZ5EeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.handledmenuitem.commandlabel44" label="%command.label.44" command="_Ob4xIIZ5EeeOc9DZcjNN7g"/>
+      </menus>
+    </elements>
   </fragments>
   <fragments xsi:type="fragment:StringModelFragment" xmi:id="__mwtMDVpEee_b7RlBzTDRw" featurename="commands" parentElementId="xpath:/">
     <elements xsi:type="commands:Command" xmi:id="_BjF3ADVqEee_b7RlBzTDRw" elementId="eu.etaxonomy.taxeditor.editor.command.specimeneditor.create_field_unit" commandName="%command.commandname.1"/>
@@ -136,6 +150,10 @@
     <elements xsi:type="commands:Command" xmi:id="_QJzBcIG4EeehlNPrK_b5JA" elementId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.moveDescriptionElements" commandName="%command.name.12"/>
     <elements xsi:type="commands:Command" xmi:id="_AqgMcIG5EeehlNPrK_b5JA" elementId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.delete" commandName="%command.name.48"/>
     <elements xsi:type="commands:Command" xmi:id="_8ccfgIHXEeehlNPrK_b5JA" elementId="eu.etaxonomy.taxeditor.editor.view.descriptive.command.createDescriptionElement" commandName="%command.name.10"/>
+    <elements xsi:type="commands:Command" xmi:id="_Ob4xIIZ5EeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.view.concept.command.delete" commandName="%command.name.50"/>
+    <elements xsi:type="commands:Command" xmi:id="_2torwIZ7EeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.name.createConceptRelation" commandName="%command.name.32"/>
+    <elements xsi:type="commands:Command" xmi:id="_OKtWAIaDEeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.view.concept.command.open" commandName="%command.name.33"/>
+    <elements xsi:type="commands:Command" xmi:id="_cMeq0IaHEeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.openBulkEditorForTaxonRelationship" commandName="Open related concept in bulk editor"/>
   </fragments>
   <fragments xsi:type="fragment:StringModelFragment" xmi:id="_pZmusEalEeeXMc6kSYO7Xg" featurename="children" parentElementId="eu.etaxonomy.taxeditor.menu.showView">
     <elements xsi:type="menu:HandledMenuItem" xmi:id="_tvph4EalEeeXMc6kSYO7Xg" elementId="eu.etaxonomy.taxeditor.editor.showViewMenu.characterEditor" label="Character Editor" command="_WPjpoDSnEeek0dKsFNy--Q">
@@ -148,10 +166,11 @@
     </elements>
     <elements xsi:type="menu:HandledMenuItem" xmi:id="_XBhycIGxEeehlNPrK_b5JA" elementId="eu.etaxonomy.taxeditor.editor.showViewMenu.factualData" label="%view.name" iconURI="platform:/plugin/eu.etaxonomy.taxeditor.editor/icons/address-book-new.png" command="_WPjpoDSnEeek0dKsFNy--Q">
       <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_COD1EIZHEee-VvuRyq44pQ" coreExpressionId="isCdmStoreConnected"/>
-      <parameters xmi:id="_XBhycYGxEeehlNPrK_b5JA" elementId="eu.etaxonomy.taxeditor.editor.showView.parameter.mediaview" name="eu.etaxonomy.taxeditor.workbench.commandparameter.partName" value="eu.etaxonomy.taxeditor.editor.view.descriptive.e4.FactualDataPartE4"/>
+      <parameters xmi:id="_XBhycYGxEeehlNPrK_b5JA" elementId="eu.etaxonomy.taxeditor.editor.showView.parameter.factualview" name="eu.etaxonomy.taxeditor.workbench.commandparameter.partName" value="eu.etaxonomy.taxeditor.editor.view.descriptive.e4.FactualDataPartE4"/>
+    </elements>
+    <elements xsi:type="menu:HandledMenuItem" xmi:id="_5s52EIZ3EeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.showViewMenu.concept" label="%command.label.6" command="_WPjpoDSnEeek0dKsFNy--Q">
+      <visibleWhen xsi:type="ui:CoreExpression" xmi:id="_BIalYIZ4EeeOc9DZcjNN7g" coreExpressionId="isCdmStoreConnected"/>
+      <parameters xmi:id="_80HvkIaAEeeOc9DZcjNN7g" elementId="eu.etaxonomy.taxeditor.editor.showView.parameter.conceptview" name="eu.etaxonomy.taxeditor.workbench.commandparameter.partName" value="eu.etaxonomy.taxeditor.editor.view.concept.e4.ConceptViewPartE4"/>
     </elements>
-  </fragments>
-  <fragments xsi:type="fragment:StringModelFragment" xmi:id="___fvgIHXEeehlNPrK_b5JA" featurename="handlers" parentElementId="xpath:/">
-    <elements xsi:type="commands:Handler" xmi:id="_GiwoMIHYEeehlNPrK_b5JA" elementId="eu.etaxonomy.taxeditor.editor.handler.0" contributionURI="bundleclass://eu.etaxonomy.taxeditor.editor/eu.etaxonomy.taxeditor.editor.view.descriptive.e4.handler.CreateDescriptionElementHandler" command="_8ccfgIHXEeehlNPrK_b5JA"/>
   </fragments>
 </fragment:ModelFragments>
diff --git a/eu.etaxonomy.taxeditor.editor/plugin.xml b/eu.etaxonomy.taxeditor.editor/plugin.xml
index 71ea23779..ca8475a84 100644
--- a/eu.etaxonomy.taxeditor.editor/plugin.xml
+++ b/eu.etaxonomy.taxeditor.editor/plugin.xml
@@ -88,13 +88,6 @@
                 name="%view.name.0"
                 restorable="true">
          </view>
-         <view
-               category="eu.etaxonomy.taxeditor.editor.category"
-               class="eu.etaxonomy.taxeditor.editor.view.concept.ConceptViewPart"
-               id="eu.etaxonomy.taxeditor.editor.view.concept"
-               name="%view.name.2"
-               restorable="true">
-         </view>
          <view
                category="eu.etaxonomy.taxeditor.editor.category"
                class="eu.etaxonomy.taxeditor.editor.view.concept.graph.ConceptGraphView"
@@ -277,21 +270,6 @@
                name="eu.etaxonomy.taxeditor.editor.showViewMenu"
                visible="true">
          </separator>
-         <command
-               commandId="org.eclipse.ui.views.showView"
-               label="%command.label.6"
-               style="push">
-            <parameter
-                  name="org.eclipse.ui.views.showView.viewId"
-                  value="eu.etaxonomy.taxeditor.editor.view.concept">
-            </parameter>
-            <visibleWhen
-                  checkEnabled="true">
-               <reference
-                     definitionId="isCdmStoreConnected">
-               </reference>
-            </visibleWhen>
-         </command>
          <command
                commandId="org.eclipse.ui.views.showView"
                label="%command.label.7"
@@ -838,29 +816,6 @@
       
       
       
-      <menuContribution
-            locationURI="popup:eu.etaxonomy.taxeditor.editor.view.concept">
-         <menu
-               label="%menu.label.3">
-            <dynamic
-                  class="eu.etaxonomy.taxeditor.editor.view.concept.handler.CreateConceptRelationMenu"
-                  id="eu.etaxonomy.taxeditor.editor.view.concept.menus.new">
-            </dynamic>
-         </menu>
-         <dynamic
-               class="eu.etaxonomy.taxeditor.view.CdmViewerContextMenu"
-               id="eu.etaxonomy.taxeditor.view.context.CdmViewerContextMenu">
-         </dynamic>
-         <separator
-               name="eu.etaxonomy.taxeditor.editor.view.concept.menu.separator1"
-               visible="true">
-         </separator>
-         <command
-               commandId="eu.etaxonomy.taxeditor.editor.view.concept.command.delete"
-               label="%command.label.44"
-               style="push">
-         </command>
-      </menuContribution>
       <menuContribution
             allPopups="false"
             locationURI="popup:bulkeditor.editor?before=eu.etaxonomy.taxeditor.bulkeditor.separator1">
@@ -996,18 +951,6 @@
             </with>
          </enabledWhen>
       </handler>
-      <handler
-            class="eu.etaxonomy.taxeditor.editor.view.concept.handler.DeleteConceptRelationHandler"
-            commandId="eu.etaxonomy.taxeditor.editor.view.concept.command.delete">
-         <activeWhen>
-            <with
-                  variable="activePartId">
-               <equals
-                     value="eu.etaxonomy.taxeditor.editor.view.concept">
-               </equals>
-            </with>
-         </activeWhen>
-      </handler>
       <handler
             class="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.ToggleShowOnlyIndividualAssociationsHandler"
             commandId="eu.etaxonomy.taxeditor.editor.handler.showOnlyIndividualAssociations">
@@ -1343,24 +1286,6 @@
             id="eu.etaxonomy.taxeditor.editor.view.concept.category"
             name="%category.name.6">
       </category>
-      <command
-            categoryId="eu.etaxonomy.taxeditor.editor.view.concept.category"
-            defaultHandler="eu.etaxonomy.taxeditor.editor.view.concept.handler.CreateConceptRelationHandler"
-            id="eu.etaxonomy.taxeditor.editor.name.createConceptRelation"
-            name="%command.name.32">
-      </command>
-      <command
-            categoryId="eu.etaxonomy.taxeditor.editor.view.concept.category"
-            defaultHandler="eu.etaxonomy.taxeditor.editor.view.concept.handler.OpenRelatedConceptHandler"
-            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">
@@ -1434,11 +1359,6 @@
             id="eu.etaxonomy.taxeditor.openSpecimenEditorForTypeSpecimen"
             name="%command.name.OPEN_EDITOR_FOR_TYPE_SPECIMEN">
       </command>
-      <command
-            defaultHandler="eu.etaxonomy.taxeditor.editor.view.concept.handler.OpenRelatedConceptInBulkEditorHandler"
-            id="eu.etaxonomy.taxeditor.editor.openBulkEditorForTaxonRelationship"
-            name="Open bulk editor for taxon relationship">
-      </command>
         
    </extension>
    <extension
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/ConceptViewPartE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/ConceptViewPartE4.java
new file mode 100644
index 000000000..2cf38b559
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/ConceptViewPartE4.java
@@ -0,0 +1,169 @@
+/**
+* Copyright (C) 2007 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.editor.view.concept.e4;
+
+import java.util.Map.Entry;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.services.EMenuService;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
+import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.key.AbstractGraphKeyEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+import eu.etaxonomy.taxeditor.editor.view.concept.ConceptContentProvider;
+import eu.etaxonomy.taxeditor.editor.view.concept.ConceptLabelProvider;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
+import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
+import eu.etaxonomy.taxeditor.model.LineSelection;
+import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
+import eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4;
+import eu.etaxonomy.taxeditor.view.supplementaldata.SupplementalDataViewPart;
+
+/**
+ *
+ * @author pplitzner
+ * @date 21.08.2017
+ *
+ */
+public class ConceptViewPartE4 extends AbstractCdmEditorPartE4
+implements IPartContentHasDetails, IPartContentHasSupplementalData{
+
+    private ISelectionChangedListener selectionChangedListener;
+
+    @Inject
+    private ESelectionService selService;
+
+    @Inject
+    @Optional
+    public void selectionChanged(
+            @Named(IServiceConstants.ACTIVE_SELECTION)Object selection,
+            @Named(IServiceConstants.ACTIVE_PART)MPart activePart,
+            MPart thisPart){
+        if(activePart==thisPart){
+            return;
+        }
+
+        Object partObject = createPartObject(activePart);
+
+        if (partObject instanceof DetailsViewPart || partObject instanceof SupplementalDataViewPart) {
+            // do not show empty page as these views are also used to edit the
+            // description selected in this view
+            return;
+        }
+        else if(partObject instanceof BulkEditor && selection instanceof LineSelection){
+			if(((LineSelection) selection).getFirstElement() instanceof Taxon){
+				showViewer((LineSelection) selection, activePart, viewer);
+			}
+			else{
+				showEmptyPage();
+			}
+			return;
+		}
+		else if(partObject instanceof AbstractGraphKeyEditor){
+			showEmptyPage();
+		}
+		else if(partObject instanceof MultiPageTaxonEditor){
+		    IEditorInput input = ((IEditorPart) partObject).getEditorInput();
+		    showViewer(new StructuredSelection(input), activePart, viewer);
+		}
+		else {
+		    showEmptyPage();
+		}
+
+	}
+
+    //FIXME E4 implement
+//	@Override
+//	protected String createPartTitle(Object selectedObject) {
+//		if(selectedObject instanceof TaxonEditorInput){
+//			return super.createPartTitle(((TaxonEditorInput) selectedObject).getTaxon());
+//		}
+//		return super.createPartTitle(selectedObject);
+//	}
+
+	@PostConstruct
+    public void create(Composite parent, EMenuService menuService) {
+
+	    ConceptRelationViewer conceptViewer = new ConceptRelationViewer(parent);
+
+	    conceptViewer.setContentProvider(new ConceptContentProvider());
+	    conceptViewer.setLabelProvider(new ConceptLabelProvider());
+
+
+	    conceptViewer.setSorter(new ViewerSorter());
+
+		viewer = conceptViewer;
+
+		// Propagate selection from viewer
+        selectionChangedListener = (event -> selService.setSelection(AbstractUtility.getElementsFromSelectionChangedEvent(event)));
+        viewer.addSelectionChangedListener(selectionChangedListener);
+
+        //create context menu
+        menuService.registerContextMenu(viewer.getControl(), "eu.etaxonomy.taxeditor.editor.popupmenu.conceptview");
+
+	}
+
+	@Override
+	public void changed(Object object) {
+		getViewer().refresh();
+		super.changed(object);
+	}
+
+	private class ConceptRelationViewer extends ListViewer {
+
+		public ConceptRelationViewer(Composite parent) {
+			super(parent);
+		}
+
+		@Override
+		public ISelection getSelection() {
+			ISelection selection = super.getSelection();
+			if(selection instanceof IStructuredSelection && !selection.isEmpty()){
+				Object firstElement = ((IStructuredSelection) selection).getFirstElement();
+				TaxonRelationship taxonRelationship = ((Entry<TaxonRelationship, Taxon>)firstElement).getKey();
+				return new StructuredSelection(taxonRelationship);
+
+			}
+			return selection;
+		}
+
+		@Override
+		public void setSelection(ISelection selection) {
+			super.setSelection(selection);
+		}
+
+	}
+
+	@Override
+	protected String getViewName() {
+		return Messages.ConceptViewPart_VIEWER_NAME;
+	}
+
+}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/CreateConceptRelationMenuE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/CreateConceptRelationMenuE4.java
new file mode 100644
index 000000000..67be32dcd
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/CreateConceptRelationMenuE4.java
@@ -0,0 +1,60 @@
+/**
+* Copyright (C) 2007 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.editor.view.concept.e4;
+
+import java.util.List;
+
+import org.eclipse.e4.ui.di.AboutToShow;
+import org.eclipse.e4.ui.model.application.commands.MCommand;
+import org.eclipse.e4.ui.model.application.commands.MCommandsFactory;
+import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
+import org.eclipse.e4.ui.model.application.ui.menu.MMenu;
+import org.eclipse.e4.ui.model.application.ui.menu.MMenuElement;
+import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory;
+
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ *
+ * @author pplitzner
+ * @date 21.08.2017
+ *
+ */
+public class CreateConceptRelationMenuE4 {
+
+    public String commandName = "eu.etaxonomy.taxeditor.editor.name.createConceptRelation"; //$NON-NLS-1$
+
+    /** {@inheritDoc} */
+    @AboutToShow
+    public void aboutToShow(List<MMenuElement> items) {
+
+        MMenu menu = MMenuFactory.INSTANCE.createMenu();
+        menu.setLabel("New");
+        items.add(menu);
+
+        for (final TaxonRelationshipType taxonRelationshipType : CdmStore.getTermManager().getPreferredTerms(TaxonRelationshipType.class)) {
+            if (!taxonRelationshipType.equals(TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN())) {
+                MHandledMenuItem menuItem = MMenuFactory.INSTANCE.createHandledMenuItem();
+                menuItem.setLabel(taxonRelationshipType.getTitleCache());
+                MCommand mCommand = MCommandsFactory.INSTANCE.createCommand();
+                mCommand.setElementId(commandName);
+                mCommand.setCommandName("Create concept relation");
+                // set params
+                menuItem.getTransientData().put(commandName + ".taxonRelationshipType.uuid",
+                        taxonRelationshipType.getUuid());
+
+                menuItem.setCommand(mCommand);
+                menu.getChildren().add(menuItem);
+            }
+        }
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/CreateConceptRelationHandlerE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/CreateConceptRelationHandlerE4.java
new file mode 100644
index 000000000..62a138a70
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/CreateConceptRelationHandlerE4.java
@@ -0,0 +1,110 @@
+/**
+ * Copyright (C) 2007 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.editor.view.concept.e4.handler;
+
+import java.util.UUID;
+
+import javax.inject.Named;
+
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.service.ITermService;
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.Page;
+import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
+import eu.etaxonomy.taxeditor.editor.view.concept.e4.ConceptViewPartE4;
+import eu.etaxonomy.taxeditor.editor.view.concept.operation.CreateConceptRelationOperation;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonBaseSelectionDialog;
+import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
+
+/**
+ *
+ * @author pplitzner
+ * @date 21.08.2017
+ *
+ */
+public class CreateConceptRelationHandlerE4 {
+
+    @Execute
+    public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart,
+            @Optional@Named(IServiceConstants.ACTIVE_SHELL) Shell shell,
+            MHandledMenuItem menuItem) {
+
+        String commandId = menuItem.getCommand().getElementId();
+        UUID uuid = (UUID) menuItem.getTransientData().get(commandId+".taxonRelationshipType.uuid");
+        TaxonRelationshipType taxonRelationshipType = HibernateProxyHelper.deproxy(CdmStore.getService(ITermService.class).load(uuid), TaxonRelationshipType.class);
+        TaxonNameEditor editor = null;
+
+
+        ConceptViewPartE4 conceptView = (ConceptViewPartE4) activePart.getObject();
+
+        Object e4WrappedPart = WorkbenchUtility.getE4WrappedPart(conceptView.getSelectionProvidingPart());
+        if(e4WrappedPart instanceof MultiPageTaxonEditor){
+            editor = (TaxonNameEditor) ((MultiPageTaxonEditor) e4WrappedPart).getPage(Page.NAME);
+        }
+
+        IUndoContext undoContext = null;
+        ConversationHolder conversationHolder = null;
+        Taxon taxon = null;
+        taxon = editor.getTaxon();
+        conversationHolder = editor.getConversationHolder();
+        undoContext = editor.getUndoContext();
+
+        //FIXME should this also be enabled for bulk editor
+        //		else if(activeEditor instanceof BulkEditor){
+        //		    BulkEditor bulkEditor = (BulkEditor)activeEditor;
+        //            ISelection selection = bulkEditor.getSelectionProvider().getSelection();
+        //		    taxon = (Taxon) ((IStructuredSelection)selection).getFirstElement();
+        //		    conversationHolder = bulkEditor.getConversationHolder();
+        //		    undoContext = bulkEditor.getUndoContext();
+        //		}
+
+        Taxon relatedConcept = TaxonBaseSelectionDialog.selectTaxon(shell, conversationHolder, taxon);
+
+
+        if(relatedConcept == null){
+            return;
+        }
+        boolean isInverse = taxonRelationshipType.getInverseLabel().isEmpty()?false:true;
+        TaxonRelationshipTypeInverseContainer typeInverseContainer =new TaxonRelationshipTypeInverseContainer(taxonRelationshipType, isInverse) ;
+
+
+        AbstractPostOperation operation = new CreateConceptRelationOperation(menuItem.getLocalizedLabel(),
+                undoContext, taxon, relatedConcept, typeInverseContainer, conceptView);
+        AbstractUtility.executeOperation(operation);
+    }
+
+    @CanExecute
+    public boolean canExecute(@Optional @Named(IServiceConstants.ACTIVE_PART) MPart activePart,
+            MHandledMenuItem menuItem){
+        boolean canExecute = false;
+        ConceptViewPartE4 conceptView = (ConceptViewPartE4) activePart.getObject();
+
+        Object e4WrappedPart = WorkbenchUtility.getE4WrappedPart(conceptView.getSelectionProvidingPart());
+        canExecute = e4WrappedPart instanceof MultiPageTaxonEditor;
+        menuItem.setVisible(canExecute);
+        return canExecute;
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/DeleteConceptRelationHandlerE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/DeleteConceptRelationHandlerE4.java
new file mode 100644
index 000000000..71da526a7
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/DeleteConceptRelationHandlerE4.java
@@ -0,0 +1,87 @@
+/**
+* Copyright (C) 2007 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.editor.view.concept.e4.handler;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.CanExecute;
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
+import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.jface.viewers.ISelection;
+
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.Page;
+import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
+import eu.etaxonomy.taxeditor.editor.view.concept.e4.ConceptViewPartE4;
+import eu.etaxonomy.taxeditor.editor.view.concept.operation.DeleteConceptRelationOperation;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
+import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
+
+/**
+ *
+ * @author pplitzner
+ * @date 21.08.2017
+ *
+ */
+public class DeleteConceptRelationHandlerE4 {
+
+    @Execute
+    public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart,
+            @Optional@Named(IServiceConstants.ACTIVE_SELECTION) Object selection, MMenuItem menuItem) {
+
+        TaxonNameEditor editor = null;
+
+        ConceptViewPartE4 conceptView = (ConceptViewPartE4) activePart.getObject();
+
+        Object e4WrappedPart = WorkbenchUtility.getE4WrappedPart(conceptView.getSelectionProvidingPart());
+        if(e4WrappedPart instanceof MultiPageTaxonEditor){
+            editor = (TaxonNameEditor) ((MultiPageTaxonEditor) e4WrappedPart).getPage(Page.NAME);
+        }
+
+        Set<TaxonRelationship> relations = new HashSet<TaxonRelationship>();
+
+
+        // FIXME E4 multiple selection
+        //			while (iterator.hasNext()){
+        if(selection instanceof TaxonRelationship){
+            relations.add((TaxonRelationship) selection);
+        }
+        //			}
+
+        //editor should not be null because this is already checked in canExecute
+        AbstractPostOperation operation = new DeleteConceptRelationOperation(menuItem.getLocalizedLabel(),
+                editor.getUndoContext(), editor.getTaxon(), relations, conceptView);
+        AbstractUtility.executeOperation(operation);
+    }
+
+	@CanExecute
+    public boolean canExecute(@Optional @Named(IServiceConstants.ACTIVE_PART) MPart activePart,
+            MHandledMenuItem menuItem){
+        boolean canExecute = false;
+        ConceptViewPartE4 conceptView = (ConceptViewPartE4) activePart.getObject();
+
+        Object e4WrappedPart = WorkbenchUtility.getE4WrappedPart(conceptView.getSelectionProvidingPart());
+        if(e4WrappedPart instanceof MultiPageTaxonEditor){
+            ISelection selection = conceptView.getViewer().getSelection();
+            canExecute = selection!=null && !selection.isEmpty();
+            menuItem.setVisible(canExecute);
+        }
+        return canExecute;
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptHandlerE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptHandlerE4.java
new file mode 100644
index 000000000..df8f8647b
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptHandlerE4.java
@@ -0,0 +1,103 @@
+/**
+* Copyright (C) 2007 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.editor.view.concept.e4.handler;
+
+import javax.inject.Named;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.PartInitException;
+
+import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+import eu.etaxonomy.taxeditor.editor.view.concept.e4.ConceptViewPartE4;
+import eu.etaxonomy.taxeditor.model.LineSelection;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
+
+/**
+ *
+ * @author pplitzner
+ * @date 21.08.2017
+ *
+ */
+public class OpenRelatedConceptHandlerE4  {
+
+    @Execute
+    public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart,
+            @Optional@Named(IServiceConstants.ACTIVE_SELECTION) TaxonRelationship taxonRelationship) {
+
+        MultiPageTaxonEditor editor = null;
+        BulkEditor bulkEditor = null;
+
+        ConceptViewPartE4 conceptView = (ConceptViewPartE4) activePart.getObject();
+
+        Object e4WrappedPart = WorkbenchUtility.getE4WrappedPart(conceptView.getSelectionProvidingPart());
+        if(e4WrappedPart instanceof MultiPageTaxonEditor){
+            editor = (MultiPageTaxonEditor) e4WrappedPart;
+        }
+        else if(e4WrappedPart instanceof BulkEditor){
+            bulkEditor = (BulkEditor) e4WrappedPart;
+        }
+        TaxonBase<?> relatedTaxon = null;
+        if(editor!=null){
+            relatedTaxon = getRelatedTaxon(taxonRelationship, editor.getTaxon());
+        }
+        else if(bulkEditor!=null){
+            ISelection bulkSelection = bulkEditor.getSelectionProvider().getSelection();
+            if(bulkSelection instanceof LineSelection){
+                Object firstElement = ((LineSelection)bulkSelection).getFirstElement();
+                if(firstElement instanceof Taxon){
+                    relatedTaxon = getRelatedTaxon(taxonRelationship, (Taxon) firstElement);
+                }
+            }
+        }
+
+		if(relatedTaxon==null){
+		    MessagingUtils.messageDialog(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN, getClass(),
+		            String.format(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE ,relatedTaxon), null);
+		}
+		else{
+		    openConcept(relatedTaxon);
+		}
+	}
+
+    /**
+     * @param relatedTaxon
+     */
+    protected void openConcept(TaxonBase<?> relatedTaxon) {
+        try {
+            EditorUtil.openTaxonBase(relatedTaxon.getUuid());
+        } catch (PartInitException e) {
+            MessagingUtils.messageDialog(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN, getClass(),
+                    String.format(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE ,relatedTaxon), e);
+        }
+    }
+
+	private Taxon getRelatedTaxon(TaxonRelationship relationship, Taxon taxon){
+		if (relationship.getFromTaxon().equals(taxon)){
+			return relationship.getToTaxon();
+		}
+		else if(relationship.getToTaxon().equals(taxon)){
+			return relationship.getFromTaxon();
+		}
+		else{
+			return null;
+		}
+	}
+}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptInBulkEditorHandlerE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptInBulkEditorHandlerE4.java
new file mode 100644
index 000000000..324c9b7f2
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptInBulkEditorHandlerE4.java
@@ -0,0 +1,21 @@
+package eu.etaxonomy.taxeditor.editor.view.concept.e4.handler;
+
+import org.eclipse.ui.PartInitException;
+
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorUtil;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+
+public class OpenRelatedConceptInBulkEditorHandlerE4 extends OpenRelatedConceptHandlerE4{
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void openConcept(TaxonBase<?> relatedTaxon) {
+        try {
+            BulkEditorUtil.openEditor(relatedTaxon);
+        } catch (PartInitException e) {
+            MessagingUtils.error(this.getClass(), "Bulk Editor could not be opened for "+relatedTaxon, e);
+        }
+    }
+}
