private void setupProjectDependency(String projectName) {
bot.menu("Window").menu("Show View").menu("Navigator").click();
SWTBot localBot = bot.viewByTitle("Navigator").bot();
SWTBotTree tree = localBot.tree();
SWTBotTreeItem node = tree.expandNode(projectName + "Test");
node = node.expandNode(".classpath").select();
final SWTBotContextMenu cmenu = new SWTBotContextMenu(tree);
bot.performWithTimeout(new VoidResult() {
@Override
public void run() {
cmenu.click("Open With").click("Text Editor");
}
}, 5000);
Matcher<IEditorReference> withPartName = WithPartName
.withPartName(Matchers.containsString("classpath"));
try {
bot.waitUntil(Conditions.waitForEditor(withPartName));
} catch (TimeoutException toe) {
node.doubleClick();
bot.waitUntil(Conditions.waitForEditor(withPartName));
}
String classpathText = getClassPathText(projectName);