| author | Radhakrishna Bhat | 2012-07-20 07:16:22 (EDT) |
|---|---|---|
| committer | Mickael Istria | 2012-07-20 09:05:36 (EDT) |
| commit | 72169e521f84f9216530f3875f2f2395ffff4aae (patch) (side-by-side diff) | |
| tree | 7408148a79eab1508077ae2c49d0cf6af05a22f4 | |
| parent | 868b4309a90ac6d2691dec2e06dea273ae9a732f (diff) | |
| download | org.eclipse.swtbot-72169e521f84f9216530f3875f2f2395ffff4aae.zip org.eclipse.swtbot-72169e521f84f9216530f3875f2f2395ffff4aae.tar.gz org.eclipse.swtbot-72169e521f84f9216530f3875f2f2395ffff4aae.tar.bz2 | |
Get the shell which has content assist table
| -rw-r--r-- | org.eclipse.swtbot.eclipse.finder/src/org/eclipse/swtbot/eclipse/finder/widgets/SWTBotEclipseEditor.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/org.eclipse.swtbot.eclipse.finder/src/org/eclipse/swtbot/eclipse/finder/widgets/SWTBotEclipseEditor.java b/org.eclipse.swtbot.eclipse.finder/src/org/eclipse/swtbot/eclipse/finder/widgets/SWTBotEclipseEditor.java index 1ee569a..014a19d 100644 --- a/org.eclipse.swtbot.eclipse.finder/src/org/eclipse/swtbot/eclipse/finder/widgets/SWTBotEclipseEditor.java +++ b/org.eclipse.swtbot.eclipse.finder/src/org/eclipse/swtbot/eclipse/finder/widgets/SWTBotEclipseEditor.java @@ -700,7 +700,24 @@ public class SWTBotEclipseEditor extends SWTBotEditor { return styledText.widget.getShell(); } }); - SWTBotShell shell = bot.shell("", mainWindow); //$NON-NLS-1$ + + final List<Shell> shells = bot.shells("", mainWindow); + Shell widgetShell = syncExec(new WidgetResult<Shell>() { + public Shell run() { + for(int j=0; j<shells.size(); j++) { + Shell s = shells.get(j); + Control[] children = s.getChildren(); + for (int i = 0; i < children.length; i++) { + //Select shell which has content assist table + if(children[i] instanceof Table) { + return s; + } + } + } + return shells.get(0); + } + }); + SWTBotShell shell = new SWTBotShell(widgetShell); shell.activate(); log.debug("Activated quickfix shell."); //$NON-NLS-1$ return shell; |

