Package org.eclipse.wb.core.model.association

Examples of org.eclipse.wb.core.model.association.Association


    // when association of container is going to be executed during "refresh"
    addBroadcastListener(new EvaluationEventListener() {
      @Override
      public void evaluateBefore(EvaluationContext context, ASTNode node) throws Exception {
        if (isActive() && node instanceof Statement) {
          Association association = getContainer().getAssociation();
          if (association != null && association.getStatement() == node) {
            ensureCenterWidget();
          }
        }
      }
    });
View Full Code Here


    }
    return m_headerProperty;
  }

  private void createHeaderProperty() {
    Association association = getAssociation();
    if (association instanceof InvocationChildAssociation) {
      InvocationChildAssociation invocationAssociation = (InvocationChildAssociation) association;
      MethodInvocation associationInvocation = invocationAssociation.getInvocation();
      // check for supported association invocations
      boolean supportedAssociation = false;
View Full Code Here

        source =
            getEditor().getSource(
                ((EmptyVariableSupport) column.getVariableSupport()).getInitializer());
      }
      // remove from old place
      Association association = column.getAssociation();
      if (association != null) {
        if (association.remove()) {
          column.setAssociation(null);
        }
      }
      column.getParent().removeChild(column);
      // add to array
View Full Code Here

  @Override
  protected void refresh_dispose_detach(WidgetInfo child) throws Exception {
    // detach tiles
    if (child instanceof CanvasInfo) {
      CanvasInfo childCanvas = (CanvasInfo) child;
      Association association = childCanvas.getAssociation();
      if (association instanceof InvocationAssociation) {
        InvocationAssociation invocationAssociation = (InvocationAssociation) association;
        if (AstNodeUtils.getMethodSignature(invocationAssociation.getInvocation()).startsWith(
            "addTile(com.smartgwt.client.widgets.Canvas")) {
          if (childCanvas.isCreated()) {
View Full Code Here

  @Override
  protected void refresh_dispose_detach(WidgetInfo child) throws Exception {
    // detach members
    if (child instanceof CanvasInfo) {
      CanvasInfo childCanvas = (CanvasInfo) child;
      Association association = childCanvas.getAssociation();
      if (association instanceof InvocationAssociation) {
        InvocationAssociation invocationAssociation = (InvocationAssociation) association;
        String signature = AstNodeUtils.getMethodSignature(invocationAssociation.getInvocation());
        if (signature.startsWith("addMember(com.smartgwt.client.widgets.Canvas")
            || signature.startsWith("addMembers(com.smartgwt.client.widgets.Canvas")) {
View Full Code Here

  @Override
  protected void refresh_dispose_detach(WidgetInfo child) throws Exception {
    // detach items
    if (child instanceof CanvasInfo) {
      CanvasInfo childCanvas = (CanvasInfo) child;
      Association association = childCanvas.getAssociation();
      if (association instanceof InvocationAssociation) {
        InvocationAssociation invocationAssociation = (InvocationAssociation) association;
        if (AstNodeUtils.getMethodSignature(invocationAssociation.getInvocation()).startsWith(
            "addItem(com.smartgwt.client.widgets.Canvas")) {
          if (childCanvas.isCreated()) {
View Full Code Here

  // Fetch
  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected Rectangle fetchAbsoluteBounds(Object element) {
    Association association = getAssociation();
    if (association instanceof InvocationAssociation) {
      MethodInvocation methodInvocation = ((InvocationAssociation) association).getInvocation();
      if (getParent() instanceof CanvasInfo
          && "addChild(com.smartgwt.client.widgets.Canvas)".equals(AstNodeUtils.getMethodSignature(methodInvocation))) {
        return super.fetchAbsoluteBounds(element);
View Full Code Here

        "  {new: com.google.gwt.user.client.ui.MenuBar} {local-unique: bar} {/new MenuBar()/ /rootPanel.add(bar)/ /bar.addItem(menuItem)/}",
        "    {new: com.google.gwt.user.client.ui.MenuItem withSubMenu} {local-unique: menuItem} {/new MenuItem('New menu', false, menuBar)/ /bar.addItem(menuItem)/}",
        "      {new: com.google.gwt.user.client.ui.MenuBar vertical} {local-unique: menuBar} {/new MenuBar(true)/ /new MenuItem('New menu', false, menuBar)/}");
    {
      MenuBarInfo subMenu = newItem.getSubMenu();
      Association association = subMenu.getAssociation();
      assertInstanceOf(ConstructorChildAssociation.class, association);
      assertEquals("new MenuItem(\"New menu\", false, menuBar)", association.getSource());
      assertSame(subMenu, association.getJavaInfo());
    }
  }
View Full Code Here

    panel.refresh();
    assertNoErrors(panel);
    // check ColumnConfig_Info
    ColumnConfigInfo column = getJavaInfoByName("column");
    {
      Association association = column.getAssociation();
      assertThat(association).isInstanceOf(InvocationChildEllipsisAssociation.class);
      assertTrue(association.canDelete());
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wb.core.model.association.Association

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.