Package net.sf.swtbot.eclipse.finder.widgets

Examples of net.sf.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor


    SWTEclipseBot bot = new SWTEclipseBot();

    createJavaProject(bot);
    createJavaClass(bot);
    Thread.sleep(1000);
    SWTBotEclipseEditor editor = bot.editor("HelloWorld.java");

    Thread.sleep(1000);
    editor.notifyKeyboardEvent(SWT.CTRL, '.');
    editor.quickfix("Add unimplemented methods");

    editor.navigateTo(7, 0);
    editor.autoCompleteProposal("sys", "sysout - print to standard out");

    editor.typeText("\"Hello World\"");

    editor.navigateTo(3, 0);
    editor.autoCompleteProposal("main", "main - main method");

    editor.typeText("new Thread (new HelloWorld ());");
    if (true)
      return;
    editor.notifyKeyboardEvent(SWT.CTRL, '2');
    editor.notifyKeyboardEvent(SWT.NONE, 'L');
    editor.notifyKeyboardEvent(SWT.NONE, '\n');

    editor.typeText("\n");
    editor.typeText("thread.start();\n");
    editor.typeText("thread.join();");
    editor.quickfix("Add throws declaration");
    editor.notifyKeyboardEvent(SWT.NONE, (char) 27);
    editor.notifyKeyboardEvent(SWT.NONE, '\n');

    editor.notifyKeyboardEvent(SWT.CTRL, 's');

    editor.notifyKeyboardEvent(SWT.ALT | SWT.SHIFT, 'x');
    editor.notifyKeyboardEvent(SWT.NONE, 'j');

    try {
      Thread.sleep(1000);
    } catch (InterruptedException e1) {
      e1.printStackTrace();
View Full Code Here


   * @param fileName the name of the file.
   * @return an editor for the specified fileName.
   * @throws WidgetNotFoundException if the editor is not found.
   */
  public SWTBotEclipseEditor editor(String fileName) throws WidgetNotFoundException {
    return new SWTBotEclipseEditor(this, finder, fileName);
  }
View Full Code Here

    List editors = SWTBotEclipseEditor.findEditors();
   
    List result = new ArrayList(editors.size());
    for (Iterator iterator = editors.iterator(); iterator.hasNext();) {
      IEditorReference editorReference = (IEditorReference) iterator.next();
      result.add(new SWTBotEclipseEditor(editorReference));
    }
    return result;
  }
View Full Code Here

   * @param fileName the name of the file.
   * @return an editor for the specified fileName.
   * @throws WidgetNotFoundException if the editor is not found.
   */
  public SWTBotEclipseEditor editor(String fileName) throws WidgetNotFoundException {
    return new SWTBotEclipseEditor(this, finder, fileName);
  }
View Full Code Here

    List editors = SWTBotView.findEditors();

    List result = new ArrayList(editors.size());
    for (Iterator iterator = editors.iterator(); iterator.hasNext();) {
      IEditorReference editorReference = (IEditorReference) iterator.next();
      result.add(new SWTBotEclipseEditor(editorReference));
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of net.sf.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.