Examples of SWTBotEditor


Examples of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor

    SWTBotTreeItem coreTreeItem = selectProject(PROJ1, packageExlBot.tree());
    SWTBotTreeItem rootNode = coreTreeItem.expand().getNode(0)
        .expand().select();
    rootNode.getNode(0).select().doubleClick();

    SWTBotEditor corePomEditor = bot.editorByTitle(FILE1);
    corePomEditor.toTextEditor()
        .insertText("<!-- EGit jUnit test case -->");
    corePomEditor.saveAndClose();

    rootNode.getNode(1).select().doubleClick();
    SWTBotEditor uiPomEditor = bot.editorByTitle(FILE2);
    uiPomEditor.toTextEditor().insertText("<!-- EGit jUnit test case -->");
    uiPomEditor.saveAndClose();
    coreTreeItem.collapse();
  }
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor

  private final SWTBotEditor editor;

  public static CompareEditorTester forTitleContaining(String title) {
    SWTWorkbenchBot bot = new SWTWorkbenchBot();
    SWTBotEditor editor = bot.editor(new CompareEditorTitleMatcher(title));
    // Ensure that both StyledText widgets are enabled
    SWTBotStyledText styledText = editor.toTextEditor().getStyledText();
    bot.waitUntil(Conditions.widgetIsEnabled(styledText));
    return new CompareEditorTester(editor);
  }
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor

    ContextMenuHelper.clickContextMenu(selectProject(), "Team", STASHES,
        MessageFormat.format(UIText.StashesMenu_StashItemText,
            Integer.valueOf(0), stashMessage));

    SWTBotEditor stashEditor = bot.activeEditor();
    // Check if text with message is there
    stashEditor.bot().styledText(stashMessage);

    stashEditor.bot()
        .toolbarButtonWithTooltip(
            util.getPluginLocalizedValue("StashApplyCommand.label"))
        .click();

    assertEquals(modifiedContent, getTestFileContent());
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor

    SWTBotTree syncViewTree = bot.viewByTitle("Synchronize").bot().tree();
    SWTBotTreeItem workingTree = syncViewTree.expandNode(PROJ1);
    assertEquals(1, syncViewTree.getAllItems().length);
    workingTree.expand().getNode(name).doubleClick();

    SWTBotEditor editor = bot.editorByTitle(name);
    editor.setFocus();

    // the WidgetNotFoundException will be thrown when widget with given content cannot be not found
    SWTBotStyledText left = editor.bot().styledText(content);
    SWTBotStyledText right = editor.bot().styledText("");
    // to be complete sure assert that both sides are not the same
    assertNotSame(left, right);
  }
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor

            commit);
        editorRef.set(CommitEditor.openQuiet(repoCommit));
      }
    });
    assertNotNull(editorRef.get());
    SWTBotEditor commitEditor = bot.activeEditor();
    SWTBotTable table = commitEditor.bot().table(0);
    assertTrue(table.rowCount() > 0);
    table.select(0);
    ContextMenuHelper.clickContextMenuSync(table,
        UIText.CommitFileDiffViewer_ShowAnnotationsMenuLabel);
    TestUtil.joinJobs(JobFamilies.BLAME);
    assertFalse(commitEditor.getReference().equals(
        bot.activeEditor().getReference()));

    final String content = getTestFileContent();
    // Change working directory content to validate blame opens HEAD
    setTestFileContent("updated content" + System.nanoTime());
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor

   * @throws WidgetNotFoundException if the editor is not found
   */
  public SWTBotEditor editor(Matcher<IEditorReference> matcher) {
    WaitForEditor waitForEditor = waitForEditor(matcher);
    waitUntilWidgetAppears(waitForEditor);
    return new SWTBotEditor(waitForEditor.get(0), this);
  }
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor

  public List<SWTBotEditor> editors(Matcher<?> matcher) {
    List<IEditorReference> editors = workbenchContentsFinder.findEditors(matcher);

    List<SWTBotEditor> editorBots = new ArrayList<SWTBotEditor>();
    for (IEditorReference editorReference : editors)
      editorBots.add(new SWTBotEditor(editorReference, this));

    return editorBots;
  }
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor

   */
  public SWTBotEditor activeEditor() {
    IEditorReference editor = workbenchContentsFinder.findActiveEditor();
    if (editor == null)
      throw new WidgetNotFoundException("There is no active editor"); //$NON-NLS-1$
    return new SWTBotEditor(editor, this);
  }
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor

    configEditor.getStyledText().setFocus();

    quickfixListItemCount = configEditor.getQuickfixListItemCount();
    assertTrue("Expects no quick fix", quickfixListItemCount == 1);

    SWTBotEditor javaEditor = bot.editorByTitle("Account.java");
    assertNotNull(javaEditor);
    javaEditor.close();
  }
View Full Code Here

Examples of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor

    });

    SWTBotHyperlink link = bot.hyperlink(BeansSchemaConstants.ATTR_CLASS.concat(":"));
    link.click();

    SWTBotEditor editor = bot.editorByTitle("MyConcreteClass.java");
    assertTrue(editor.isActive());
    editor.close();

    bot.cTabItem("beans").activate().show();
    bot.text("com.test.MyConcreteClass").setText("");
    link.click();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.