public class CompareEditorTester {
private final SWTBotEditor editor;
public static CompareEditorTester forTitleContaining(String title) {
SWTWorkbenchBot bot = new SWTWorkbenchBot();
SWTBotEditor editor = bot.editor(new CompareEditorTitleMatcher(title));
// Ensure that both StyledText widgets are enabled
SWTBotStyledText styledText = editor.toTextEditor().getStyledText();
bot.waitUntil(Conditions.widgetIsEnabled(styledText));
return new CompareEditorTester(editor);
}