当前位置: 首页>>代码示例>>Java>>正文


Java SWTBotText.getText方法代码示例

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


在下文中一共展示了SWTBotText.getText方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getTheProgramArgsTextBox

import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; //导入方法依赖的package包/类
public static String getTheProgramArgsTextBox(SWTWorkbenchBot bot) {
  SwtBotUtils.print("Retrieve Args");

  // When I open debug configuration
  SwtBotMenuActions.openDebugConfiguration(bot);

  // Focus on the Arguments Tab
  bot.cTabItem("Arguments").activate().setFocus();

  // Get the program arguments
  SWTBotText programArgs = bot.textInGroup("Program arguments:");
  String text = programArgs.getText();

  // And close the debug configuration dialog
  bot.button("Close").click();

  // And closing may cause a save change dialog
  SwtBotProjectDebug.closeSaveChangesDialogIfNeedBe(bot);

  SwtBotUtils.print("Retrieved Args");

  return text;
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:24,代码来源:SwtBotProjectDebug.java

示例2: getWeight

import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; //导入方法依赖的package包/类
public String getWeight(SWTBotGefEditPart part) {
	selectPart(part);
	SWTBotText text = botView.bot().textWithId(WIDGET_ID,WIDGET_TEXT_DESCRIPTION);
	String s = text.getText();
	if (s==null) return "";
	return s;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:8,代码来源:EdgeProperties.java

示例3: hasRequirements

import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; //导入方法依赖的package包/类
public boolean hasRequirements (Set<String> requirements) {
	SWTBotText st = bot.textWithId(GraphModelPropertyPage.GW4E_FILE_REQUIREMENT_TEXT_ID,GraphModelPropertyPage.GW4E_FILE_REQUIREMENT_TEXT_ID);
	String currentText = st.getText();
	for (String req : requirements) {
		if (currentText.indexOf(req)!=-1) continue;
		return false;
	}
	return true;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:10,代码来源:GraphModelProperties.java

示例4: hasMethods

import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; //导入方法依赖的package包/类
public boolean hasMethods (Set<String> methods) {
	SWTBotText st = bot.textWithId(GraphModelPropertyPage.GW4E_FILE_METHODS_TEXT_ID,GraphModelPropertyPage.GW4E_FILE_METHODS_TEXT_ID);
	String currentText = st.getText();
	for (String method : methods) {
		if (currentText.indexOf(method)!=-1) continue;
		return false;
	}
	return true;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:10,代码来源:GraphModelProperties.java

示例5: getNameText

import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; //导入方法依赖的package包/类
public String getNameText () {
	SWTBotText text= botView.bot().textWithId(OutLineComposite.GW_WIDGET_ID, OutLineComposite.GW_OUTLINE_NAME_TEXT);
	return text.getText();
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:5,代码来源:OutLineView.java

示例6: getDescriptionText

import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; //导入方法依赖的package包/类
public String getDescriptionText () {
	SWTBotText text= botView.bot().textWithId(OutLineComposite.GW_WIDGET_ID, OutLineComposite.GW_OUTLINE_DESCRIPTION_TEXT);
	return text.getText();
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:5,代码来源:OutLineView.java

示例7: getRequirementText

import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; //导入方法依赖的package包/类
public String getRequirementText () {
	SWTBotText text= botView.bot().textWithId(OutLineComposite.GW_WIDGET_ID, OutLineComposite.GW_OUTLINE_REQUIREMENT_TEXT);
	return text.getText();
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:5,代码来源:OutLineView.java

示例8: getWeightText

import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; //导入方法依赖的package包/类
public String getWeightText () {
	SWTBotText text= botView.bot().textWithId(OutLineComposite.GW_WIDGET_ID, OutLineComposite.GW_OUTLINE_WEIGHT_TEXT);
	return text.getText();
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:5,代码来源:OutLineView.java

示例9: enterDestination

import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; //导入方法依赖的package包/类
public void enterDestination (String targetFilename, String targetFilenamefullpath, String  ... nodeToExpand) {
	ICondition nodeSelectedCondition = new DefaultCondition () {
		@Override
		public boolean test() throws Exception {
			try {
				SWTBotTree tree = bot.treeWithId(FolderSelectionGroup.GW4E_CONVERSION_TREE,FolderSelectionGroup.GW4E_CONVERSION_TREE);
				if (tree.isEnabled()) {
					tree.setFocus();
					SWTBotTreeItem item = tree.expandNode(nodeToExpand);
					item.setFocus();
					item.select();
				}
				return true;
			} catch (Throwable e) {
				return false;
			}
		}

		@Override
		public String getFailureMessage() {
			String nodeMsg = "";
			for (int i = 0; i < nodeToExpand.length; i++) {
				nodeMsg = nodeMsg + "/" + nodeToExpand[i] ;
			}
			String msg = "Unable to  expand nodes " + nodeMsg ;
			return msg;
		}
	};
	
	bot.waitUntil(nodeSelectedCondition);
	
	SWTBotText textFile = bot.textWithLabel("Convert to file");
	if(textFile.isEnabled()) {
		textFile.setText(targetFilename);
	}
	
	textFile = bot.textWithLabel("Output file");
	 
	String text = textFile.getText();
	org.junit.Assert.assertEquals (targetFilenamefullpath, text);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:42,代码来源:StaticGeneratorWizard.java

示例10: getBuildPoliciesFileName

import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; //导入方法依赖的package包/类
public String getBuildPoliciesFileName () {
	SWTBotText text = shell.bot().textWithId(LabelizedTexts.PROJECT_PROPERTY_PAGE_WIDGET_ID, LabelizedTexts.TEXT + "." + ProjectPropertyPage.TEXTUAL_PROPERTIES + "." + 0);
	return text.getText();
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:5,代码来源:GW4EProjectProperties.java

示例11: checkPauseOnNewSelectionByWidget

import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; //导入方法依赖的package包/类
/**
 * Checks that, when any of the time widgets are updated, the active play
 * action is cancelled.
 */
@Test
public void checkPauseOnNewSelectionByWidget() {

	SWTBotButton playButton = getPlayPauseButton();

	SWTBotText text = getTimeText();
	String firstTime = text.getText();

	// Set the framerate to 1 frame every 10 seconds.
	getDisplay().syncExec(new Runnable() {
		@Override
		public void run() {
			timeComposite.setFPS(0.1);
		}
	});

	// Pause by clicking the play button.
	playButton.click();
	assertTrue(isPlaying());
	playButton.click();
	assertFalse(isPlaying());

	// Pause by clicking the time scale.
	playButton.click();
	assertTrue(isPlaying());
	getTimeScale().setValue(1);
	assertFalse(isPlaying());

	// Pause by typing text.
	playButton.click();
	assertTrue(isPlaying());
	text.selectAll();
	text.typeText(firstTime + SWT.CR + SWT.LF);
	assertFalse(isPlaying());

	// Pause by clicking the next button.
	playButton.click();
	assertTrue(isPlaying());
	getNextButton().click();
	assertFalse(isPlaying());

	// Pause by clicking the previous button.
	playButton.click();
	assertTrue(isPlaying());
	getPrevButton().click();
	assertFalse(isPlaying());

	return;
}
 
开发者ID:eclipse,项目名称:eavp,代码行数:54,代码来源:TimeSliderCompositeTester.java


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