Bug 347262 - DirectEditingFeature with TYPE_DIALOG type / preparation
diff --git a/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/parts/directedit/GFDirectEditManager.java b/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/parts/directedit/GFDirectEditManager.java
index b43e1c4..daf1717 100644
--- a/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/parts/directedit/GFDirectEditManager.java
+++ b/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/parts/directedit/GFDirectEditManager.java
@@ -251,12 +251,14 @@
 
 				// if auto code completion disabled then open code completion on
 				// CTRL+Space
-				KeyStroke keyStroke = directEditingFeature.isAutoCompletionEnabled() ? null : KeyStroke.getInstance(SWT.CTRL, 32);
+				KeyStroke keyStroke = directEditingFeature.isAutoCompletionEnabled() ? null : KeyStroke.getInstance(
+						SWT.CTRL, 32);
 
-				ContentProposalAdapter contentProposalAdapter = new ContentProposalAdapter(getCellEditor().getControl(),
-						controlContentAdapter, contentProposalProvider, keyStroke, null);
+				ContentProposalAdapter contentProposalAdapter = new ContentProposalAdapter(
+						getCellEditor().getControl(), controlContentAdapter, contentProposalProvider, keyStroke, null);
 				contentProposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
-				contentProposalAdapter.addContentProposalListener(new ContentProposalListener((TextCellEditor) getCellEditor()));
+				contentProposalAdapter.addContentProposalListener(new ContentProposalListener(
+						(TextCellEditor) getCellEditor()));
 
 				// <sw03072008> removed to avoid direct closing of cell editor
 				// after value selection from value help
@@ -283,7 +285,8 @@
 		// Hook the cell editor's copy/paste actions to the actionBars so that
 		// they can
 		// be invoked via keyboard shortcuts.
-		actionBars = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getEditorSite().getActionBars();
+		actionBars = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()
+				.getEditorSite().getActionBars();
 		saveCurrentActions(actionBars);
 		actionHandler = new CellEditorActionHandler(actionBars);
 		actionHandler.addCellEditor(getCellEditor());
diff --git a/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/parts/directedit/TextCellLocator.java b/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/parts/directedit/TextCellLocator.java
index 907829b..5018f95 100644
--- a/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/parts/directedit/TextCellLocator.java
+++ b/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/parts/directedit/TextCellLocator.java
@@ -120,14 +120,14 @@
 			if (rect.width > minWidth) {
 				minWidth = rect.width;
 			}
-			
+
 			if (directEditingFeature.stretchFieldToFitText()) {
 				CCombo combo = (CCombo) control;
 				Point pref = combo.computeSize(-1, -1);
-				if (minWidth < pref.x) 
+				if (minWidth < pref.x)
 					minWidth = pref.x;
-			}			
-			
+			}
+
 			control.setBounds(rect.x, rect.y, minWidth, 14);
 		}
 	}
diff --git a/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/policy/DefaultDirectEditPolicy.java b/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/policy/DefaultDirectEditPolicy.java
index d8e1c8a..d7a0275 100644
--- a/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/policy/DefaultDirectEditPolicy.java
+++ b/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/policy/DefaultDirectEditPolicy.java
@@ -77,7 +77,8 @@
 		CellEditor cellEditor = request.getCellEditor();
 		final String message = cellEditor.getErrorMessage();
 		if (message != null && message.length() != 0) {
-			MessageDialog.openError(GraphitiUiInternal.getWorkbenchService().getShell(), Messages.DefaultDirectEditPolicy_0_xmsg, message);
+			MessageDialog.openError(GraphitiUiInternal.getWorkbenchService().getShell(),
+					Messages.DefaultDirectEditPolicy_0_xmsg, message);
 			return null;
 		}
 
@@ -108,7 +109,8 @@
 				if (directEditHolder.isSimpleMode()) {
 					value = directEditingFeature.getPossibleValues(directEditingContext)[index];
 				} else {
-					acceptedProposal = directEditingFeature.getProposalSupport().getPossibleValues(directEditingContext)[index];
+					acceptedProposal = directEditingFeature.getProposalSupport()
+							.getPossibleValues(directEditingContext)[index];
 				}
 			}
 
@@ -118,10 +120,12 @@
 			return null;
 		}
 
-		final ICommand cmd = new DirectEditingFeatureCommandWithContext(directEditingFeature, directEditingContext, value, acceptedProposal);
+		final ICommand cmd = new DirectEditingFeatureCommandWithContext(directEditingFeature, directEditingContext,
+				value, acceptedProposal);
 
 		final IFeatureProvider fp = directEditingFeature.getFeatureProvider();
-		final DiagramEditorInternal diagramEditor = (DiagramEditorInternal) fp.getDiagramTypeProvider().getDiagramEditor();
+		final DiagramEditorInternal diagramEditor = (DiagramEditorInternal) fp.getDiagramTypeProvider()
+				.getDiagramEditor();
 		final CommandStack commandStack = diagramEditor.getEditDomain().getCommandStack();
 		commandStack.execute(new GefCommandWrapper(cmd, diagramEditor.getEditingDomain()));
 		// CommandExec.getSingleton().executeCommand(cmd, fp.getConnection());