diff options
author | Jonathan LIGER | 2012-08-20 08:37:24 +0000 |
---|---|---|
committer | Mickael Istria | 2012-08-20 09:21:17 +0000 |
commit | 8042a915d5197604c2e9e84990603c526103940c (patch) | |
tree | dbc59defbbfaaf877bc8ad9f746be9dde95d7f1c | |
parent | 68e86da42008fb428dd4f37ee0544c6a3239d1ea (diff) | |
download | org.eclipse.swtbot-8042a915d5197604c2e9e84990603c526103940c.tar.gz org.eclipse.swtbot-8042a915d5197604c2e9e84990603c526103940c.tar.xz org.eclipse.swtbot-8042a915d5197604c2e9e84990603c526103940c.zip |
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.java | 14 |
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 c740ffff..7a378e30 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$ + } + } + }); + } } |