summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetya Sabeva2013-05-27 03:00:03 (EDT)
committerPetya Sabeva2013-05-27 03:00:03 (EDT)
commit1f567bc4422fd6f98806222419875363968d6790 (patch)
tree74491dbcffef8e0838cec896dcbbf810e830bc2f
parent121a58a84f4c5d0a3b791e283ca3f4a7d00bd70e (diff)
downloadwebtools.dali-1f567bc4422fd6f98806222419875363968d6790.zip
webtools.dali-1f567bc4422fd6f98806222419875363968d6790.tar.gz
webtools.dali-1f567bc4422fd6f98806222419875363968d6790.tar.bz2
Bug 409090 - Deadlock during rename of entityv201305280322
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/GraphicsUpdater.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/GraphicsUpdater.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/GraphicsUpdater.java
index a24442d..6fab07e 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/GraphicsUpdater.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/GraphicsUpdater.java
@@ -27,6 +27,7 @@ import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.util.JPAEditorConstants.ShapeType;
+import org.eclipse.swt.widgets.Display;
public class GraphicsUpdater {
@@ -169,17 +170,22 @@ public class GraphicsUpdater {
final Text txt = getHeaderText(entityShape);
if (txt == null)
return;
- //if (!JPAEditorUtil.areHeadersEqual(txt.getValue(), newHeader)) {
+// if (!JPAEditorUtil.areHeadersEqual(txt.getValue(), newHeader)) {
if (!txt.getValue().equals(newHeader)) {
- TransactionalEditingDomain ted = TransactionUtil.getEditingDomain(txt);
- RecordingCommand rc = new RecordingCommand(ted) {
+ final TransactionalEditingDomain ted = TransactionUtil.getEditingDomain(txt);
+ final RecordingCommand rc = new RecordingCommand(ted) {
@Override
protected void doExecute() {
txt.setValue(newHeader);
}
- };
- ted.getCommandStack().execute(rc);
+ };
+
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ ted.getCommandStack().execute(rc);
+ }
+ });
}
}