use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project linuxtools by eclipse.
the class AbstractSWTBotTest method runPerfViewTest.
@Test
public void runPerfViewTest() throws Exception {
SWTWorkbenchBot bot = new SWTWorkbenchBot();
/*
* - Method returns when the build is complete -
* AbstractTest#createProjectAndBuild builds a single executable binary
* under "Binaries".
*/
proj = createProjectAndBuild(FrameworkUtil.getBundle(this.getClass()), PROJ_NAME);
try {
runPerfViewTestActions(bot);
} catch (Exception e) {
throw e;
} finally {
deleteProject(proj);
}
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project linuxtools by eclipse.
the class AbstractStyledTextViewTest method testPerfView.
@Override
protected void testPerfView() {
SWTWorkbenchBot bot = new SWTWorkbenchBot();
Matcher<IViewReference> withPartName = withPartName(getViewId());
SWTBotView view = bot.view(withPartName);
assertNotNull(view);
view.setFocus();
SWTBotStyledText text = bot.styledText();
assertNotNull(text);
assertEquals(getExpectedText(), text.getText());
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot 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));
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project eclipse-pmd by acanda.
the class JavaProjectClient method deleteJavaProject.
/**
* Deletes the project with the provided name.
*
* @param name The name of the project.
*/
public static void deleteJavaProject(final String name) {
final SWTWorkbenchBot bot = new SWTWorkbenchBot();
bot.viewById("org.eclipse.jdt.ui.PackageExplorer").bot().tree().getTreeItem(name).contextMenu("Delete").click();
final SWTBotShell dialog = bot.shell("Delete Resources");
final SWTBot dialogBot = dialog.bot();
dialogBot.checkBox().select();
dialogBot.button("OK").click();
bot.waitUntil(Conditions.shellCloses(dialog));
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project eclipse-pmd by acanda.
the class JavaProjectClient method openPMDPropertyDialog.
/**
* Opens the PMD property dialog of the project with the provided name.
*
* @param name The name of the project.
* @return A bot for the open PMD property dialog.
*/
public static PMDPropertyDialogBot openPMDPropertyDialog(final String name) {
final SWTWorkbenchBot bot = new SWTWorkbenchBot();
bot.viewById("org.eclipse.jdt.ui.PackageExplorer").bot().tree().getTreeItem(name).select();
bot.menu("File").menu("Properties").click();
final PMDPropertyDialogBot dialog = new PMDPropertyDialogBot(bot.shell("Properties for " + name).widget);
dialog.bot().tree().getTreeItem("PMD").select();
return dialog;
}
Aggregations