Search in sources :

Example 26 with IBindingInfo

use of org.eclipse.wb.internal.core.databinding.model.IBindingInfo in project windowbuilder by eclipse.

the class ViewerObservableTest method test_observeMultiSelection.

public void test_observeMultiSelection() throws Exception {
    setFileContentSrc("test/TestBean.java", getSourceDQ("package test;", "public class TestBean {", "  public java.util.List getNames() {", "    return null;", "  }", "}"));
    waitForAutoBuild();
    // 
    CompositeInfo shell = DatabindingTestUtils.parseTestSource(this, new String[] { "public class Test {", "  protected Shell m_shell;", "  private TableViewer m_viewer;", "  private TestBean m_bean;", "  private DataBindingContext m_bindingContext;", "  public static void main(String[] args) {", "    Test test = new Test();", "    test.open();", "  }", "  public void open() {", "    Display display = new Display();", "    createContents();", "    m_shell.open();", "    m_shell.layout();", "    while (!m_shell.isDisposed()) {", "      if (!display.readAndDispatch()) {", "        display.sleep();", "      }", "    }", "  }", "  protected void createContents() {", "    m_shell = new Shell();", "    m_shell.setLayout(new GridLayout());", "    m_viewer = new TableViewer(m_shell, SWT.BORDER);", "    m_bindingContext = initDataBindings();", "  }", "  private DataBindingContext initDataBindings() {", "    IObservableList observeList = BeansObservables.observeList(Realm.getDefault(), m_bean, \"names\");", "    IObservableList observeWidget = ViewersObservables.observeMultiSelection(m_viewer);", "    DataBindingContext bindingContext = new DataBindingContext();", "    bindingContext.bindList(observeWidget, observeList, null, null);", "    return bindingContext;", "  }", "}" });
    assertNotNull(shell);
    // 
    DatabindingsProvider provider = getDatabindingsProvider();
    List<IBindingInfo> bindings = provider.getBindings();
    // 
    assertNotNull(bindings);
    assertEquals(1, bindings.size());
    // 
    BindingInfo binding = (BindingInfo) bindings.get(0);
    // 
    assertInstanceOf(MultiSelectionObservableInfo.class, binding.getTargetObservable());
    ViewerObservableInfo observable = (ViewerObservableInfo) binding.getTargetObservable();
    // 
    assertEquals("observeWidget", observable.getVariableIdentifier());
    assertEquals("m_viewer.multiSelection", observable.getPresentationText());
    // 
    WidgetBindableTest.assertBindable(shell.getChildrenControls().get(0).getChildren().get(0), WidgetBindableInfo.class, provider.getObserves(ObserveType.WIDGETS).get(0).getChildren(ChildrenContext.ChildrenForMasterTable).get(0), false, "m_viewer|m_viewer|org.eclipse.jface.viewers.TableViewer", observable.getBindableObject());
    // 
    WidgetBindableTest.assertBindableProperty(WidgetPropertyBindableInfo.class, "multi selection|observeMultiSelection|java.lang.Object", observable.getBindableProperty());
}
Also used : IBindingInfo(org.eclipse.wb.internal.core.databinding.model.IBindingInfo) DatabindingsProvider(org.eclipse.wb.internal.rcp.databinding.DatabindingsProvider) TreeViewerInputBindingInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.input.TreeViewerInputBindingInfo) ViewerInputBindingInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.input.ViewerInputBindingInfo) BindingInfo(org.eclipse.wb.internal.rcp.databinding.model.context.BindingInfo) IBindingInfo(org.eclipse.wb.internal.core.databinding.model.IBindingInfo) ViewerObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.observables.ViewerObservableInfo) CompositeInfo(org.eclipse.wb.internal.swt.model.widgets.CompositeInfo)

Example 27 with IBindingInfo

use of org.eclipse.wb.internal.core.databinding.model.IBindingInfo in project windowbuilder by eclipse.

the class ViewerObservableTest method test_Viewer_TreeInput_Set_InputCollection.

public void test_Viewer_TreeInput_Set_InputCollection() throws Exception {
    DataBindingsCodeUtils.ensureDesignerResources(m_testProject.getJavaProject());
    // 
    setFileContentSrc("test/TestBean.java", getSourceDQ("package test;", "public class TestBean {", "  public String getName() {", "    return null;", "  }", "  public java.util.List getBeans() {", "    return null;", "  }", "  public TestBean getParent() {", "    return null;", "  }", "  public boolean getHasChildren() {", "    return false;", "  }", "  public org.eclipse.swt.graphics.Image getImage() {", "    return null;", "  }", "}"));
    waitForAutoBuild();
    // 
    CompositeInfo shell = DatabindingTestUtils.parseTestSource(this, new String[] { "import org.eclipse.wb.rcp.databinding.BeansSetObservableFactory;", "import org.eclipse.wb.rcp.databinding.TreeBeanAdvisor;", "import org.eclipse.wb.rcp.databinding.TreeObservableLabelProvider;", "public class Test {", "  private DataBindingContext m_bindingContext;", "  protected Shell m_shell;", "  private TreeViewer m_viewer;", "  private java.util.Set m_beans;", "  public static void main(String[] args) {", "    Test test = new Test();", "    test.open();", "  }", "  public void open() {", "    Display display = new Display();", "    createContents();", "    m_shell.open();", "    m_shell.layout();", "    while (!m_shell.isDisposed()) {", "      if (!display.readAndDispatch()) {", "        display.sleep();", "      }", "    }", "  }", "  protected void createContents() {", "    m_shell = new Shell();", "    m_shell.setLayout(new GridLayout());", "    m_viewer = new TreeViewer(m_shell, SWT.BORDER);", "    m_bindingContext = initDataBindings();", "  }", "  private DataBindingContext initDataBindings() {", "    DataBindingContext bindingContext = new DataBindingContext();", "    //", "    BeansSetObservableFactory treeViewerFactorySet = new BeansSetObservableFactory(TestBean.class, \"beans\");", "    TreeBeanAdvisor treeViewerAdvisor = new TreeBeanAdvisor(TestBean.class, \"parent\", \"beans\", \"hasChildren\");", "    ObservableSetTreeContentProvider treeViewerContentProviderSet = new ObservableSetTreeContentProvider(treeViewerFactorySet, treeViewerAdvisor);", "    m_viewer.setContentProvider(treeViewerContentProviderSet);", "    //", "    m_viewer.setLabelProvider(new TreeObservableLabelProvider(treeViewerContentProviderSet.getKnownElements(), TestBean.class, \"name\", \"image\"));", "    //", "    WritableSet beansWritableSet = new WritableSet(m_beans, TestBean.class);", "    m_viewer.setInput(beansWritableSet);", "    //", "    return bindingContext;", "  }", "}" });
    assertNotNull(shell);
    // 
    DatabindingsProvider provider = getDatabindingsProvider();
    // 
    IObserveInfo shellObserve = provider.getObserves(ObserveType.WIDGETS).get(0);
    IObserveInfo viewerObserve = shellObserve.getChildren(ChildrenContext.ChildrenForMasterTable).get(0).getChildren(ChildrenContext.ChildrenForMasterTable).get(0);
    IObserveInfo viewerInputProperty = viewerObserve.getChildren(ChildrenContext.ChildrenForPropertiesTable).get(4);
    // 
    IObserveInfo beanObserve = provider.getObserves(ObserveType.BEANS).get(3);
    IObserveInfo beanInputCollectionProperty = beanObserve.getChildren(ChildrenContext.ChildrenForPropertiesTable).get(0);
    // 
    List<IBindingInfo> bindings = provider.getBindings();
    assertEquals(1, bindings.size());
    assertInstanceOf(TreeViewerInputBindingInfo.class, bindings.get(0));
    // 
    TreeViewerInputBindingInfo binding = (TreeViewerInputBindingInfo) bindings.get(0);
    // 
    assertSame(viewerObserve, binding.getViewer());
    assertSame(viewerObserve, binding.getTarget());
    assertSame(viewerInputProperty, binding.getTargetProperty());
    // 
    assertSame(beanObserve, binding.getModel());
    assertSame(beanInputCollectionProperty, binding.getModelProperty());
    // 
    assertNotNull(binding.getInputObservable());
    assertInstanceOf(WritableSetBeanObservableInfo.class, binding.getInputObservable());
    // 
    ObservableInfo inputObservable = binding.getInputObservable();
    assertSame(beanObserve, inputObservable.getBindableObject());
    assertSame(beanInputCollectionProperty, inputObservable.getBindableProperty());
    // 
    assertEquals("WritableSet(m_beans, TestBean.class)", inputObservable.getPresentationText());
    // 
    assertNull(binding.getVariableIdentifier());
    assertEquals("m_viewer.input(ObservableSetTreeContentProvider[parent, beans, hasChildren], TreeObservableLabelProvider[name, image])", binding.getPresentationText());
    // 
    assertNotNull(binding.getElementType());
    assertEquals("test.TestBean", binding.getElementType().getName());
    // 
    assertNotNull(binding.getLabelProvider());
    assertInstanceOf(TreeObservableLabelProviderInfo.class, binding.getLabelProvider());
    // 
    TreeObservableLabelProviderInfo labelProvider = (TreeObservableLabelProviderInfo) binding.getLabelProvider();
    assertEquals("org.eclipse.wb.rcp.databinding.TreeObservableLabelProvider", labelProvider.getClassName());
    assertSame(binding.getElementType(), ReflectionUtils.getFieldObject(labelProvider, "m_elementType"));
    assertEquals("name", labelProvider.getTextProperty());
    assertEquals("image", labelProvider.getImageProperty());
    // 
    assertInstanceOf(KnownElementsObservableInfo.class, ReflectionUtils.getFieldObject(labelProvider, "m_allElementsObservable"));
    // 
    KnownElementsObservableInfo knownElementsObservableInfo = (KnownElementsObservableInfo) ReflectionUtils.getFieldObject(labelProvider, "m_allElementsObservable");
    assertNull(knownElementsObservableInfo.getBindableObject());
    assertNull(knownElementsObservableInfo.getBindableProperty());
    // 
    assertNotNull(knownElementsObservableInfo.getParent());
    assertSame(knownElementsObservableInfo.getParent(), binding.getContentProvider());
    // 
    assertInstanceOf(ObservableSetTreeContentProviderInfo.class, binding.getContentProvider());
    // 
    ObservableSetTreeContentProviderInfo contentProvider = (ObservableSetTreeContentProviderInfo) binding.getContentProvider();
    assertEquals("org.eclipse.jface.databinding.viewers.ObservableSetTreeContentProvider", contentProvider.getClassName());
    assertEquals("ObservableSetTreeContentProvider[parent, beans, hasChildren]", contentProvider.getPresentationText());
    // 
    assertNotNull(contentProvider.getFactoryInfo());
    assertInstanceOf(BeansSetObservableFactoryInfo.class, contentProvider.getFactoryInfo());
    // 
    BeansSetObservableFactoryInfo factory = (BeansSetObservableFactoryInfo) contentProvider.getFactoryInfo();
    assertSame(factory.getElementType(), binding.getElementType());
    assertEquals("beans", ReflectionUtils.getFieldString(factory, "m_propertyName"));
    assertEquals("org.eclipse.wb.rcp.databinding.BeansSetObservableFactory", factory.getClassName());
    // 
    assertNotNull(contentProvider.getAdvisorInfo());
    assertInstanceOf(TreeBeanAdvisorInfo.class, contentProvider.getAdvisorInfo());
    // 
    TreeBeanAdvisorInfo advisor = (TreeBeanAdvisorInfo) contentProvider.getAdvisorInfo();
    assertEquals("org.eclipse.wb.rcp.databinding.TreeBeanAdvisor", advisor.getClassName());
    assertEquals("parent", advisor.getParentProperty());
    assertEquals("beans", advisor.getChildrenProperty());
    assertEquals("hasChildren", advisor.getHasChildrenProperty());
}
Also used : IObserveInfo(org.eclipse.wb.internal.core.databinding.model.IObserveInfo) CheckedElementsObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.observables.CheckedElementsObservableInfo) DetailListBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.DetailListBeanObservableInfo) SetBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.SetBeanObservableInfo) SingleSelectionObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.observables.SingleSelectionObservableInfo) MultiSelectionObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.observables.MultiSelectionObservableInfo) KnownElementsObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.input.KnownElementsObservableInfo) WritableSetBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.WritableSetBeanObservableInfo) ObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.ObservableInfo) MapsBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.MapsBeanObservableInfo) DetailSetBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.DetailSetBeanObservableInfo) WritableListBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.WritableListBeanObservableInfo) ListBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.ListBeanObservableInfo) ViewerObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.observables.ViewerObservableInfo) TreeObservableLabelProviderInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.input.designer.TreeObservableLabelProviderInfo) ObservableSetTreeContentProviderInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.input.ObservableSetTreeContentProviderInfo) BeansSetObservableFactoryInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.input.designer.BeansSetObservableFactoryInfo) TreeBeanAdvisorInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.input.designer.TreeBeanAdvisorInfo) IBindingInfo(org.eclipse.wb.internal.core.databinding.model.IBindingInfo) DatabindingsProvider(org.eclipse.wb.internal.rcp.databinding.DatabindingsProvider) KnownElementsObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.input.KnownElementsObservableInfo) CompositeInfo(org.eclipse.wb.internal.swt.model.widgets.CompositeInfo) TreeViewerInputBindingInfo(org.eclipse.wb.internal.rcp.databinding.model.widgets.input.TreeViewerInputBindingInfo)

Example 28 with IBindingInfo

use of org.eclipse.wb.internal.core.databinding.model.IBindingInfo in project windowbuilder by eclipse.

the class BeanObservableTest method observeDetailValue.

private void observeDetailValue(String line) throws Exception {
    setFileContentSrc("test/TestBean.java", getSourceDQ("package test;", "public class TestBean {", "  public String getName() {", "    return null;", "  }", "  public int getValue() {", "    return 0;", "  }", "}"));
    waitForAutoBuild();
    // 
    CompositeInfo shell = DatabindingTestUtils.parseTestSource(this, new String[] { "public class Test {", "  protected Shell m_shell;", "  private DataBindingContext m_bindingContext;", "  private TestBean m_bean0;", "  public static void main(String[] args) {", "    Test test = new Test();", "    test.open();", "  }", "  public void open() {", "    Display display = new Display();", "    createContents();", "    m_shell.open();", "    m_shell.layout();", "    while (!m_shell.isDisposed()) {", "      if (!display.readAndDispatch()) {", "        display.sleep();", "      }", "    }", "  }", "  protected void createContents() {", "    m_shell = new Shell();", "    m_bindingContext = initDataBindings();", "  }", "  private DataBindingContext initDataBindings() {", "    IObservableValue observeValue0 = BeansObservables.observeValue(m_bean0, \"name\");", line, "    IObservableValue observeValue1 = BeansObservables.observeValue(getBean1(), \"value\");", "    DataBindingContext bindingContext = new DataBindingContext();", "    bindingContext.bindValue(observeDetailsValue, observeValue1, null, null);", "    return bindingContext;", "  }", "  public TestBean getBean1() {", "    return null;", "  }", "}" });
    assertNotNull(shell);
    // 
    DatabindingsProvider provider = getDatabindingsProvider();
    List<IBindingInfo> bindings = provider.getBindings();
    // 
    assertNotNull(bindings);
    assertEquals(1, bindings.size());
    // 
    BindingInfo binding = (BindingInfo) bindings.get(0);
    // 
    assertInstanceOf(DetailValueBeanObservableInfo.class, binding.getTargetObservable());
    DetailValueBeanObservableInfo targetObservable = (DetailValueBeanObservableInfo) binding.getTargetObservable();
    // 
    assertNotNull(targetObservable.getMasterObservable());
    assertInstanceOf(ValueBeanObservableInfo.class, targetObservable.getMasterObservable());
    // 
    assertSame(targetObservable.getMasterObservable().getBindableObject(), targetObservable.getBindableObject());
    BeanBindableTest.assertBindable(FieldBeanBindableInfo.class, null, true, "m_bean0 - TestBean|m_bean0|test.TestBean", targetObservable.getBindableObject());
    // 
    assertSame(targetObservable.getMasterObservable().getBindableProperty(), targetObservable.getBindableProperty());
    BeanBindableTest.assertBindable(BeanPropertyDescriptorBindableInfo.class, null, true, "name|\"name\"|java.lang.String", targetObservable.getBindableProperty());
    // 
    assertEquals("\"empty\"", targetObservable.getDetailPropertyReference());
    // 
    assertNotNull(targetObservable.getDetailPropertyType());
    assertEquals("boolean", targetObservable.getDetailPropertyType().getName());
    // 
    assertEquals("m_bean0.name.detailValue(\"empty\", boolean.class)", targetObservable.getPresentationText());
}
Also used : IBindingInfo(org.eclipse.wb.internal.core.databinding.model.IBindingInfo) DatabindingsProvider(org.eclipse.wb.internal.rcp.databinding.DatabindingsProvider) BindingInfo(org.eclipse.wb.internal.rcp.databinding.model.context.BindingInfo) IBindingInfo(org.eclipse.wb.internal.core.databinding.model.IBindingInfo) DetailValueBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.DetailValueBeanObservableInfo) CompositeInfo(org.eclipse.wb.internal.swt.model.widgets.CompositeInfo)

Example 29 with IBindingInfo

use of org.eclipse.wb.internal.core.databinding.model.IBindingInfo in project windowbuilder by eclipse.

the class BeanObservableTest method test_directObservable_detail.

public void test_directObservable_detail() throws Exception {
    CompositeInfo shell = DatabindingTestUtils.parseTestSource(this, new String[] { "public class Test {", "  protected Shell m_shell;", "  private DataBindingContext m_bindingContext;", "  private WritableValue m_value;", "  public static void main(String[] args) {", "    Test test = new Test();", "    test.open();", "  }", "  public void open() {", "    Display display = new Display();", "    createContents();", "    m_shell.open();", "    m_shell.layout();", "    while (!m_shell.isDisposed()) {", "      if (!display.readAndDispatch()) {", "        display.sleep();", "      }", "    }", "  }", "  protected void createContents() {", "    m_shell = new Shell();", "    m_bindingContext = initDataBindings();", "  }", "  private DataBindingContext initDataBindings() {", "    DataBindingContext bindingContext = new DataBindingContext();", "    IObservableValue observeWidget = SWTObservables.observeText(m_shell);", "    IObservableValue observeDetail = BeansObservables.observeDetailValue(m_value, \"name\", String.class);", "    bindingContext.bindValue(observeWidget, observeDetail, null, null);", "    return bindingContext;", "  }", "}" });
    assertNotNull(shell);
    // 
    DatabindingsProvider provider = getDatabindingsProvider();
    List<IBindingInfo> bindings = provider.getBindings();
    // 
    assertNotNull(bindings);
    assertEquals(1, bindings.size());
    // 
    BindingInfo binding = (BindingInfo) bindings.get(0);
    assertInstanceOf(DetailValueBeanObservableInfo.class, binding.getModelObservable());
    DetailValueBeanObservableInfo modelObservable = (DetailValueBeanObservableInfo) binding.getModelObservable();
    // 
    assertNotNull(modelObservable.getMasterObservable());
    assertInstanceOf(DirectObservableInfo.class, modelObservable.getMasterObservable());
    // 
    assertSame(modelObservable.getMasterObservable().getBindableObject(), modelObservable.getBindableObject());
    BeanBindableTest.assertBindable(FieldBeanBindableInfo.class, null, true, "m_value - WritableValue|m_value|org.eclipse.core.databinding.observable.value.WritableValue", modelObservable.getBindableObject());
    // 
    assertSame(modelObservable.getMasterObservable().getBindableProperty(), modelObservable.getBindableProperty());
    BeanBindableTest.assertBindable(DirectPropertyBindableInfo.class, null, false, "Detail for IObservableValue||org.eclipse.core.databinding.observable.value.WritableValue", modelObservable.getBindableProperty());
    // 
    assertEquals("\"name\"", modelObservable.getDetailPropertyReference());
    // 
    assertNotNull(modelObservable.getDetailPropertyType());
    assertEquals("java.lang.String", modelObservable.getDetailPropertyType().getName());
}
Also used : IBindingInfo(org.eclipse.wb.internal.core.databinding.model.IBindingInfo) DatabindingsProvider(org.eclipse.wb.internal.rcp.databinding.DatabindingsProvider) BindingInfo(org.eclipse.wb.internal.rcp.databinding.model.context.BindingInfo) IBindingInfo(org.eclipse.wb.internal.core.databinding.model.IBindingInfo) DetailValueBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.DetailValueBeanObservableInfo) CompositeInfo(org.eclipse.wb.internal.swt.model.widgets.CompositeInfo)

Example 30 with IBindingInfo

use of org.eclipse.wb.internal.core.databinding.model.IBindingInfo in project windowbuilder by eclipse.

the class BeanObservableTest method observeSet.

private void observeSet(String line0, String line1) throws Exception {
    setFileContentSrc("test/TestBean.java", getSourceDQ("package test;", "public class TestBean {", "  public java.util.Set getNames() {", "    return null;", "  }", "}"));
    waitForAutoBuild();
    // 
    CompositeInfo shell = DatabindingTestUtils.parseTestSource(this, new String[] { "public class Test {", "  protected Shell m_shell;", "  private DataBindingContext m_bindingContext;", "  private TestBean m_bean0;", "  public static void main(String[] args) {", "    Test test = new Test();", "    test.open();", "  }", "  public void open() {", "    Display display = new Display();", "    createContents();", "    m_shell.open();", "    m_shell.layout();", "    while (!m_shell.isDisposed()) {", "      if (!display.readAndDispatch()) {", "        display.sleep();", "      }", "    }", "  }", "  protected void createContents() {", "    m_shell = new Shell();", "    m_bindingContext = initDataBindings();", "  }", "  private DataBindingContext initDataBindings() {", line0, line1, "    DataBindingContext bindingContext = new DataBindingContext();", "    bindingContext.bindSet(observeSet0, observeSet1, null, null);", "    return bindingContext;", "  }", "  public TestBean getBean1() {", "    return null;", "  }", "}" });
    assertNotNull(shell);
    // 
    DatabindingsProvider provider = getDatabindingsProvider();
    List<IBindingInfo> bindings = provider.getBindings();
    // 
    assertNotNull(bindings);
    assertEquals(1, bindings.size());
    // 
    BindingInfo binding = (BindingInfo) bindings.get(0);
    // 
    assertInstanceOf(SetBeanObservableInfo.class, binding.getTargetObservable());
    SetBeanObservableInfo targetObservable = (SetBeanObservableInfo) binding.getTargetObservable();
    // 
    assertEquals("observeSet0", targetObservable.getVariableIdentifier());
    assertEquals("m_bean0.names(Set)", targetObservable.getPresentationText());
    // 
    BeanBindableTest.assertBindable(FieldBeanBindableInfo.class, null, true, "m_bean0 - TestBean|m_bean0|test.TestBean", targetObservable.getBindableObject());
    BeanBindableTest.assertBindable(BeanPropertyDescriptorBindableInfo.class, null, true, "names|\"names\"|java.util.Set", targetObservable.getBindableProperty());
    // 
    assertInstanceOf(SetBeanObservableInfo.class, binding.getModelObservable());
    SetBeanObservableInfo modelObservable = (SetBeanObservableInfo) binding.getModelObservable();
    // 
    assertEquals("observeSet1", modelObservable.getVariableIdentifier());
    assertEquals("getBean1().names(Set)", modelObservable.getPresentationText());
    // 
    BeanBindableTest.assertBindable(MethodBeanBindableInfo.class, null, true, "getBean1()|getBean1()|test.TestBean", modelObservable.getBindableObject());
    BeanBindableTest.assertBindable(BeanPropertyDescriptorBindableInfo.class, null, true, "names|\"names\"|java.util.Set", modelObservable.getBindableProperty());
}
Also used : SetBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.SetBeanObservableInfo) WritableSetBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.WritableSetBeanObservableInfo) DetailSetBeanObservableInfo(org.eclipse.wb.internal.rcp.databinding.model.beans.observables.DetailSetBeanObservableInfo) IBindingInfo(org.eclipse.wb.internal.core.databinding.model.IBindingInfo) DatabindingsProvider(org.eclipse.wb.internal.rcp.databinding.DatabindingsProvider) BindingInfo(org.eclipse.wb.internal.rcp.databinding.model.context.BindingInfo) IBindingInfo(org.eclipse.wb.internal.core.databinding.model.IBindingInfo) CompositeInfo(org.eclipse.wb.internal.swt.model.widgets.CompositeInfo)

Aggregations

IBindingInfo (org.eclipse.wb.internal.core.databinding.model.IBindingInfo)81 DatabindingsProvider (org.eclipse.wb.internal.rcp.databinding.DatabindingsProvider)51 CompositeInfo (org.eclipse.wb.internal.swt.model.widgets.CompositeInfo)48 BindingInfo (org.eclipse.wb.internal.rcp.databinding.model.context.BindingInfo)38 IObserveInfo (org.eclipse.wb.internal.core.databinding.model.IObserveInfo)18 TreeViewerInputBindingInfo (org.eclipse.wb.internal.rcp.databinding.model.widgets.input.TreeViewerInputBindingInfo)16 DetailListBeanObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.beans.observables.DetailListBeanObservableInfo)14 DetailSetBeanObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.beans.observables.DetailSetBeanObservableInfo)14 ListBeanObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.beans.observables.ListBeanObservableInfo)14 SetBeanObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.beans.observables.SetBeanObservableInfo)14 WritableListBeanObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.beans.observables.WritableListBeanObservableInfo)14 WritableSetBeanObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.beans.observables.WritableSetBeanObservableInfo)14 ObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.ObservableInfo)13 CheckedElementsObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.widgets.observables.CheckedElementsObservableInfo)13 ViewerObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.widgets.observables.ViewerObservableInfo)13 MapsBeanObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.beans.observables.MapsBeanObservableInfo)12 KnownElementsObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.widgets.input.KnownElementsObservableInfo)12 ViewerInputBindingInfo (org.eclipse.wb.internal.rcp.databinding.model.widgets.input.ViewerInputBindingInfo)12 MultiSelectionObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.widgets.observables.MultiSelectionObservableInfo)12 SingleSelectionObservableInfo (org.eclipse.wb.internal.rcp.databinding.model.widgets.observables.SingleSelectionObservableInfo)12