• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SWTBotTable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.swtbot.swt.finder.widgets.SWTBotTable的典型用法代码示例。如果您正苦于以下问题:Java SWTBotTable类的具体用法?Java SWTBotTable怎么用?Java SWTBotTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SWTBotTable类属于org.eclipse.swtbot.swt.finder.widgets包,在下文中一共展示了SWTBotTable类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: updateKeyCustomProperty

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
public void updateKeyCustomProperty(SWTBotGefEditPart part, String key, String newkey) {
	GraphElement element = selectPart(part);
	selectTab(part, CUSTOM);
	SWTBotTable table = botView.bot().tableWithId(CustomProperties.PROJECT_PROPERTY_PAGE_WIDGET_ID, CustomProperties.CUSTOM_PROPERTY_LIST_WITH_BUTTON);
	 
	 
	bot.waitUntil(new DefaultCondition() {
		@Override
		public boolean test() throws Exception {
			int row = table.indexOf(key, "PROPERTY");
			if (row == -1) return true;
			table.click(row, 0);
		    bot.sleep(1000);
		    bot.text(key, 0).setText(newkey);
		    bot.text(KeyStroke.getInstance(SWT.TAB)+"" , 0);
		    return false;
		}
		@Override
		public String getFailureMessage() {
			return "key not set";
		}
	},2 * 60 * 1000);		
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:24,代码来源:GraphElementProperties.java


示例2: updateValueCustomProperty

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
public void updateValueCustomProperty(SWTBotGefEditPart part, String key, String oldvalue, String newValue) {
	GraphElement element = selectPart(part);
	selectTab(part, CUSTOM);
	SWTBotTable table = botView.bot().tableWithId(CustomProperties.PROJECT_PROPERTY_PAGE_WIDGET_ID, CustomProperties.CUSTOM_PROPERTY_LIST_WITH_BUTTON);
	 
	 
	bot.waitUntil(new DefaultCondition() {
		@Override
		public boolean test() throws Exception {
			int row = table.indexOf(oldvalue, "VALUE");
			if (row == -1) return true;
			table.click(row, 1);
		    bot.sleep(1000);
		    bot.text(oldvalue, 0).setText(newValue);
		    bot.text(KeyStroke.getInstance(SWT.TAB)+"" , 0);
		    return false;
		}
		@Override
		public String getFailureMessage() {
			return "value not set";
		}
	},2 * 60 * 1000);		
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:24,代码来源:GraphElementProperties.java


示例3: deleteCustomProperty

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
public void deleteCustomProperty(SWTBotGefEditPart part, String key) {
	GraphElement element = selectPart(part);
	selectTab(part, CUSTOM);
	SWTBotTable table = botView.bot().tableWithId(CustomProperties.PROJECT_PROPERTY_PAGE_WIDGET_ID, CustomProperties.CUSTOM_PROPERTY_LIST_WITH_BUTTON);
	 
	bot.waitUntil(new DefaultCondition() {
		@Override
		public boolean test() throws Exception {
			int row = table.indexOf(key, "PROPERTY");
			table.click(row, 0);
			table.contextMenu("Remove entry").click();
			return table.indexOf(key, 0) == -1;
		}
		@Override
		public String getFailureMessage() {
			return "row not deleted";
		}
	},2 * 60 * 1000);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:20,代码来源:GraphElementProperties.java


示例4: testSelectBookmarksFile

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
@Test
public void testSelectBookmarksFile() throws Exception {
	// Given
	File file = createBookmarksFile(gdriveConnectionUser1, "bookmarks1", "any");
	openDialog(shell -> createDialog(shell, gdriveConnectionUser1,
			Optional.of(gdriveConnectionUser1.getApplicationFolderId())));

	// When
	SWTBotTable botTable = bot.table();
	assertEquals(1, botTable.rowCount());
	botTable.select(0);
	clickOkButton();

	// Then
	assertEquals(file.getId(), dialog.getFile().getId());
}
 
开发者ID:cchabanois,项目名称:mesfavoris,代码行数:17,代码来源:ImportBookmarksFileDialogTest.java


示例5: testAddLinkAndSelectBookmarksFile

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
@Test
@Ignore("Currently fails when run with maven")
public void testAddLinkAndSelectBookmarksFile() throws Exception {
	// Given
	File file = createBookmarksFile(gdriveConnectionUser2, "bookmarks from user2", "any");
	shareWithAnyoneWithLink(gdriveConnectionUser2, file.getId());
	openDialog(shell -> createDialog(shell, gdriveConnectionUser1,
			Optional.of(gdriveConnectionUser1.getApplicationFolderId())));

	// When
	SWTBotTable botTable = bot.table();
	assertEquals(0, botTable.rowCount());
	addLink(file.getAlternateLink());
	botTable.getTableItem(0).select();
	clickOkButton();

	// Then
	assertEquals(file.getId(), dialog.getFile().getId());
}
 
开发者ID:cchabanois,项目名称:mesfavoris,代码行数:20,代码来源:ImportBookmarksFileDialogTest.java


示例6: waitForTableItems

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
/**
 * Wait for table items.
 *
 * @param table
 *          the table
 * @param timeout
 *          the timeout
 */

@SuppressWarnings("PMD.ConfusingTernary")
public static void waitForTableItems(final SWTBotTable table, final int timeout) {
  final long endTimeMillis = System.currentTimeMillis() + timeout;
  while (System.currentTimeMillis() < endTimeMillis) {
    if (table.getTableItem(0) != null) {
      return;
    } else {
      try {
        Thread.sleep(THREAD_SLEEP_TIME);
      } catch (InterruptedException e) {
        e.fillInStackTrace();
      }
    }
  }
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:25,代码来源:SwtBotControlUtils.java


示例7: addFourOrdersToOrdersOverview

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
private void addFourOrdersToOrdersOverview() {

		SWTBotView view = wbBot.partById(BaseSWTBotTest.PART_ID_ORDER_OVERVIEW);
		view.toolbarButton("Search Order").click();

		SWTBotText text = bot.textWithLabel("&Order Number");
		text.typeText("Order");

		bot.buttonWithTooltip("Start Search").click();

		// Select Item in Table
		SWTBotTable table = bot.table();
		totalPersistedOrders = table.rowCount();
		table.click(0, 5);
		bot.sleep(100);
		table.click(1, 5);
		bot.sleep(100);
		table.click(3, 5);
		bot.sleep(100);
		table.click(5, 5);
		bot.sleep(100);

		// click Finish
		bot.button("OK").click();

	}
 
开发者ID:scenarioo,项目名称:scenarioo-example-swtbot-e4,代码行数:27,代码来源:InitOrderOverviewStatement.java


示例8: testThatAllProjectsAreDeselectedWithDeselectAll

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
@Test
public void testThatAllProjectsAreDeselectedWithDeselectAll() {
    openImportProjectWizardPage();

    final SWTBotTable projectTable = bot.table(0);

    for (int i = 0; i < projectTable.rowCount(); i++) {
        projectTable.getTableItem(i).check();
    }

    bot.button("Deselect All").click();

    for (int i = 0; i < projectTable.rowCount(); i++) {
        final SWTBotTableItem oneProjectRow = projectTable.getTableItem(i);
        Assert.assertFalse(oneProjectRow.isChecked());
    }
}
 
开发者ID:codenvy-legacy,项目名称:eclipse-plugin,代码行数:18,代码来源:ProjectWizardPageTest.java


示例9: getCustomProperty

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
public String getCustomProperty(SWTBotGefEditPart part, String key) {
	GraphElement element = selectPart(part);
	selectTab(part, CUSTOM);
	SWTBotTable table = botView.bot().tableWithId(CustomProperties.PROJECT_PROPERTY_PAGE_WIDGET_ID, CustomProperties.CUSTOM_PROPERTY_LIST_WITH_BUTTON);
	int row = table.indexOf(key, "PROPERTY");
	return table.cell(row, "VALUE");
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:8,代码来源:GraphElementProperties.java


示例10: assertContext

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
public void assertContext(SWTBotShell page, SummaryExecutionRow[] rows) {
	SWTBotTable table = bot.tableWithId(
			org.gw4e.eclipse.wizard.runasmanual.SummaryExecutionPage.GW4E_MANUAL_ELEMENT_ID,
			org.gw4e.eclipse.wizard.runasmanual.SummaryExecutionPage.GW4E_MANUAL_TABLE_VIEWER_SUMMARY_ID);
	int max = table.rowCount();
	for (int i = 0; i < max; i++) {
		SWTBotTableItem item = table.getTableItem(i);

		String status = getStatus(item);
		String step = item.getText(1);
		String result = item.getText(2);
		String description = item.getText(4);

		String statusExpected = rows[i].getStatus() + "";
		String stepExpected = rows[i].getStepname();
		String resultExpected = rows[i].getResult();

		String defaultResult = MessageUtil.getString("enter_a_result_if_verification_failed");
		if (defaultResult.equalsIgnoreCase(resultExpected)) {
			resultExpected = "";
		}

		String descriptionExpected = rows[i].getDescription();
		org.junit.Assert.assertEquals("Invalid status", statusExpected, status);
		org.junit.Assert.assertEquals("Invalid step", stepExpected, step);
		org.junit.Assert.assertEquals("Invalid result", resultExpected, result);
		org.junit.Assert.assertEquals("Invalid description", descriptionExpected, description);
	}

}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:31,代码来源:RunAsManualWizard.java


示例11: assertTargetElements

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
public void assertTargetElements(String... names) {
	SWTBotTable table = bot.tableWithId(GraphElementSelectionUIPage.GW4E_CONVERSION_WIDGET_ID,
			GraphElementSelectionUIPage.GW4E_CONVERSION_TARGET_TABLE_ID);
	for (String name : names) {
		int index = table.indexOf(name, 0);
		if (index == -1)
			org.junit.Assert.fail(name + " not found in the target column");
	}
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:10,代码来源:StaticGeneratorWizard.java


示例12: assertSourceElements

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
public void assertSourceElements(String... names) {
	SWTBotTable table = bot.tableWithId(GraphElementSelectionUIPage.GW4E_CONVERSION_WIDGET_ID,
			GraphElementSelectionUIPage.GW4E_CONVERSION_SOURCE_TABLE_ID);
	for (String name : names) {
		int index = table.indexOf(name, 0);
		if (index == -1)
			org.junit.Assert.fail(name + " not found in the source column");
	}
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:10,代码来源:StaticGeneratorWizard.java


示例13: selectAdditionalContext

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
public void selectAdditionalContext (String [] additionalsContext) {
	SWTBotTable table = bot.tableWithId(JUnitGW4ETestUIPage.GW4E_CONVERSION_WIDGET_ID,JUnitGW4ETestUIPage.GW4E_LAUNCH_TEST_CONFIGURATION_ADDITIONAL_CONTEXT);
	int count = table.rowCount();
	for (String context : additionalsContext) {
		for (int i = 0; i < count; i++) {
			SWTBotTableItem item = table.getTableItem(i);
			int cols = table.columnCount();
			for (int j = 0; j < cols; j++) {
				if (item.getText(j).equals(context)) {
					item.check();
				};
			}
		}			
	}
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:16,代码来源:JUnitGraphWalkerTestUIPageTest.java


示例14: selectGenerators

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
public void selectGenerators (String [] generators) {
	SWTBotTable table = bot.tableWithId(BuildPoliciesCheckboxTableViewer.GW4E_CONVERSION_WIDGET_ID, BuildPoliciesCheckboxTableViewer.GW4E_CONVERSION_TABLE_GENERATORS);
	int max = table.rowCount();
	for (int i = 0; i < max; i++) {
		SWTBotTableItem item = table.getTableItem(i);
		for (String generator : generators) {
			if (generator.equalsIgnoreCase(item.getText())) {
				item.check();
			}
		}
	}
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:13,代码来源:OfflineTestUIPageTest.java


示例15: hasGenerator

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
public boolean hasGenerator (String value) {
	SWTBotTable table = getBuildPoliciesTable();
	int max  = table.rowCount();
	for (int i = 0; i < max; i++) {
		SWTBotTableItem item = table.getTableItem(i);
		if (value.equalsIgnoreCase(item.getText())) {
			return true;
		}
	}
	return false;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:12,代码来源:GW4EProjectProperties.java


示例16: tableContainValues

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
boolean tableContainValues(String [] thevalues ) {
	SWTBotTable table = getTable();
	for (int i = 0; i < thevalues.length; i++) {
		if (!table.containsItem(thevalues[i]) ) return false ; 
	}
	return true;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:8,代码来源:GW4EPreferencePage.java


示例17: addRowValue

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
void addRowValue(final String stringtoadd) {
	SWTBotTable table = getTable();
	bot.waitUntil(waitForTable());

	int currentCount = table.rowCount();
	SWTBotButton addButton = getAddButton();
	addButton.click();
	waitForRowAdded(table, currentCount + 1);
	int row = 0;
 
	editRowWithValue (table,MessageUtil.getString("enteranewvalue"), stringtoadd);
	
	leaveEditingCellClickingOnAnotherCell(table, row + 1);
	waitForExpectedValueAtRowCol(table,stringtoadd);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:16,代码来源:GW4EPreferencePage.java


示例18: removeRow

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
void removeRow( String stringtoremove) {
	SWTBotTable table = getTable();
	bot.waitUntil(waitForTable());
	
	selectRowWithValue(table,stringtoremove);
	waitForExpectedValueAtRowCol(table,stringtoremove);

	int currentCount = table.rowCount();
	SWTBotButton removeButton = getRemoveButton();
	
	removeButton.click();
	waitForRowAdded(table, currentCount - 1);
	waitForNotExpectedValueAtRowCol(table,stringtoremove);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:15,代码来源:GW4EPreferencePage.java


示例19: waitForTable

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
private  ICondition waitForTable() {
	return new DefaultCondition() {
		public boolean test() throws Exception {
			SWTBotTable table = getTable();
			return table != null;
		}

		public String getFailureMessage() {
			return "Table : Authorized Folder For Graph Definition has not been found";
		}
	};

}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:14,代码来源:GW4EPreferencePage.java


示例20: waitForRowAdded

import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; //导入依赖的package包/类
private void waitForRowAdded(final SWTBotTable table, final int expectedCount) {
	ICondition condition = new DefaultCondition() {
		public boolean test() throws Exception {
			return table.rowCount() == expectedCount;
		}

		public String getFailureMessage() {
			return "Table " + id + " has not " + expectedCount + " row(s). It has " + expectedCount + " row(s)";
		}
	};
	bot.waitUntil(condition);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:13,代码来源:GW4EPreferencePage.java



注:本文中的org.eclipse.swtbot.swt.finder.widgets.SWTBotTable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EV3TouchSensor类代码示例发布时间:2022-05-22
下一篇:
Java KafkaUtils类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap