Examples of JavaInfo


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

      }

      @Override
      public void addAfter(JavaInfo parent, JavaInfo child) throws Exception {
        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,
              AssociationObjects.invocationChild("%parent%.setEl(%child%.getElement())", true),
              m_this,
              null);
          variableSupport.inline();
          newHTML.getPropertyByTitle("html").setValue("New BoxComponent");
        }
      }
    });
  }
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(widget);
    // create model
    JavaInfo layoutData;
    {
      CreationSupport creationSupport = new VirtualLayoutDataCreationSupport(widget, dataObject);
      layoutData =
          JavaInfoUtils.createJavaInfo(getEditor(), getLayoutDataClass(widget), 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

  //
  ////////////////////////////////////////////////////////////////////////////
  public EditPart createEditPart(EditPart context, Object model) {
    // use generic EditPart for placeholders
    if (model instanceof JavaInfo) {
      JavaInfo javaInfo = (JavaInfo) model;
      if (javaInfo.isPlaceholder()) {
        return null;
      }
    }
    // ask factories
    for (IEditPartFactory factory : FACTORIES) {
View Full Code Here

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

        "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.core.model.JavaInfo

    /**
     * @return the <code>setWidth</code> {@link MethodInvocation}, may be <code>null</code>.
     */
    private MethodInvocation getInvocation() {
      JavaInfo parent = getParentJava();
      // check setWidth(Column,*) invocations
      List<MethodInvocation> invocations = parent.getMethodInvocations();
      for (MethodInvocation invocation : invocations) {
        if (invocation.getName().getIdentifier().equals("setColumnWidth")) {
          List<Expression> arguments = DomGenerics.arguments(invocation);
          if (arguments.size() >= 2) {
            Expression columnExpression = arguments.get(0);
View Full Code Here

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

    return ExecutionUtils.runObjectLog(new RunnableObjectEx<Boolean>() {
      public Boolean runObject() throws Exception {
        if (mementoObject instanceof List) {
          List<JavaInfoMemento> mementos = (List<JavaInfoMemento>) mementoObject;
          for (JavaInfoMemento memento : mementos) {
            JavaInfo component = memento.create(m_menu);
            if (!isValidObjectType(component)) {
              return false;
            }
          }
          return true;
View Full Code Here

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

    }
    return pastedObjects;
  }

  public void commandMove(Object object, Object nextObject) throws Exception {
    JavaInfo item = (JavaInfo) object;
    JavaInfo nextItem = (JavaInfo) nextObject;
    // move item
    if (item instanceof MenuItemInfo) {
      JavaInfoUtils.move(item, getNewItemAssociation(), m_menu, nextItem);
    } else if (item instanceof MenuItemSeparatorInfo) {
      JavaInfoUtils.move(item, getNewSeparatorAssociation(), m_menu, nextItem);
View Full Code Here

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

      Class<?> superClass = getSuperClass(editor, typeBinding_super);
      // prepare creation
      MethodDeclaration constructor = getConstructor(editor, typeDeclaration);
      ThisCreationSupport creationSupport = new ThisCreationSupport(constructor);
      // create JavaInfo
      JavaInfo javaInfo = JavaInfoUtils.createJavaInfo(editor, superClass, creationSupport);
      if (javaInfo != null) {
        javaInfo.setVariableSupport(new ThisVariableSupport(javaInfo, constructor));
        // prepare root context
        List<MethodDeclaration> rootMethods = Lists.newArrayList();
        rootMethods.add(constructor);
        return new ParseRootContext(javaInfo, new ExecutionFlowDescription(rootMethods));
      }
View Full Code Here

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

    if (creation.getAnonymousClassDeclaration() != null) {
      typeBinding = typeBinding.getSuperclass();
    }
    // check "super"
    {
      JavaInfo javaInfo =
          super.create(editor, creation, methodBinding, typeBinding, arguments, argumentInfos);
      if (javaInfo != null) {
        return javaInfo;
      }
    }
View Full Code Here

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

    if (!hasGWT(editor)) {
      return null;
    }
    // check "super"
    {
      JavaInfo javaInfo =
          super.create(
              editor,
              invocation,
              methodBinding,
              arguments,
              expressionInfo,
              argumentInfos,
              javaInfoResolver);
      if (javaInfo != null) {
        return javaInfo;
      }
    }
    // RootPanel.get()
    if (AstNodeUtils.isMethodInvocation(
        invocation,
        "com.google.gwt.user.client.ui.RootPanel",
        new String[]{"get()", "get(java.lang.String)"})) {
      JavaInfo rootPanel = javaInfoResolver.getJavaInfo(invocation);
      if (rootPanel == null) {
        rootPanel =
            JavaInfoUtils.createJavaInfo(
                editor,
                getClass(editor, methodBinding.getReturnType()),
                new RootPanelCreationSupport(invocation));
      }
      return rootPanel;
    }
    // RootLayoutPanel.get()
    if (AstNodeUtils.isMethodInvocation(
        invocation,
        "com.google.gwt.user.client.ui.RootLayoutPanel",
        "get()")) {
      JavaInfo rootPanel = javaInfoResolver.getJavaInfo(invocation);
      if (rootPanel == null) {
        rootPanel =
            JavaInfoUtils.createJavaInfo(
                editor,
                getClass(editor, methodBinding.getReturnType()),
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.