Examples of ConstructorCreationSupport


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

  private void addRootNode() throws Exception {
    TreeNodeInfo rootNode =
        (TreeNodeInfo) JavaInfoUtils.createJavaInfo(
            getEditor(),
            "com.gwtext.client.widgets.tree.TreeNode",
            new ConstructorCreationSupport());
    AssociationObject association =
        AssociationObjects.invocationChild("%parent%.setRootNode(%child%)", true);
    JavaInfoUtils.add(rootNode, association, m_this, null);
    rootNode.getPropertyByTitle("text").setValue("(Root)");
  }
View Full Code Here

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

          description.ensureLibraries(editor.getJavaProject());
          LayoutInfo layout =
              (LayoutInfo) JavaInfoUtils.createJavaInfo(
                  getEditor(),
                  layoutClass,
                  new ConstructorCreationSupport(creationId, true));
          setLayout(layout);
        }
      };
      action.setText(description.getName());
      action.setImageDescriptor(new ImageImageDescriptor(layoutComponentDescription.getIcon()));
View Full Code Here

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

        // create new Slider
        SliderInfo slider =
            (SliderInfo) JavaInfoUtils.createJavaInfo(
                getEditor(),
                "com.extjs.gxt.ui.client.widget.Slider",
                new ConstructorCreationSupport());
        // prepare "new Slider()" source
        String sliderSource;
        {
          StatementTarget statementTarget =
              new StatementTarget(AstNodeUtils.getEnclosingStatement(sliderExpression), true);
View Full Code Here

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

          description.ensureLibraries(editor.getJavaProject());
          LayoutInfo layout =
              (LayoutInfo) JavaInfoUtils.createJavaInfo(
                  getEditor(),
                  layoutClass,
                  new ConstructorCreationSupport(creationId, true));
          setLayout(layout);
        }
      };
      action.setText(description.getName());
      action.setImageDescriptor(new ImageImageDescriptor(layoutComponentDescription.getIcon()));
View Full Code Here

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

  private void addDefaultField() throws Exception {
    WidgetInfo item =
        (WidgetInfo) JavaInfoUtils.createJavaInfo(
            getEditor(),
            "com.gwtext.client.widgets.form.TextField",
            new ConstructorCreationSupport());
    command_CREATE(item, null);
    //item.getPropertyByTitle("text").setValue("Default");
  }
View Full Code Here

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

  private void addDefaultField() throws Exception {
    WidgetInfo field =
        (WidgetInfo) JavaInfoUtils.createJavaInfo(
            getEditor(),
            "com.gwtext.client.widgets.form.TextField",
            new ConstructorCreationSupport());
    AssociationObject association =
        AssociationObjects.invocationChild("%parent%.add(%child%)", true);
    JavaInfoUtils.add(field, association, m_this, null);
  }
View Full Code Here

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

        AstNodeUtils.getTypeBinding(cellListExpression),
        "com.google.gwt.user.cellview.client.CellList")) {
      return;
    }
    // create info
    ConstructorCreationSupport creationSupport = new ConstructorCreationSupport();
    JavaInfo cellList =
        JavaInfoUtils.createJavaInfo(
            getEditor(),
            "com.google.gwt.user.cellview.client.CellList",
            creationSupport);
    // configure info
    cellList.setVariableSupport(new EmptyVariableSupport(cellList, cellListExpression));
    creationSupport.add_setSourceExpression(cellListExpression);
    // add info as child
    cellList.setAssociation(new ConstructorChildAssociation());
    addChild(cellList);
  }
View Full Code Here

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

      }
    });
  }

  private void addNewSubMenu() throws Exception {
    ConstructorCreationSupport creationSupport = (ConstructorCreationSupport) getCreationSupport();
    ClassInstanceCreation creation = creationSupport.getCreation();
    Statement creationStatement = AstNodeUtils.getEnclosingStatement(creation);
    for (ParameterDescription parameter : creationSupport.getDescription().getParameters()) {
      if (parameter.hasTrueTag("MenuBar.subMenu")) {
        // create "vertical" MenuBar
        MenuBarInfo subMenu =
            (MenuBarInfo) JavaInfoUtils.createJavaInfo(
                getEditor(),
                "com.google.gwt.user.client.ui.MenuBar",
                new ConstructorCreationSupport("vertical", false));
        // add "subMenu" directly before this MenuItem
        JavaInfoUtils.add(
            subMenu,
            new LocalUniqueVariableSupport(subMenu),
            PureFlatStatementGenerator.INSTANCE,
View Full Code Here

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

  // Open command
  //
  ////////////////////////////////////////////////////////////////////////////
  public void openCommand() {
    if (getCreationSupport() instanceof ConstructorCreationSupport) {
      ConstructorCreationSupport creationSupport =
          (ConstructorCreationSupport) getCreationSupport();
      ClassInstanceCreation creation = creationSupport.getCreation();
      AbstractInvocationDescription description = creationSupport.getDescription();
      List<Expression> arguments = DomGenerics.arguments(creation);
      openCommand(description, arguments);
    }
    if (getCreationSupport() instanceof ImplicitFactoryCreationSupport) {
      ImplicitFactoryCreationSupport creationSupport =
          (ImplicitFactoryCreationSupport) getCreationSupport();
      MethodInvocation invocation = creationSupport.getInvocation();
      AbstractInvocationDescription description = creationSupport.getDescription();
      List<Expression> arguments = DomGenerics.arguments(invocation);
      openCommand(description, arguments);
    }
  }
View Full Code Here

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

        (ClassInstanceCreation) DomGenerics.arguments(invocation).get(1);
    WidgetInfo header =
        (WidgetInfo) JavaInfoUtils.createJavaInfo(
            getEditor(),
            "com.google.gwt.user.client.ui.HTML",
            new ConstructorCreationSupport(headerExpression));
    header.bindToExpression(headerExpression);
    header.addRelatedNode(headerExpression);
    header.setVariableSupport(new EmptyVariableSupport(header, headerExpression));
    header.setAssociation(new InvocationSecondaryAssociation(invocation));
    component.addChild(header);
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.