Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2012-05-21 14:38:41 +0000
committerMarkus Tiede2012-05-21 14:38:41 +0000
commit4e744ddcfed5991e55734930aceb6385c77d642c (patch)
treec544da4a99b2d7dedc2758e5470cff145c15f084
parentb742cfc7d55e00e68d8c5f9fa6ef358f06fc7811 (diff)
downloadorg.eclipse.jubula.core-4e744ddcfed5991e55734930aceb6385c77d642c.tar.gz
org.eclipse.jubula.core-4e744ddcfed5991e55734930aceb6385c77d642c.tar.xz
org.eclipse.jubula.core-4e744ddcfed5991e55734930aceb6385c77d642c.zip
Fix for issue 380133 and 380129.
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/Plugin.java12
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/AbstractShowSpecificationHandler.java2
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/search/result/BasicSearchResult.java2
3 files changed, 16 insertions, 0 deletions
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/Plugin.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/Plugin.java
index 2ac04426e..bde33d9f4 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/Plugin.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/Plugin.java
@@ -610,6 +610,18 @@ public class Plugin extends AbstractUIPlugin implements IProgressConsole {
}
return null;
}
+
+ /**
+ * activates the given workbench part if an active page is available
+ *
+ * @param part
+ * the part to activate
+ */
+ public static void activate(IWorkbenchPart part) {
+ if (getActivePage() != null) {
+ getActivePage().activate(part);
+ }
+ }
/**
* @return Returns the connectionStatusIcon.
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/AbstractShowSpecificationHandler.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/AbstractShowSpecificationHandler.java
index 3cc3e2d5c..42feae209 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/AbstractShowSpecificationHandler.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/AbstractShowSpecificationHandler.java
@@ -13,6 +13,7 @@ package org.eclipse.jubula.client.ui.rcp.handlers;
import org.eclipse.jubula.client.core.model.INodePO;
import org.eclipse.jubula.client.ui.constants.Constants;
import org.eclipse.jubula.client.ui.handlers.AbstractSelectionBasedHandler;
+import org.eclipse.jubula.client.ui.rcp.Plugin;
import org.eclipse.jubula.client.ui.rcp.businessprocess.UINodeBP;
import org.eclipse.jubula.client.ui.rcp.utils.Utils;
import org.eclipse.jubula.client.ui.rcp.views.AbstractJBTreeView;
@@ -50,6 +51,7 @@ public abstract class AbstractShowSpecificationHandler
}
if (viewPart instanceof AbstractJBTreeView) {
AbstractJBTreeView jbtv = (AbstractJBTreeView)viewPart;
+ Plugin.activate(jbtv);
UINodeBP.selectNodeInTree(node.getId(), jbtv.getTreeViewer(),
jbtv.getEntityManager());
}
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/search/result/BasicSearchResult.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/search/result/BasicSearchResult.java
index 8cd96f204..4686fe424 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/search/result/BasicSearchResult.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/search/result/BasicSearchResult.java
@@ -424,6 +424,8 @@ public class BasicSearchResult implements ISearchResult {
if (jbtv == null) {
jbtv = (AbstractJBTreeView) Plugin
.showView(Constants.TC_BROWSER_ID);
+ } else {
+ Plugin.activate(jbtv);
}
TreeViewer tv = jbtv.getTreeViewer();
EntityManager em = jbtv.getEntityManager();

Back to the top