Package org.eclipse.wb.internal.core.model.creation

Examples of org.eclipse.wb.internal.core.model.creation.ConstructorCreationSupport


    if (newObject instanceof MenuInfo) {
      newItem =
          (ComponentInfo) JavaInfoUtils.createJavaInfo(
              m_menu.getEditor(),
              "com.extjs.gxt.ui.client.widget.menu.MenuItem",
              new ConstructorCreationSupport());
      commandCreate(newItem, nextItem);
      // set Menu
      MenuInfo newMenu = (MenuInfo) newObject;
      JavaInfoUtils.add(
          newMenu,
View Full Code Here


    }
    // set CreationSupport
    Expression expression;
    {
      expression = m_javaInfo.getEditor().addInvocationArgument(invocation, 1, source);
      m_javaInfo.setCreationSupport(new ConstructorCreationSupport((ClassInstanceCreation) expression));
      m_javaInfo.bindToExpression(expression);
      m_javaInfo.addRelatedNode(expression);
    }
    // set Association
    m_javaInfo.setAssociation(new InvocationSecondaryAssociation(invocation));
View Full Code Here

    AstEditor editor = getEditor();
    ColumnLayoutDataInfo columnData =
        (ColumnLayoutDataInfo) JavaInfoUtils.createJavaInfo(
            editor,
            "com.gwtext.client.widgets.layout.ColumnLayoutData",
            new ConstructorCreationSupport());
    // set CreationSupport
    Expression expression;
    {
      expression = DomGenerics.arguments(invocation).get(1);
      String contentSource = columnData.getCreationSupport().add_getSource(null);
View Full Code Here

  private void addDefaultCheckItem() throws Exception {
    CheckItemInfo item =
        (CheckItemInfo) JavaInfoUtils.createJavaInfo(
            getEditor(),
            "com.gwtext.client.widgets.menu.CheckItem",
            new ConstructorCreationSupport());
    new FlowContainerFactory(this, false).get().get(0).command_CREATE(item, null);
    item.getPropertyByTitle("text").setValue("Default");
    item.setCheckedProperty(true);
  }
View Full Code Here

        AstEditor editor = getEditor();
        JavaInfo content =
            JavaInfoUtils.createJavaInfo(
                editor,
                "com.gwtext.client.widgets.Panel",
                new ConstructorCreationSupport());
        // set CreationSupport
        Expression expression;
        {
          ClassInstanceCreation creation =
              ((ConstructorCreationSupport) getCreationSupport()).getCreation();
View Full Code Here

        if (child == m_this) {
          JavaInfo newHTML =
              JavaInfoUtils.createJavaInfo(
                  getEditor(),
                  "com.google.gwt.user.client.ui.HTML",
                  new ConstructorCreationSupport());
          LocalUniqueVariableSupport variableSupport = new LocalUniqueVariableSupport(newHTML);
          JavaInfoUtils.add(
              newHTML,
              variableSupport,
              PureFlatStatementGenerator.INSTANCE,
View Full Code Here

  // Anchor
  //
  ////////////////////////////////////////////////////////////////////////////
  public Object getAnchor() throws Exception {
    if (getCreationSupport() instanceof ConstructorCreationSupport) {
      ConstructorCreationSupport creationSupport =
          (ConstructorCreationSupport) getCreationSupport();
      ClassInstanceCreation creation = creationSupport.getCreation();
      Expression anchorExpression = DomGenerics.arguments(creation).get(0);
      return JavaInfoEvaluationHelper.getValue(anchorExpression);
    }
    return Property.UNKNOWN_VALUE;
  }
View Full Code Here

  @Override
  protected void on_setPropertyExpression(GenericPropertyImpl property) throws Exception {
    super.on_setPropertyExpression(property);
    if (getCreationSupport() instanceof ConstructorCreationSupport
        && property.getTitle().equals("size")) {
      ConstructorCreationSupport creationSupport =
          (ConstructorCreationSupport) getCreationSupport();
      ClassInstanceCreation creation = creationSupport.getCreation();
      String signature = creationSupport.getDescription().getSignature();
      if ("<init>(com.extjs.gxt.ui.client.Style.LayoutRegion)".equals(signature)) {
        getEditor().addCreationArgument(creation, 1, "0.0f");
        setCreationSupport(new ConstructorCreationSupport(creation));
      }
    }
  }
View Full Code Here

  }

  private void replaceConstructorArgument(String requiredSignature, String constructorArgument)
      throws Exception {
    if (getCreationSupport() instanceof ConstructorCreationSupport) {
      ConstructorCreationSupport creationSupport =
          (ConstructorCreationSupport) getCreationSupport();
      ClassInstanceCreation creation = creationSupport.getCreation();
      String signature = AstNodeUtils.getCreationSignature(creation);
      if (requiredSignature.equals(signature)) {
        getEditor().replaceCreationArguments(creation, ImmutableList.of(constructorArgument));
        setCreationSupport(new ConstructorCreationSupport(creation));
      }
    }
  }
View Full Code Here

  /**
   * Adds filler {@link WidgetInfo} into given cell.
   */
  private void addFiller(int column, int row) throws Exception {
    // prepare creation support
    ConstructorCreationSupport creationSupport = new ConstructorCreationSupport("empty", false);
    // prepare filler
    WidgetInfo filler =
        (WidgetInfo) JavaInfoUtils.createJavaInfo(
            getEditor(),
            "com.gwtext.client.widgets.form.Label",
View Full Code Here

TOP

Related Classes of org.eclipse.wb.internal.core.model.creation.ConstructorCreationSupport

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.