use of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree in project linuxtools by eclipse.
the class AbstractSWTBotTest method compareWithEachOther.
/**
* Compare The selected items in PROJ_NAME with each other
* @param The name of a tree item to select
* @param The name of a second tree item to select
*/
public void compareWithEachOther(String first, String second) {
SWTWorkbenchBot bot = new SWTWorkbenchBot();
enterProjectFolder(bot);
// Refresh and Select
SWTBotTree treeBot = projectExplorer.bot().tree();
treeBot.contextMenu("Refresh").click();
treeBot.select(new String[] { first, second });
// Workaround for context menu on multiple selections
click(ContextMenuHelper.contextMenu(treeBot, "Compare With", "Each Other"));
exitProjectFolder(bot);
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree in project linuxtools by eclipse.
the class AbstractSWTBotTest method runPerfViewTestActions.
private void runPerfViewTestActions(SWTWorkbenchBot bot) throws Exception {
projectExplorer.bot().tree().select(PROJ_NAME);
final Shell shellWidget = bot.activeShell().widget;
// Open profiling configurations dialog
UIThreadRunnable.asyncExec(() -> {
DebugUITools.openLaunchConfigurationDialogOnGroup(shellWidget, (StructuredSelection) PlatformUI.getWorkbench().getWorkbenchWindows()[0].getSelectionService().getSelection(), "org.eclipse.debug.ui.launchGroup.profilee");
});
bot.shell("Profiling Tools Configurations").activate();
// Create new Perf configuration
SWTBotTree profilingConfigs = bot.tree();
SWTBotTree perfNode = profilingConfigs.select("Profile with Perf");
perfNode.contextMenu("New").click();
// Activate options tab
bot.cTabItem("Perf Options").activate();
setPerfOptions(bot);
bot.button("Apply").click();
if (PerfCore.checkPerfInPath(null)) {
bot.button("Profile").click();
} else {
bot.button("Close").click();
openStubView();
}
testPerfView();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree in project eclipse-pmd by acanda.
the class JavaProjectClient method createJavaProject.
/**
* Creates a Java project with the provided name.
*
* @param name The name of the Java project.
*/
public static void createJavaProject(final String name) {
final SWTWorkbenchBot bot = new SWTWorkbenchBot();
bot.menu("File").menu("New").menu("Project...").click();
final SWTBotShell dialog = bot.shell("New Project");
final SWTBot newProjectDialogBot = dialog.bot();
final SWTBotTree projectTree = newProjectDialogBot.tree();
projectTree.expandNode("Java", "Java Project").select();
newProjectDialogBot.button("Next >").click();
newProjectDialogBot.textWithLabel("Project name:").setText(name);
newProjectDialogBot.button("Finish").click();
bot.waitUntil(Conditions.shellCloses(dialog));
}
Aggregations