diff options
author | Alexander Kurtakov | 2016-01-25 13:45:04 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2016-01-25 14:14:55 +0000 |
commit | 518cad290c7adf017237c8e5e6be9b5630ead334 (patch) | |
tree | d7213098ff5410e05108def089d4973fe83e625e /changelog | |
parent | b0efd3ebae29de16550afd293a8a19930eaa8c40 (diff) | |
download | org.eclipse.linuxtools-518cad290c7adf017237c8e5e6be9b5630ead334.tar.gz org.eclipse.linuxtools-518cad290c7adf017237c8e5e6be9b5630ead334.tar.xz org.eclipse.linuxtools-518cad290c7adf017237c8e5e6be9b5630ead334.zip |
Slim down tests helpers.
A lot of weight carried there for no use. Better to drop and look for
proper and better organized helpers when needed.
Change-Id: I803227b8afa120da9599075d95f51ecee0fcdf96
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/65099
Tested-by: Hudson CI
Diffstat (limited to 'changelog')
-rw-r--r-- | changelog/org.eclipse.linuxtools.changelog.ui.tests/src/org/eclipse/linuxtools/changelog/ui/tests/utils/ContextMenuHelper.java | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/changelog/org.eclipse.linuxtools.changelog.ui.tests/src/org/eclipse/linuxtools/changelog/ui/tests/utils/ContextMenuHelper.java b/changelog/org.eclipse.linuxtools.changelog.ui.tests/src/org/eclipse/linuxtools/changelog/ui/tests/utils/ContextMenuHelper.java index ee6c85204d..d9a2336dbd 100644 --- a/changelog/org.eclipse.linuxtools.changelog.ui.tests/src/org/eclipse/linuxtools/changelog/ui/tests/utils/ContextMenuHelper.java +++ b/changelog/org.eclipse.linuxtools.changelog.ui.tests/src/org/eclipse/linuxtools/changelog/ui/tests/utils/ContextMenuHelper.java @@ -17,7 +17,6 @@ import static org.hamcrest.core.AllOf.allOf; import static org.hamcrest.core.IsInstanceOf.instanceOf; import java.util.Arrays; -import java.util.concurrent.atomic.AtomicBoolean; import org.eclipse.swt.SWT; import org.eclipse.swt.SWTException; @@ -95,42 +94,6 @@ public class ContextMenuHelper { return theItem; } - /** - * Checks if the context menu matching the text is enabled - * - * @param bot - * - * @param texts - * the text on the context menu. - * @return true if the context menu is enabled - * @throws WidgetNotFoundException - * if the widget is not found. - */ - public static boolean isContextMenuItemEnabled(final AbstractSWTBot<?> bot, - final String... texts) { - - final AtomicBoolean enabled = new AtomicBoolean(false); - // show - final MenuItem menuItem = UIThreadRunnable - .syncExec((WidgetResult<MenuItem>) () -> { - MenuItem theItem = getMenuItem(bot, texts); - if (theItem != null && theItem.isEnabled()) - enabled.set(true); - return theItem; - }); - if (menuItem == null) { - throw new WidgetNotFoundException("Could not find menu: " - + Arrays.asList(texts)); - } - // hide - UIThreadRunnable.syncExec(() -> { - if (menuItem.isDisposed()) - return; // menu already gone - hide(menuItem.getParent()); - }); - return enabled.get(); - } - private static MenuItem show(final Menu menu, final Matcher<MenuItem> matcher) { if (menu != null) { menu.notifyListeners(SWT.Show, new Event()); |