206724: SCM: Always prompt check out elements for a opened configuration when refresh source control status
diff --git a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/MethodElementEditor.java b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/MethodElementEditor.java
index 08ea0c2..3fd3f62 100644
--- a/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/MethodElementEditor.java
+++ b/org.eclipse.epf.authoring.ui/src/org/eclipse/epf/authoring/ui/editors/MethodElementEditor.java
@@ -568,16 +568,25 @@
public boolean doAction(int actionType, EObject object,
org.eclipse.emf.ecore.EStructuralFeature feature,
Object value, int index) {
- IStatus status = TngUtil
+ final IStatus status = TngUtil
.checkEdit(object, getSite().getShell());
if (status.isOK()) {
return super.doAction(actionType, object, feature, value,
index);
} else {
- AuthoringUIPlugin.getDefault().getMsgDialog().displayError(
- AuthoringUIResources.editDialog_title,
- AuthoringUIResources.editDialog_msgCannotEdit,
- status);
+ // this might be called from a non-UI thread
+ // so make sure the message dialog will be shown in a UI thread
+ //
+ SafeUpdateController.syncExec(new Runnable() {
+
+ public void run() {
+ AuthoringUIPlugin.getDefault().getMsgDialog().displayError(
+ AuthoringUIResources.editDialog_title,
+ AuthoringUIResources.editDialog_msgCannotEdit,
+ status);
+ }
+
+ });
return false;
}
}