summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorJonathan LIGER2012-08-20 04:37:24 (EDT)
committer Mickael Istria2012-08-20 05:21:17 (EDT)
commit8042a915d5197604c2e9e84990603c526103940c (patch)
treedbc59defbbfaaf877bc8ad9f746be9dde95d7f1c
parent68e86da42008fb428dd4f37ee0544c6a3239d1ea (diff)
downloadorg.eclipse.swtbot-8042a915d5197604c2e9e84990603c526103940c.zip
org.eclipse.swtbot-8042a915d5197604c2e9e84990603c526103940c.tar.gz
org.eclipse.swtbot-8042a915d5197604c2e9e84990603c526103940c.tar.bz2
FIXED Bug 387467 SWTBotView.show() does not support secondary Id
+Fixed imports Signed-off-by: Mickael Istria <mistria@redhat.com>
-rwxr-xr-x[-rw-r--r--]org.eclipse.swtbot.eclipse.finder/src/org/eclipse/swtbot/eclipse/finder/widgets/SWTBotView.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/org.eclipse.swtbot.eclipse.finder/src/org/eclipse/swtbot/eclipse/finder/widgets/SWTBotView.java b/org.eclipse.swtbot.eclipse.finder/src/org/eclipse/swtbot/eclipse/finder/widgets/SWTBotView.java
index c740fff..7a378e3 100644..100755
--- a/org.eclipse.swtbot.eclipse.finder/src/org/eclipse/swtbot/eclipse/finder/widgets/SWTBotView.java
+++ b/org.eclipse.swtbot.eclipse.finder/src/org/eclipse/swtbot/eclipse/finder/widgets/SWTBotView.java
@@ -138,4 +138,18 @@ public class SWTBotView extends SWTBotWorkbenchPart<IViewReference> {
throw new WidgetNotFoundException("Could not find view menu with label " + label + " at index " + index, e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
+
+ @Override
+ public void show() {
+ UIThreadRunnable.syncExec(new VoidResult() {
+ public void run() {
+ try {
+ partReference.getPage().activate(partReference.getPart(true));
+ partReference.getPage().showView(partReference.getId(), partReference.getSecondaryId(), IWorkbenchPage.VIEW_ACTIVATE);
+ } catch (PartInitException e) {
+ throw new RuntimeException("Could not show partReference - " + partReference.getPartName(), e); //$NON-NLS-1$
+ }
+ }
+ });
+ }
}