use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project liferay-ide by liferay.
the class Tree method contextMenu.
public void contextMenu(String menu, String... items) {
SWTBotTreeItem item = null;
int timeout = 10 * 1000;
long current = System.currentTimeMillis();
while (true) {
if (System.currentTimeMillis() > (current + timeout)) {
break;
}
sleep();
try {
if (items.length > 1) {
item = getWidget().expandNode(items);
} else {
item = getWidget().getTreeItem(items[0]);
}
} catch (Exception e) {
}
}
Assert.assertNotNull("Could not find " + items[items.length - 1] + " after " + timeout, item);
SWTBotMenu botMenu = item.contextMenu(menu);
botMenu.click();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project liferay-ide by liferay.
the class AbstractWidget method contextMenu.
public void contextMenu(String menu) {
SWTBotMenu botMenu = getWidget().contextMenu(menu);
botMenu.click();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project translationstudio8 by heartsome.
the class ProjectTreeItem method ctxMenuReverseConvertFile.
/**
* 转换当前项目中的一个 XLIFF 为源格式
* @param xlfFileName
* 要转换为源格式的 XLIFF 文件名称
*/
public void ctxMenuReverseConvertFile(String xlfFileName) {
selectFile("XLIFF", xlfFileName);
SWTBotMenu reverseConvertFile = ptv.ctxMenuConvertXliffFile2Tgt();
reverseConvertFile.isEnabled();
reverseConvertFile.click();
// TODO:确认转换对话框正确打开
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project translationstudio8 by heartsome.
the class ProjectTreeItem method ctxMenuOpenProjectFiles.
/**
* 合并打开当前项目中的所有 XLIFF
*/
public void ctxMenuOpenProjectFiles() {
ptn.select();
SWTBotMenu openProjectFiles = ptv.ctxMenuOpenProjectFiles();
// 确认右键菜单中的打开项目功能可用
openProjectFiles.isEnabled();
// 点击该菜单项
openProjectFiles.click();
// 确认文件被成功打开
SWTBotEditor editor = HSBot.bot().editorByTitle(prjName);
HSBot.bot().waitUntil(new IsEditorOpened(editor));
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu in project translationstudio8 by heartsome.
the class ProjectTreeItem method ctxMenuConvertFile.
/**
* 转换当前项目中的一个源文件为 XLIFF
* @param srcFileName
* 要转换的源文件名称
*/
public void ctxMenuConvertFile(String srcFileName) {
selectFile("Source", srcFileName);
SWTBotMenu convertFiles = ptv.ctxMenuConvertSrcFile2Xliff();
convertFiles.isEnabled();
convertFiles.click();
// TODO:确认转换对话框正确打开
}
Aggregations