Package com.google.gdt.eclipse.designer.smart.model.data

Examples of com.google.gdt.eclipse.designer.smart.model.data.DataSourceInfo


            "}"});
    calendar.refresh();
    //
    GenericProperty property = (GenericProperty) calendar.getPropertyByTitle("dataSource");
    ObjectPropertyEditor editor = (ObjectPropertyEditor) property.getEditor();
    DataSourceInfo dataSource =
        NonVisualBeanContainerInfo.get(calendar).getChildren(DataSourceInfo.class).get(0);
    // check special target
    assertNull(dataSource.calculateStatementTarget(calendar));
    // assign
    editor.setComponent(property, dataSource);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  private DataSource dataSource;",
View Full Code Here


            "}"});
    calendar.refresh();
    //
    GenericProperty property = (GenericProperty) calendar.getPropertyByTitle("dataSource");
    ObjectPropertyEditor editor = (ObjectPropertyEditor) property.getEditor();
    DataSourceInfo dataSource =
        NonVisualBeanContainerInfo.get(calendar).getChildren(DataSourceInfo.class).get(0);
    // check special target
    StatementTarget target = dataSource.calculateStatementTarget(calendar);
    assertNotNull(target);
    Statement statement =
        AstNodeUtils.getEnclosingStatement(this.<ASTNode>getNode("new Calendar()"));
    assertTarget(target, null, statement, false);
    // assign
View Full Code Here

            "}"});
    calendar.refresh();
    //
    GenericProperty property = (GenericProperty) calendar.getPropertyByTitle("dataSource");
    ObjectPropertyEditor editor = (ObjectPropertyEditor) property.getEditor();
    DataSourceInfo dataSource =
        NonVisualBeanContainerInfo.get(calendar).getChildren(DataSourceInfo.class).get(0);
    // check special target
    assertNull(dataSource.calculateStatementTarget(calendar));
    // assign
    editor.setComponent(property, dataSource);
    assertEditor(
        "public class Test implements EntryPoint {",
        "/**",
 
View Full Code Here

            "  }",
            "}"});
    calendar.refresh();
    GenericProperty property = (GenericProperty) calendar.getPropertyByTitle("dataSource");
    ObjectPropertyEditor editor = (ObjectPropertyEditor) property.getEditor();
    DataSourceInfo dataSource =
        NonVisualBeanContainerInfo.get(calendar).getChildren(DataSourceInfo.class).get(0);
    // check special target
    assertNull(dataSource.calculateStatementTarget(calendar));
    // assign
    editor.setComponent(property, dataSource);
    assertEditor(
        "public class Test implements EntryPoint {",
        "/**",
 
View Full Code Here

            "  }",
            "}"});
    calendar.refresh();
    GenericProperty property = (GenericProperty) calendar.getPropertyByTitle("dataSource");
    ObjectPropertyEditor editor = (ObjectPropertyEditor) property.getEditor();
    DataSourceInfo dataSource =
        NonVisualBeanContainerInfo.get(calendar).getChildren(DataSourceInfo.class).get(0);
    // check special target
    StatementTarget target = dataSource.calculateStatementTarget(calendar);
    assertNotNull(target);
    Statement statement = AstNodeUtils.getEnclosingStatement(this.<ASTNode>getNode("testDS"));
    assertTarget(target, null, statement, false);
    // assign
    editor.setComponent(property, dataSource);
View Full Code Here

            "  }",
            "}"});
    calendar.refresh();
    GenericProperty property = (GenericProperty) calendar.getPropertyByTitle("dataSource");
    ObjectPropertyEditor editor = (ObjectPropertyEditor) property.getEditor();
    DataSourceInfo dataSource =
        NonVisualBeanContainerInfo.get(calendar).getChildren(DataSourceInfo.class).get(0);
    // check special target
    assertNull(dataSource.calculateStatementTarget(calendar));
    // assign
    editor.setComponent(property, dataSource);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  private DataSource dataSource;",
View Full Code Here

            "  }",
            "}"});
    calendar.refresh();
    GenericProperty property = (GenericProperty) calendar.getPropertyByTitle("dataSource");
    ObjectPropertyEditor editor = (ObjectPropertyEditor) property.getEditor();
    DataSourceInfo dataSource =
        NonVisualBeanContainerInfo.get(calendar).getChildren(DataSourceInfo.class).get(0);
    // check special target
    assertNull(dataSource.calculateStatementTarget(calendar));
    // assign
    editor.setComponent(property, dataSource);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  private DataSource dataSource;",
View Full Code Here

            "  }",
            "}"});
    calendar.refresh();
    GenericProperty property = (GenericProperty) calendar.getPropertyByTitle("dataSource");
    ObjectPropertyEditor editor = (ObjectPropertyEditor) property.getEditor();
    DataSourceInfo dataSource =
        NonVisualBeanContainerInfo.get(calendar).getChildren(DataSourceInfo.class).get(0);
    // check special target
    StatementTarget target = dataSource.calculateStatementTarget(calendar);
    assertNotNull(target);
    Statement statement = AstNodeUtils.getEnclosingStatement(this.<ASTNode>getNode("url"));
    assertTarget(target, null, statement, false);
    // assign
    editor.setComponent(property, dataSource);
View Full Code Here

            "    canvas.draw();",
            "  }",
            "}");
    canvas.refresh();
    FilterBuilderInfo filterBuilder = canvas.getChildren(FilterBuilderInfo.class).get(0);
    DataSourceInfo dataSource = filterBuilder.getDataSource();
    //
    assertThat(filterBuilder.getChildren()).isEmpty();
    Property property = filterBuilder.getPropertyByTitle("dataSource");
    assertThat(property).isNotNull();
    assertThat(property.getValue()).isSameAs(dataSource.getObject());
  }
View Full Code Here

            "  }",
            "}");
    canvas.refresh();
    FilterBuilderInfo filterBuilder = canvas.getChildren(FilterBuilderInfo.class).get(0);
    ListGridInfo listGrid = canvas.getChildren(ListGridInfo.class).get(0);
    DataSourceInfo dataSource;
    {
      Property property = listGrid.getPropertyByTitle("dataSource");
      ObjectPropertyEditor editor = (ObjectPropertyEditor) property.getEditor();
      dataSource = (DataSourceInfo) editor.getValueComponent(property);
    }
    //
    assertThat(filterBuilder.getChildren()).isEmpty();
    assertThat(filterBuilder.getDataSource()).isNull();
    Property property = filterBuilder.getPropertyByTitle("dataSource");
    assertThat(property).isNotNull();
    assertThat(property.getValue()).isNotNull(); // fake data source used
    // assign DataSiurce
    ObjectPropertyEditor editor = (ObjectPropertyEditor) property.getEditor();
    editor.setComponent((GenericProperty) property, dataSource);
    canvas.refresh();
    // check
    assertThat(filterBuilder.getChildren()).isEmpty();
    assertThat(filterBuilder.getDataSource()).isSameAs(dataSource);
    assertThat(property.getValue()).isSameAs(dataSource.getObject());
    assertEditor(
        "public class Test implements EntryPoint {",
        "  private DataSource dataSource;",
        "  public void onModuleLoad() {",
        "    final Canvas canvas = new Canvas();",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.smart.model.data.DataSourceInfo

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.