Package org.eclipse.swtbot.eclipse.finder.widgets

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


  @SuppressWarnings("unchecked")
  public SWTBotEclipseEditor editor(String fileName, int index) throws WidgetNotFoundException {
    Matcher matcher = allOf(instanceOf(IEditorReference.class), withPartName(fileName));
    WaitForEditor waitForView = waitForEditor(matcher);
    waitUntilWidgetAppears(waitForView);
    return new SWTBotEclipseEditor(waitForView.get(index), this);
  }
View Full Code Here


    List<IEditorReference> editors = waiForEditor.all();
    List<SWTBotEclipseEditor> result = new ArrayList<SWTBotEclipseEditor>(editors.size());

    for (IWorkbenchPartReference editor : editors) {
      result.add(new SWTBotEclipseEditor((IEditorReference) editor, this));
    }
    return result;
  }
View Full Code Here

        }
      }
    });
    if (editor == null)
      throw new WidgetNotFoundException("There is no active editor"); //$NON-NLS-1$
    return new SWTBotEclipseEditor(editor, this);
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  public SWTBotEclipseEditor editor(String fileName, int index) throws WidgetNotFoundException {
    Matcher matcher = allOf(instanceOf(IEditorReference.class), withPartName(fileName));
    WaitForEditor waitForEditor = waitForEditor(matcher);
    waitUntilWidgetAppears(waitForEditor);
    return new SWTBotEclipseEditor(waitForEditor.get(index), this);
  }
View Full Code Here

    List<IEditorReference> editors = waitForEditor.getAllMatches();
    List<SWTBotEclipseEditor> result = new ArrayList<SWTBotEclipseEditor>(editors.size());

    for (IWorkbenchPartReference editor : editors) {
      result.add(new SWTBotEclipseEditor((IEditorReference) editor, this));
    }
    return result;
  }
View Full Code Here

  @Rule public CommentReaderRule commentReader = new CommentReaderRule();

  // import 'google/protobuf/descriptor.proto';
  @Test public void should_open_file_in_plugIn() throws InterruptedException {
    String text = commentReader.comments().get(0);
    SWTBotEclipseEditor editor = robot.createFileWithText("importDescriptor.proto", text);
    navigateToImportedFile(editor);
    robot.editorByTitle("descriptor.proto");
  }
View Full Code Here

    textWithLabel("Project name:").setText(name);
    button("Finish").click();
  }

  public SWTBotEclipseEditor createFileWithText(String name, String text) {
    SWTBotEclipseEditor file = createFile(name);
    file.setText(text);
    file.save();
    return file;
  }
View Full Code Here

  @SuppressWarnings({ "unchecked", "rawtypes" })
  private void setTextInActiveEditor(String editorName, String text) {
    Matcher withPartName = WithPartName.withPartName(editorName);
    bot.waitUntil(Conditions.waitForEditor(withPartName));
    SWTBotEditor editor = bot.activeEditor();
    SWTBotEclipseEditor textEditor = editor.toTextEditor();
    bot.menu("Edit").menu("Select All").click();
    textEditor.setText(text);
    textEditor.saveAndClose();
  }
View Full Code Here

    }

    String classpathText = getClassPathText(projectName);

    SWTBotEditor editor = bot.activeEditor();
    SWTBotEclipseEditor textEditor = editor.toTextEditor();
    bot.menu("Edit").menu("Select All").click();
    textEditor.setText(classpathText);
    textEditor.saveAndClose();

    bot.viewByTitle("Package Explorer").show();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor

Copyright © 2018 www.massapicom. 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.