import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.bindings.keys.IKeyLookup;
+import org.eclipse.jface.bindings.keys.KeyStroke;
+import org.eclipse.jface.bindings.keys.ParseException;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
private static void openRemoteProfilePreferences() {
if (SWTUtils.isMac()) {
// On Mac, the Preferences menu item is under the application name.
- fBot.menu("Eclipse").menu("Preferences").click();
+ // For some reason, we can't access the application menu anymore so
+ // we use the keyboard shortcut.
+ try {
+ fBot.activeShell().pressShortcut(KeyStroke.getInstance(IKeyLookup.COMMAND_NAME + "+"), KeyStroke.getInstance(","));
+ } catch (ParseException e) {
+ fail();
+ }
} else {
fBot.menu("Window").menu("Preferences").click();
}
+ fBot.waitUntil(Conditions.shellIsActive("Preferences"));
+
// The first tree is the preference "categories" on the left side
SWTBotTree tree = fBot.tree(0);
SWTBotTreeItem treeNode = tree.getTreeItem("Tracing");