Package org.eclipse.wb.tests.gef

Examples of org.eclipse.wb.tests.gef.UiContext


    final Property property = panel.getPropertyByTitle("UiField");
    // no value initially
    assertFalse(property.isModified());
    assertEquals(Property.UNKNOWN_VALUE, property.getValue());
    // duplicate name
    new UiContext().executeAndCheck(new UIRunnable() {
      public void run(UiContext context) throws Exception {
        setTextEditorText(property, "existingName");
      }
    }, new UIRunnable() {
      public void run(UiContext context) throws Exception {
View Full Code Here


      m_project.delete(true, null);
    }
  }

  private static void animateProjectWizard() throws Exception {
    new UiContext().executeAndCheck(new UIRunnable() {
      public void run(UiContext context) throws Exception {
        TestUtils.runWizard(new ProjectWizard(), null);
      }
    }, new UIRunnable() {
      public void run(UiContext context) throws Exception {
View Full Code Here

  private void animateModuleWizard() throws Exception {
    animateModuleWizard(false);
  }

  private void animateModuleWizard(final boolean useMvpFramework) throws Exception {
    new UiContext().executeAndCheck(new UIRunnable() {
      public void run(UiContext context) throws Exception {
        TestUtils.runWizard(new ModuleWizard(), new StructuredSelection(m_javaProject));
      }
    }, new UIRunnable() {
      public void run(UiContext context) throws Exception {
View Full Code Here

    assertTrue(javaFile.exists());
    // open Java
    IEditorPart javaEditor = openJavaDesignEditor(javaFile);
    switchToDesign(javaEditor);
    // prepare UIContext
    UiContext context = new UiContext();
    // WarningComposite is visible
    Composite warningComposite = context.findFirstWidget(WarningComposite.class);
    assertNotNull(warningComposite);
    assertTrue(warningComposite.isVisible());
  }
View Full Code Here

  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  @DisposeProjectAfter
  public void test_0() throws Exception {
    new UiContext().executeAndCheck(new UIRunnable() {
      public void run(UiContext context) throws Exception {
        TestUtils.runWizard(new DialogBoxWizard(), new StructuredSelection(m_packageFragment));
      }
    }, new UIRunnable() {
      public void run(UiContext context) throws Exception {
View Full Code Here

   * We should check that GWT includes patches for UiBinder support in GWT Designer.
   */
  @DisposeProjectAfter
  public void test_wrongVersion() throws Exception {
    configureForGWT_version(GTestUtils.getLocation_20());
    new UiContext().executeAndCheck(new UIRunnable() {
      public void run(UiContext context) throws Exception {
        TestUtils.runWizard(new CompositeWizard(), new StructuredSelection(m_packageFragment));
      }
    }, new UIRunnable() {
      public void run(UiContext context) throws Exception {
View Full Code Here

    });
  }

  @DisposeProjectAfter
  public void test_0() throws Exception {
    new UiContext().executeAndCheck(new UIRunnable() {
      public void run(UiContext context) throws Exception {
        TestUtils.runWizard(new CompositeWizard(), new StructuredSelection(m_packageFragment));
      }
    }, new UIRunnable() {
      public void run(UiContext context) throws Exception {
View Full Code Here

      }

      abstract void runEx(UiContext context) throws Exception;
    }
    // set SCIENTIFIC
    new UiContext().executeAndCheck(new UIRunnable() {
      public void run(UiContext context) throws Exception {
        openPropertyDialog(property);
      }
    }, new NumberLabelUIRunnable() {
      @Override
      public void runEx(UiContext context) throws Exception {
        context.useShell("format");
        // initial state
        {
          assertEquals(false, predefinedButton.getSelection());
          assertEquals(true, customButton.getSelection());
          assertEquals(true, currencyButton.getSelection());
          //
          assertEquals(false, predefinedCombo.isEnabled());
          assertEquals(true, customText.isEnabled());
          assertEquals(true, currencyButton.isEnabled());
          assertEquals(true, currencyCombo.isEnabled());
          //
          assertEquals("DECIMAL", predefinedCombo.getText());
          assertEquals("0.00", customText.getText());
          assertEquals("RUB", currencyCombo.getText());
        }
        // set new state
        context.selectButton(predefinedButton);
        predefinedCombo.setText("SCIENTIFIC");
        {
          assertEquals(true, predefinedCombo.isEnabled());
          assertEquals(false, customText.isEnabled());
          assertEquals(false, currencyButton.isEnabled());
          assertEquals(false, currencyCombo.isEnabled());
          //
          assertEquals("SCIENTIFIC", predefinedCombo.getText());
        }
        // commit
        context.clickButton("OK");
      }
    });
    assertLabelSource(" predefinedFormat='SCIENTIFIC'");
    // set custom + currency
    new UiContext().executeAndCheck(new UIRunnable() {
      public void run(UiContext context) throws Exception {
        openPropertyDialog(property);
      }
    }, new NumberLabelUIRunnable() {
      @Override
View Full Code Here

TOP

Related Classes of org.eclipse.wb.tests.gef.UiContext

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.