Skip to content

Instantly share code, notes, and snippets.

@tremes
Created December 4, 2012 08:27
Show Gist options
  • Save tremes/4201837 to your computer and use it in GitHub Desktop.
Save tremes/4201837 to your computer and use it in GitHub Desktop.
eclipse.openFile(PROJECT_NAME, "WebContent","home.xhtml").toTextEditor();
util.waitForAll();
SWTBotEditorExt editor = SWTTestExt.bot.swtBotEditorExtByTitle("home.xhtml");
ContentAssistBot contentAssist = editor.contentAssist();
int idx = 0;
for (String line : editor.getLines()) {
if (line.contains("#{")) {
editor.selectLine(idx);
editor.insertText("#{namedBean.message}");
String textForSelection = "#{namedBean.message}";
SWTJBTExt.selectTextInSourcePane(SWTTestExt.bot,"home.xhtml", textForSelection, 0,11);
contentAssist.checkContentAssist("namedBean : NamedBean", false);
SWTJBTExt.selectTextInSourcePane(SWTTestExt.bot,"home.xhtml", textForSelection, 12, 9);
contentAssist.checkContentAssist("message : String - NamedBean", false);
break;
}
idx++;
}
editor.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment