Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2016-04-09 09:21:15 +0000
committerJuergen Haug2016-04-09 09:29:22 +0000
commit0fc5a43abb3f4d7e94330bf3ac0d632f68ae279d (patch)
treead20247f5f5757ec3d02ed92ddcd24bb1b06c698 /plugins/org.eclipse.etrice.ui.common.base
parent01960481541062204fcc0d286b9e9dcd4b2e0973 (diff)
downloadorg.eclipse.etrice-0fc5a43abb3f4d7e94330bf3ac0d632f68ae279d.tar.gz
org.eclipse.etrice-0fc5a43abb3f4d7e94330bf3ac0d632f68ae279d.tar.xz
org.eclipse.etrice-0fc5a43abb3f4d7e94330bf3ac0d632f68ae279d.zip
Bug 491368 [diagram] fixed deadlock when showing help in dirty diagram
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.common.base')
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/HelpFeature.java21
1 files changed, 17 insertions, 4 deletions
diff --git a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/HelpFeature.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/HelpFeature.java
index 02918d8e8..6338b22d2 100644
--- a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/HelpFeature.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/support/HelpFeature.java
@@ -4,14 +4,17 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* CONTRIBUTORS:
* Juergen Haug (initial contribution)
- *
+ *
*******************************************************************************/
package org.eclipse.etrice.ui.common.base.support;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.etrice.doc.ContextHelpProvider;
import org.eclipse.etrice.ui.common.base.BaseImageProvider;
@@ -19,6 +22,7 @@ import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICustomContext;
import org.eclipse.graphiti.features.custom.AbstractCustomFeature;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.ui.progress.UIJob;
public class HelpFeature extends AbstractCustomFeature {
@@ -59,8 +63,17 @@ public class HelpFeature extends AbstractCustomFeature {
}
@Override
- public void execute(ICustomContext context) {
- ContextHelpProvider.showHelp(getBoClassName(((ICustomContext) context).getPictogramElements()[0]));
+ public void execute(final ICustomContext context) {
+ UIJob job = new UIJob("Show Context Help"){
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ ContextHelpProvider.showHelp(getBoClassName(((ICustomContext) context).getPictogramElements()[0]));
+ return Status.OK_STATUS;
+ }
+
+ };
+ job.schedule();
}
@Override

Back to the top