Java 类org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox 实例源码

项目:gw4e.project    文件:GW4EOfflineRunner.java   
public void validateRun (String configurationName,String projectName,String filepath,boolean printUnvisited,boolean verbose,String startElement,String generator) {
    SWTBotShell shell = openExistingRun (configurationName);

    SWTBotText projectText = shell.bot().textWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_TEXT_ID_PROJECT);
    assertEquals("Wrong project name",projectName,projectText.getText());

    SWTBotText modelText = shell.bot().textWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_TEXT_ID_MODEL);
    assertEquals("Wrong model name",filepath,modelText.getText());

    SWTBotCheckBox verboseButton  = shell.bot().checkBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_BUTTON_ID_VERBOSE);
    assertEquals("Wrong verbose value",verbose,verboseButton.isChecked());

    SWTBotCheckBox unvisitedButton  = shell.bot().checkBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_BUTTON_ID_PRINT_UNVISITED);
    assertEquals("Wrong verbose value",verbose,unvisitedButton.isChecked());

    SWTBotText startElementText = shell.bot().textWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_TEXT_ID_START_ELEMENT);
    assertEquals("Wrong start element",startElement,startElementText.getText());

    SWTBotCombo generatorCombo = shell.bot().comboBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_COMBO_PATH_GENERATOR_ID_MODEL);
    assertEquals("Wrong generator value",generator,generatorCombo.getText());

    SWTBotButton closeButton = bot.button("Close");
    closeButton.click();

    bot.waitUntil(Conditions.shellCloses(shell));
}
项目:gw4e.project    文件:GraphElementProperties.java   
public void toggleBlocked(SWTBotGefEditPart part) {
    selectPart(part);
    selectTab(part, PROPERTIES);
    SWTBotCheckBox checkbox = bot.checkBoxWithId(VertexDefaultSection.WIDGET_ID,VertexDefaultSection.WIDGET_BUTTON_BLOCKED);
    if (checkbox.isChecked()) {
        checkbox.deselect();
    } else {
        checkbox.select();
    }
}
项目:gw4e.project    文件:RunAsManualWizard.java   
public void setFailed(SWTBotShell page) {
    SWTBotCheckBox button = page.bot().checkBoxWithId(
            org.gw4e.eclipse.wizard.runasmanual.StepPage.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID,
            org.gw4e.eclipse.wizard.runasmanual.StepPage.GW4E_STEP_PAGE_BUTTON_FAILED_ID);
    if (!button.isChecked())
        button.click();
}
项目:gw4e.project    文件:GW4EPreferencePage.java   
private void showConsolePreference(SWTBotShell shell) {
    SWTBotTree tree = bot.tree().select("Run/Debug");
    SWTBotTreeItem item = tree.getTreeItem("Console");
    item.click();
    SWTBotCheckBox button = bot.checkBoxWithLabel("Limit console output");
    if (button.isChecked()) button.click();
}
项目:gw4e.project    文件:ConsolePreferencePage.java   
private void showConsolePreference(SWTBotShell shell) {
    SWTBotTree tree = bot.tree().select("Run/Debug");
    tree.expandNode("Run/Debug", true);

    SWTBotTreeItem[] items = tree.getAllItems();
    for (SWTBotTreeItem swtBotTreeItem : items) {
        if (swtBotTreeItem.getText().equalsIgnoreCase("Run/Debug")) {
            swtBotTreeItem.getNode("Console").select();
        }
    }

    try {
        int max = 10;
        for (int i = 0; i < max; i++) {
            SWTBotCheckBox button = bot.checkBox(i);
            if (button.getText().equalsIgnoreCase("&Limit console output")) {
                if (button.isChecked()) {
                    button.click();
                    break;
                }
            }
        } 
    } catch (Exception e) {
    }

    String name = "OK";
    if (GW4EPlatform.isEclipse47()) name = "Apply and Close";
    bot.button(name).click();
}
项目:gw4e.project    文件:GW4EManualRunner.java   
private void setOmitOption (boolean value) {
    SWTBotCheckBox button = bot.checkBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_BUTTON_ID_OMIT_EMPTY_EDGE);
    if (value && !button.isChecked()) {
        button.select();
    } else {
        if (!value && button.isChecked()) {
            button.deselect();
        }
    }
}
项目:gw4e.project    文件:GW4EManualRunner.java   
private void setRemoveBlockedElement (boolean value) {
    SWTBotCheckBox button = bot.checkBoxWithId(GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, GW4ELaunchConfigurationTab.GW4E_LAUNCH_CONFIGURATION_BUTTON_ID_REMOVE_BLOCKED_ELEMENTS);
    if (value && !button.isChecked()) {
        button.select();
    } else {
        if (!value && button.isChecked()) {
            button.deselect();
        }
    }
}
项目:google-cloud-eclipse    文件:AppEngineDeployPreferencesPanelTest.java   
@Test
public void testUncheckStopPreviousVersionButtonWhenDisabled() {
  deployPanel = createPanel(true /* requireValues */);

  Button promoteButton = getButtonWithText("Promote the deployed version to receive all traffic");
  Button stopButton = getButtonWithText("Stop previous version");
  SWTBotCheckBox promote = new SWTBotCheckBox(promoteButton);
  SWTBotCheckBox stop = new SWTBotCheckBox(stopButton);

  // Initially, everything is checked and enabled.
  assertTrue(promoteButton.getSelection());
  assertTrue(stopButton.getSelection());
  assertTrue(stopButton.getEnabled());

  promote.click();
  assertFalse(promoteButton.getSelection());
  assertFalse(stopButton.getSelection());
  assertFalse(stopButton.getEnabled());

  promote.click();
  assertTrue(promoteButton.getSelection());
  assertTrue(stopButton.getSelection());
  assertTrue(stopButton.getEnabled());

  stop.click();
  assertTrue(promoteButton.getSelection());
  assertFalse(stopButton.getSelection());
  assertTrue(stopButton.getEnabled());

  promote.click();
  assertFalse(promoteButton.getSelection());
  assertFalse(stopButton.getSelection());
  assertFalse(stopButton.getEnabled());

  promote.click();
  assertTrue(promoteButton.getSelection());
  assertFalse(stopButton.getSelection());
  assertTrue(stopButton.getEnabled());
}
项目:google-cloud-eclipse    文件:MavenCoordinatesWizardUiTest.java   
@Test
public void testDynamicEnabling() {
  Button asMavenProject = CompositeUtil.findControl(shell, Button.class);

  new SWTBotCheckBox(asMavenProject).click();
  assertTrue(getGroupIdField().getEnabled());
  assertTrue(getArtifactIdField().getEnabled());
  assertTrue(getVersionField().getEnabled());

  new SWTBotCheckBox(asMavenProject).click();
  assertFalse(getGroupIdField().getEnabled());
  assertFalse(getArtifactIdField().getEnabled());
  assertFalse(getVersionField().getEnabled());
}
项目:google-cloud-eclipse    文件:ClientApisLibrariesSelectorGroupTest.java   
private SWTBotCheckBox getButton(String libraryId) {
  for (Button button : librariesSelector.getLibraryButtons()) {
    if (libraryId.equals(((Library) button.getData()).getId())) {
      return new SWTBotCheckBox(button);
    }
  }
  fail("Could not find button for " + libraryId);
  return null; // won't be reached
}
项目:google-cloud-eclipse    文件:AppEngineLibrariesSelectorGroupTest.java   
private SWTBotCheckBox getButton(String libraryId) {
  for (Button button : librariesSelector.getLibraryButtons()) {
    if (libraryId.equals(((Library) button.getData()).getId())) {
      return new SWTBotCheckBox(button);
    }
  }
  fail("Could not find button for " + libraryId);
  return null; // won't be reached
}
项目:gwt-eclipse-plugin    文件:SwtBotUtils.java   
public static void setCheckBox(SWTBotCheckBox checkBox, boolean checked) {
  if (checked) {
    checkBox.select();
  } else {
    checkBox.deselect();
  }
}
项目:eclipse-plugin    文件:ProjectWizardPageTest.java   
@Test
public void testThatAddToWorkingSetCheckboxIsUncheckedByDefault() {
    openImportProjectWizardPage();

    final SWTBotCheckBox addToWorkingSetCheckBox = bot.checkBox(0);

    Assert.assertFalse(addToWorkingSetCheckBox.isChecked());
}
项目:eclipse-plugin    文件:ProjectWizardPageTest.java   
@Test
public void testThatCheckingAddToWorkingSetSelectButtonIsEnabled() {
    openImportProjectWizardPage();

    final SWTBotButton workingSetSelectButton = bot.button("Select...");
    final SWTBotCheckBox addToWorkingSetCheckBox = bot.checkBox(0);

    addToWorkingSetCheckBox.click();

    Assert.assertTrue(workingSetSelectButton.isEnabled());
}
项目:gw4e.project    文件:VertexProperties.java   
public boolean isShared(SWTBotGefEditPart part) {
    selectPart(part);
    selectTab(part, PROPERTIES);
    SWTBotCheckBox checkbox = bot.checkBoxWithId(VertexDefaultSection.WIDGET_ID,VertexDefaultSection.WIDGET_BUTTON_SHARED);
    return checkbox.isChecked();
}
项目:gw4e.project    文件:OutLineView.java   
public void toggleFilterOn () {
    SWTBotCheckBox button = botView.bot().checkBoxWithId(OutLineComposite.GW_WIDGET_ID, OutLineComposite.GW_OUTLINE_FILTER_BUTTON);
    if (button.isChecked()) return;
    button.click();
}
项目:gw4e.project    文件:OutLineView.java   
public void toggleFilterOff() {
    SWTBotCheckBox button = botView.bot().checkBoxWithId(OutLineComposite.GW_WIDGET_ID, OutLineComposite.GW_OUTLINE_FILTER_BUTTON);
    if (button.isChecked()) {
        button.click();
    }
}
项目:gw4e.project    文件:RunAsManualWizard.java   
private SWTBotCheckBox getBtnUpdateIfTestcaseid() {
    return bot.checkBoxWithId(org.gw4e.eclipse.wizard.runasmanual.SaveTestPage.GW4E_MANUAL_ELEMENT_ID,
            org.gw4e.eclipse.wizard.runasmanual.SaveTestPage.GW4E_MANUAL_BUTTON_UPDATE_IF_TESTCASE_ID);
}
项目:gw4e.project    文件:StaticGeneratorWizard.java   
public void checkEraseExistingFile() {
    SWTBotCheckBox b = bot.checkBoxWithId(GeneratorResourceUIPage.GW4E_GENERATOR_CHOICE_CHECKBOX_ID, GeneratorResourceUIPage.GW4E_GENERATOR_CHOICE_ERASE_CHECKBOX);
    b.click();
}
项目:gw4e.project    文件:GraphWalkerTestHookPageTest.java   
public void allowBeforeAfterExecutionHook () {
    SWTBotCheckBox checkButton = bot.checkBoxWithId(GW4EHookUIPage.GW4E_CONVERSION_CONTROL_ID, GW4EHookUIPage.GW4E_CONVERSION_CHOICE_GENERATE_EXECUTON_BEFORE_AFTER_CHECKBOX);
    checkButton.click();
}
项目:gw4e.project    文件:GraphWalkerTestHookPageTest.java   
public void allowPerformanceReport() {
    SWTBotCheckBox checkButton = bot.checkBoxWithId(GW4EHookUIPage.GW4E_CONVERSION_CONTROL_ID, GW4EHookUIPage.GW4E_CONVERSION_CHOICE_GENERATE_PERFORMNCE_REPORT_CHECKBOX);
    checkButton.click();
}
项目:gw4e.project    文件:GraphWalkerTestHookPageTest.java   
public void allowBeforeAfterElementHook () {
    SWTBotCheckBox checkButton = bot.checkBoxWithId(GW4EHookUIPage.GW4E_CONVERSION_CONTROL_ID, GW4EHookUIPage.GW4E_CONVERSION_CHOICE_GENERATE_ELEMENT_BEFORE_AFTER_CHECKBOX);
    checkButton.click();
}
项目:gw4e.project    文件:JUnitGraphWalkerTestUIPageTest.java   
public void allowJUnitSmokeTest () {
    SWTBotCheckBox checkButton = bot.checkBoxWithId(JUnitGW4ETestUIPage.GW4E_CONVERSION_WIDGET_ID, JUnitGW4ETestUIPage.GW4E_CONVERSION_CHOICE_GENERATE_RUN_SMOKE_TEST_CHECKBOX);
    checkButton.click();
}
项目:gw4e.project    文件:JUnitGraphWalkerTestUIPageTest.java   
public void allowJUnitFunctionalTest () {
    SWTBotCheckBox checkButton = bot.checkBoxWithId(JUnitGW4ETestUIPage.GW4E_CONVERSION_WIDGET_ID, JUnitGW4ETestUIPage.GW4E_CONVERSION_CHOICE_GENERATE_RUN_FUNCTIONNAL_TEST_CHECKBOX);
    checkButton.click();
}
项目:gw4e.project    文件:JUnitGraphWalkerTestUIPageTest.java   
public void allowJUnitStabilityTest () {
    SWTBotCheckBox checkButton = bot.checkBoxWithId(JUnitGW4ETestUIPage.GW4E_CONVERSION_WIDGET_ID, JUnitGW4ETestUIPage.GW4E_CONVERSION_CHOICE_GENERATE_RUN_STABILITY_TEST_CHECKBOX);
    checkButton.click();
}
项目:gw4e.project    文件:JUnitGraphWalkerTestUIPageTest.java   
public void allowHint () {
    SWTBotCheckBox checkButton = bot.checkBoxWithId(JUnitGW4ETestUIPage.GW4E_CONVERSION_WIDGET_ID, JUnitGW4ETestUIPage.GW4E_LAUNCH_TEST_CONFIGURATION_HINT_BUTTON);
    checkButton.click();
}
项目:gw4e.project    文件:GraphWalkerTestUIPageTest.java   
public void allowGraphWalkerTest () {
    SWTBotCheckBox checkButton = bot.checkBoxWithId(GraphWalkerTestUIPage.GW4E_CONVERSION_CONTROL_ID, GraphWalkerTestUIPage.GW4E_CONVERSION_CHOICE_GENERATE_GRAPHWALKER_CHECKBOX);
    checkButton.click();
}
项目:gw4e.project    文件:GraphWalkerTestUIPageTest.java   
public void allowGraphWalkerModelBasedTestTest () {
    SWTBotCheckBox checkButton = bot.checkBoxWithId(GraphWalkerTestUIPage.GW4E_CONVERSION_CONTROL_ID, GraphWalkerTestUIPage.GW4E_CONVERSION_CHOICE_GENERATE_RUN_MODEL_TEST_CHECKBOX);
    checkButton.click();
}
项目:gw4e.project    文件:GW4EProjectProperties.java   
public void toggleBuildButton () {
    SWTBotCheckBox button = shell.bot().checkBoxWithId(LabelizedCheckBoxes.PROJECT_PROPERTY_PAGE_WIDGET_ID, LabelizedCheckBoxes.BUTTON + ".0");
    button.click();
}
项目:gw4e.project    文件:GW4EProjectProperties.java   
public void toggleSynchronizationButton () {
    SWTBotCheckBox button = shell.bot().checkBoxWithId(LabelizedCheckBoxes.PROJECT_PROPERTY_PAGE_WIDGET_ID, LabelizedCheckBoxes.BUTTON + ".3");
    button.click();
}
项目:gw4e.project    文件:GW4EProjectProperties.java   
public void togglePerformanceLoggingButton () {
    SWTBotCheckBox button = shell.bot().checkBoxWithId(LabelizedCheckBoxes.PROJECT_PROPERTY_PAGE_WIDGET_ID, LabelizedCheckBoxes.BUTTON + ".2");
    button.click();
}
项目:google-cloud-eclipse    文件:MavenCoordinatesWizardUiTest.java   
private void enableUi() {
  Button asMavenProject = CompositeUtil.findControl(shell, Button.class);
  new SWTBotCheckBox(asMavenProject).click();
}
项目:translationstudio8    文件:ProgressDialog.java   
/**
 * @return 复选框:总是在后台运行;
 */
public SWTBotCheckBox chkbxAlwaysRunInBackground() {
    return dlgBot.checkBox(TsUIConstants.getString("chkbxAlwaysRunInBackground"));
}
项目:translationstudio8    文件:PreferencesDialog.java   
/**
 * @return 复选框:启用共享库提示;
 */
public SWTBotCheckBox tmChkbxShareDBTips() {
    return dlgBot.checkBox(TsUIConstants.getString("prefTMChkbxShareDBTips"));
}
项目:translationstudio8    文件:PreferencesDialog.java   
/**
 * @return 复选框:使用自动快速翻译;
 */
public SWTBotCheckBox tmChkbxAutoQT() {
    return dlgBot.checkBox(TsUIConstants.getString("prefTMChkbxAutoQT"));
}
项目:translationstudio8    文件:PreferencesDialog.java   
/**
 * @return 复选框:匹配存在时不应用记忆库;
 */
public SWTBotCheckBox tmChkbxMatchExistNotApplyTM() {
    return dlgBot.checkBox(TsUIConstants.getString("prefTMChkbxMatchExistNotApplyTM"));
}
项目:translationstudio8    文件:PreferencesDialog.java   
/**
 * @return 复选框:搜索记忆库时区分大小写;
 */
public SWTBotCheckBox tmChkbxMatchCase() {
    return dlgBot.checkBox(TsUIConstants.getString("prefTMChkbxMatchCase"));
}
项目:translationstudio8    文件:PreferencesDialog.java   
/**
 * @return 复选框:匹配时使用标记自动补全;
 */
public SWTBotCheckBox tmChkbxAutoCompleteTag() {
    return dlgBot.checkBox(TsUIConstants.getString("prefTMChkbxAutoCompleteTag"));
}
项目:translationstudio8    文件:PreferencesDialog.java   
/**
 * @return 复选框:匹配时是否忽略标记;
 */
public SWTBotCheckBox tmChkbxIgnoreTag() {
    return dlgBot.checkBox(TsUIConstants.getString("prefTMChkbxIgnoreTag"));
}
项目:translationstudio8    文件:PreferencesDialog.java   
/**
 * @return 复选框:预翻译区分大小写;
 */
public SWTBotCheckBox transPreChkbxCaseSensitive() {
    return dlgBot.checkBox(TsUIConstants.getString("prefTransPreChkbxCaseSensitive"));
}