Bug 430660 - unable to edit keys in application editor

Change-Id: I9babd958d11c1aff0450975581ff935b85bd3ce0
Signed-off-by: Steven Spungin <steven@spungin.tv>
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java
index b97204d..969e181 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java
@@ -8,6 +8,7 @@
  * Contributors:
  *     Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
  *     Dirk Fauth <dirk.fauth@googlemail.com> - Bug 426986
+ *     Steven Spungin <steven@spungin.tv> - Bug 430660
  ******************************************************************************/
 package org.eclipse.e4.tools.emf.ui.internal.common.component;
 
@@ -209,6 +210,35 @@
 			}
 		});
 
+		final TextCellEditor keyEditor = new TextCellEditor(tableviewer.getTable());
+		column.setEditingSupport(new EditingSupport(tableviewer) {
+
+			@Override
+			protected void setValue(Object element, Object value) {
+				Command cmd = SetCommand.create(editor.getEditingDomain(), element, ApplicationPackageImpl.Literals.STRING_TO_STRING_MAP__KEY, value.toString().trim().length() == 0 ? null : value.toString());
+				if (cmd.canExecute()) {
+					editor.getEditingDomain().getCommandStack().execute(cmd);
+					tableviewer.refresh();
+				}
+			}
+
+			@Override
+			protected Object getValue(Object element) {
+				Entry<String, String> entry = (Entry<String, String>) element;
+				return entry.getKey();
+			}
+
+			@Override
+			protected CellEditor getCellEditor(Object element) {
+				return keyEditor;
+			}
+
+			@Override
+			protected boolean canEdit(Object element) {
+				return true;
+			}
+		});
+
 		// FIXME How can we react upon changes in the Map-Value?
 		column = new TableViewerColumn(tableviewer, SWT.NONE);
 		column.getColumn().setText(Messages.ControlFactory_Value);