Bug 347262 - DirectEditingFeature with TYPE_DIALOG type /
direct editing type TYPE_DIALOG renamed to TYPE_CUSTOM
diff --git a/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/parts/ShapeEditPart.java b/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/parts/ShapeEditPart.java
index 49509fb..e7c0508 100644
--- a/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/parts/ShapeEditPart.java
+++ b/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/parts/ShapeEditPart.java
@@ -1,7 +1,7 @@
/*******************************************************************************
* <copyright>
*
- * Copyright (c) 2005, 2010 SAP AG.
+ * Copyright (c) 2005, 2011 SAP AG.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
* SAP AG - initial API, implementation and documentation
* mwenz - Bug 327756 - Cancelled double click feature marked editor dirty
* Bug 336488 - DiagramEditor API
+ * mgorning - Bug 347262 - DirectEditingFeature with TYPE_DIALOG type
*
* </copyright>
*
@@ -694,7 +695,7 @@
case IDirectEditing.TYPE_COLOR:
uiElementClass = ColorCellEditor.class;
break;
- case IDirectEditing.TYPE_DIALOG:
+ case IDirectEditing.TYPE_CUSTOM:
uiElementClass = DialogCellEditor.class;
break;
default:
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 fd339c7..67f2f84 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
@@ -153,7 +153,7 @@
ret = new ComboBoxCellEditor(composite, possibleValues);
// return new ComboBoxCellEditorFixed(composite, possibleValues,
// SWT.NONE);
- } else if (editingType == IDirectEditing.TYPE_DIALOG) {
+ } else if (editingType == IDirectEditing.TYPE_CUSTOM) {
if (directEditingFeature instanceof ICellEditorProvider) {
ret = ((ICellEditorProvider) directEditingFeature).createCellEditor(composite);
} else {
@@ -163,7 +163,7 @@
ret = super.createCellEditorOn(composite);
}
- if (editingType != IDirectEditing.TYPE_DIALOG) {
+ if (editingType != IDirectEditing.TYPE_CUSTOM) {
ret.setValidator(new GFCellEditorValidator(this, ret));
}
@@ -281,7 +281,7 @@
// });
// </sw03072008>
}
- } else if (directEditingFeature.getEditingType() == IDirectEditing.TYPE_DIALOG) {
+ } else if (directEditingFeature.getEditingType() == IDirectEditing.TYPE_CUSTOM) {
setDirty(true);
getCellEditor().setValue(initialValue);
}
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 1b112b1..506a262 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
@@ -131,7 +131,7 @@
}
control.setBounds(rect.x, rect.y, minWidth, 14);
- } else if (directEditingFeature.getEditingType() == IDirectEditing.TYPE_DIALOG
+ } else if (directEditingFeature.getEditingType() == IDirectEditing.TYPE_CUSTOM
&& (directEditingFeature instanceof ICellEditorProvider)) {
ICellEditorProvider cep = (ICellEditorProvider) directEditingFeature;
cep.relocate(celleditor, figure);
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 f4a5269..560b20e 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
@@ -117,7 +117,7 @@
}
}
- } else if (directEditingFeature.getEditingType() == IDirectEditing.TYPE_DIALOG) {
+ } else if (directEditingFeature.getEditingType() == IDirectEditing.TYPE_CUSTOM) {
Object cellEditorValue = cellEditor.getValue();
if (cellEditorValue instanceof String) {
value = (String) cellEditorValue;
diff --git a/plugins/org.eclipse.graphiti/.settings/.api_filters b/plugins/org.eclipse.graphiti/.settings/.api_filters
index 769dab2..b3d7d92 100644
--- a/plugins/org.eclipse.graphiti/.settings/.api_filters
+++ b/plugins/org.eclipse.graphiti/.settings/.api_filters
@@ -91,6 +91,14 @@
</message_arguments>
</filter>
</resource>
+ <resource path="src/org/eclipse/graphiti/func/IDirectEditing.java" type="org.eclipse.graphiti.func.IDirectEditing">
+ <filter id="405864542">
+ <message_arguments>
+ <message_argument value="org.eclipse.graphiti.func.IDirectEditing"/>
+ <message_argument value="TYPE_DIALOG"/>
+ </message_arguments>
+ </filter>
+ </resource>
<resource path="src/org/eclipse/graphiti/platform/IDiagramEditor.java" type="org.eclipse.graphiti.platform.IDiagramEditor">
<filter id="405901410">
<message_arguments>
diff --git a/plugins/org.eclipse.graphiti/src/org/eclipse/graphiti/func/IDirectEditing.java b/plugins/org.eclipse.graphiti/src/org/eclipse/graphiti/func/IDirectEditing.java
index 147d2b0..1224e9c 100644
--- a/plugins/org.eclipse.graphiti/src/org/eclipse/graphiti/func/IDirectEditing.java
+++ b/plugins/org.eclipse.graphiti/src/org/eclipse/graphiti/func/IDirectEditing.java
@@ -1,7 +1,7 @@
/*******************************************************************************
* <copyright>
*
- * Copyright (c) 2005, 2010 SAP AG.
+ * Copyright (c) 2005, 2011 SAP AG.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
* Contributors:
* SAP AG - initial API, implementation and documentation
* Volker Wegert - Bug 332363 - Direct Editing: enable automatic resizing for combo boxes
+ * mgorning - Bug 347262 - DirectEditingFeature with TYPE_DIALOG type
*
* </copyright>
*
@@ -64,8 +65,10 @@
/**
* dialog is wanted for editing.
+ *
+ * @since 0.9
*/
- static final int TYPE_DIALOG = 9;
+ static final int TYPE_CUSTOM = 9;
/**
* Framework calls this method to decide which UI to show up.