use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project linuxtools by eclipse.
the class BaseSWTBotTest method beforeClass.
@BeforeClass
public static void beforeClass() {
bot = new SWTWorkbenchBot();
bot.views().stream().filter(v -> v.getReference().getTitle().equals("Welcome")).forEach(v -> v.close());
bot.perspectiveById("org.eclipse.linuxtools.docker.ui.perspective").activate();
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project eclipse-pmd by acanda.
the class GUITestCase method initSWTBotPreferencesAndOpenJavaPerspective.
@BeforeClass
public static void initSWTBotPreferencesAndOpenJavaPerspective() {
SWTBotPreferences.TIMEOUT = 10000;
final SWTWorkbenchBot workbenchBot = new SWTWorkbenchBot();
closeWelcomeView(workbenchBot);
openJavaPerspective(workbenchBot);
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project xtext-xtend by eclipse.
the class AbstractRefactoringSwtBotTest method initialize.
@BeforeClass
public static void initialize() {
try {
TargetPlatformUtil.setTargetPlatform(AbstractRefactoringSwtBotTest.class);
IResourcesSetupUtil.cleanWorkspace();
SWTWorkbenchBot _sWTWorkbenchBot = new SWTWorkbenchBot();
AbstractRefactoringSwtBotTest.bot = _sWTWorkbenchBot;
UIThreadRunnable.syncExec(new VoidResult() {
@Override
public void run() {
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().forceActive();
}
});
SwtBotProjectHelper.newXtendProject(AbstractRefactoringSwtBotTest.bot, "test");
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project xtext-xtend by eclipse.
the class RenameJavaClassSwtBotTest method renameJavaClass.
@Test
public void renameJavaClass() {
SWTWorkbenchBot _bot = this.getBot();
StringConcatenation _builder = new StringConcatenation();
_builder.append("package test");
_builder.newLine();
_builder.append("class XtendClass extends JavaClass {");
_builder.newLine();
_builder.append("}");
_builder.newLine();
final SWTBotEclipseEditor xtendEditor = SwtBotProjectHelper.newXtendEditor(_bot, "XtendClass", "test", _builder);
SWTWorkbenchBot _bot_1 = this.getBot();
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("package test;");
_builder_1.newLine();
_builder_1.append("public class ?JavaClass? {}");
_builder_1.newLine();
final SWTBotEclipseEditor javaEditor = SwtBotProjectHelper.newJavaEditor(_bot_1, "JavaClass", "test", _builder_1);
this.renameInJavaEditor(javaEditor, "NewJavaClass", "Rename Type");
StringConcatenation _builder_2 = new StringConcatenation();
_builder_2.append("package test");
_builder_2.newLine();
_builder_2.append("class XtendClass extends NewJavaClass {");
_builder_2.newLine();
_builder_2.append("}");
_builder_2.newLine();
this.assertEquals(_builder_2, xtendEditor.getText());
Assert.assertFalse(xtendEditor.isDirty());
StringConcatenation _builder_3 = new StringConcatenation();
_builder_3.append("package test;");
_builder_3.newLine();
_builder_3.append("public class NewJavaClass {}");
_builder_3.newLine();
this.assertEquals(_builder_3, javaEditor.getText());
Assert.assertFalse(javaEditor.isDirty());
this.assertEquals("NewJavaClass.java", javaEditor.getTitle());
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project xtext-xtend by eclipse.
the class RenameXtendClassSwtBotTest method renameXtendClassWithAA.
@Test
public void renameXtendClassWithAA() {
SWTWorkbenchBot _bot = this.getBot();
StringConcatenation _builder = new StringConcatenation();
_builder.append("import org.eclipse.xtend.lib.annotations.Data");
_builder.newLine();
_builder.append("@Data");
_builder.newLine();
_builder.append("class ?Fonk? {}");
_builder.newLine();
final SWTBotEclipseEditor barEditor = SwtBotProjectHelper.newXtendEditor(_bot, "Fonk", _builder);
this.renameInXtendEditor(barEditor, "NewFonk", "Rename Element");
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("import org.eclipse.xtend.lib.annotations.Data");
_builder_1.newLine();
_builder_1.append("@Data");
_builder_1.newLine();
_builder_1.append("class NewFonk {}");
_builder_1.newLine();
this.assertEquals(_builder_1, barEditor.getText());
this.assertEquals("NewFonk.xtend", barEditor.getTitle());
}
Aggregations