Examples of JavaInfo


Examples of org.eclipse.wb.core.model.JavaInfo

          }
        });
  }

  private static JavaInfo getJavaInfoRepresentedBy(JavaInfo rootJavaInfo, final String variable) {
    final JavaInfo result[] = new JavaInfo[1];
    rootJavaInfo.accept(new ObjectInfoVisitor() {
      @Override
      public boolean visit(ObjectInfo objectInfo) throws Exception {
        if (result[0] == null && objectInfo instanceof JavaInfo) {
          JavaInfo javaInfo = (JavaInfo) objectInfo;
          if (variable.equals(JavaInfoReferenceProvider.getReference(javaInfo))) {
            result[0] = javaInfo;
          }
        }
        return result[0] == null;
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

   * change them, at this moment we "materialize" {@link LayoutDataInfo} in source code.
   */
  private void createVirtualLayoutData(WidgetInfo widget) throws Exception {
    Object dataObject = getDefaultVirtualDataObject();
    // create model
    JavaInfo layoutData;
    {
      AstEditor editor = getContainer().getEditor();
      CreationSupport creationSupport = new VirtualLayoutDataCreationSupport(widget, dataObject);
      layoutData = JavaInfoUtils.createJavaInfo(editor, getLayoutDataClass(), creationSupport);
    }
    // configure
    layoutData.setVariableSupport(new VirtualLayoutDataVariableSupport(layoutData));
    layoutData.setAssociation(new EmptyAssociation());
    // add to widget
    widget.addChild(layoutData);
  }
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

    if (m_addPostInitializeContext) {
      methodLines.add("//");
      methodLines.add("postInitializeBindings();");
    }
    //
    JavaInfo javaInfoRoot = provider.getJavaInfoRoot();
    AstEditor editor = javaInfoRoot.getEditor();
    TypeDeclaration typeDeclaration = JavaInfoUtils.getTypeDeclaration(javaInfoRoot);
    BodyDeclarationTarget target = new BodyDeclarationTarget(typeDeclaration, null, false);
    MethodDeclaration lastInfoMethod = getLastInfoDeclaration(javaInfoRoot);
    //
    if (m_initDataBindings != null) {
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

    final JavaInfo[] result = {rootJavaInfo};
    rootJavaInfo.accept0(new ObjectInfoVisitor() {
      @Override
      public void endVisit(ObjectInfo objectInfo) throws Exception {
        if (objectInfo instanceof UIObjectInfo) {
          JavaInfo info = (JavaInfo) objectInfo;
          if (JavaInfoUtils.getMethodDeclaration(info) != m_initDataBindings) {
            result[0] = info;
          }
        }
      }
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

      if (result != null) {
        return result;
      }
    }
    if (m_javaInfo.isRoot()) {
      JavaInfo javaInfo = m_javaInfo.getChildRepresentedBy(node);
      if (javaInfo != null) {
        return resolve(javaInfo);
      }
    }
    return null;
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected boolean isCreateProperty(ObjectInfo objectInfo) throws Exception {
    if (objectInfo instanceof JavaInfo) {
      JavaInfo javaInfo = (JavaInfo) objectInfo;
      if (JavaInfoUtils.hasTrueParameter(javaInfo, "databinding.disable")) {
        return false;
      }
    }
    return objectInfo instanceof FieldInfo
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

        openPanel("public class Test extends Panel {", "  public Test() {", "    "
            + setLayoutSource, "  }", "}");
    // CREATE "label_1"
    GraphicalEditPart labelPart_1;
    {
      JavaInfo label_1 = loadCreationTool("com.gwtext.client.widgets.form.Label");
      canvas.moveTo(panel, 0, 0);
      canvas.assertEmptyFlowContainerFeedback(panel, horizontal);
      // click, so finish creation
      canvas.click();
      canvas.assertNoFeedbacks();
      label_1.getPropertyByTitle("text").setValue("111111111");
      label_1.getVariableSupport().setName("label_1");
      //
      labelPart_1 = canvas.getEditPart(label_1);
      isExistingAndSelectedPart(labelPart_1);
    }
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    " + setLayoutSource,
        "    {",
        "      Label label_1 = new Label('111111111');",
        "      add(label_1);",
        "    }",
        "  }",
        "}");
    // CREATE "label_2" before "label_1"
    GraphicalEditPart labelPart_2;
    {
      JavaInfo label_2 = loadCreationTool("com.gwtext.client.widgets.form.Label");
      canvas.moveTo(labelPart_1);
      assertBeforeFeedback(labelPart_1, horizontal);
      // click, so finish creation
      canvas.click();
      canvas.assertNoFeedbacks();
      label_2.getPropertyByTitle("text").setValue("222222222");
      label_2.getVariableSupport().setName("label_2");
      //
      labelPart_2 = canvas.getEditPart(label_2);
      isExistingAndSelectedPart(labelPart_2);
    }
    assertEditor(
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

            "    calendar.draw();",
            "  }",
            "}"});
    calendar.refresh();
    assertNoErrors(calendar);
    JavaInfo dataSource = getJavaInfoByName("dataSource");
    assertNoErrors(dataSource);
    // no error messages must be popped
  }
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

            "}");
    MenuBarInfo bar = (MenuBarInfo) container.getWidgets().get(0);
    MenuBarItemInfo barItem = bar.getItems().get(0);
    MenuInfo menu = barItem.getSubMenu();
    // drop MenuItem
    JavaInfo newItem = loadCreationTool("com.extjs.gxt.ui.client.widget.menu.MenuItem");
    // "menu" not open
    canvas.assertNullEditPart(menu);
    // open "menu"
    canvas.target(barItem).in(0.5, 0.5).move();
    canvas.assertNotNullEditPart(menu);
View Full Code Here

Examples of org.eclipse.wb.core.model.JavaInfo

            "}");
    MenuBarInfo bar = (MenuBarInfo) container.getWidgets().get(0);
    MenuBarItemInfo barItem = bar.getItems().get(0);
    MenuInfo menu = barItem.getSubMenu();
    // drop MenuItem
    JavaInfo newItem = loadCreationTool("com.extjs.gxt.ui.client.widget.menu.MenuItem");
    m_viewerTree.expandAll();
    tree.moveOn(menu);
    tree.assertFeedback_on(menu);
    tree.click();
    assertEditor(
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.