Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 152957 Details for
Bug 296011
[DataBinding] Observe detail value with interface type causes BindingException
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Java code demonstrating the bug
Bug.java (text/plain), 2.26 KB, created by
Tillmann Seidel
on 2009-11-24 10:26:10 EST
(
hide
)
Description:
Java code demonstrating the bug
Filename:
MIME Type:
Creator:
Tillmann Seidel
Created:
2009-11-24 10:26:10 EST
Size:
2.26 KB
patch
obsolete
>/******************************************************************************* > * Copyright (c) 2006, 2009 The Pampered Chef, Inc. and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at > * http://www.eclipse.org/legal/epl-v10.html > * > * Contributors: > * The Pampered Chef, Inc. - initial API and implementation > * Brad Reynolds - bug 116920 > * Benjamin Cabe - bug 252219 > * Matthew Hall - bug 260329 > ******************************************************************************/ > >package databindingbug; > >import java.beans.PropertyChangeListener; > >import org.eclipse.core.databinding.beans.BeansObservables; >import org.eclipse.core.databinding.observable.Realm; >import org.eclipse.core.databinding.observable.value.IObservableValue; >import org.eclipse.jface.databinding.swt.SWTObservables; >import org.eclipse.swt.widgets.Display; > >public class Bug { > public static void main(final String[] args) { > Display display = new Display(); > > Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() { > public void run() { > Master master = new Bug().new Master(); > IObservableValue masterObservable = BeansObservables.observeValue(master, "child"); > BeansObservables > .observeDetailValue(masterObservable.getRealm(), masterObservable, "name", String.class); //$NON-NLS-1$ > } > }); > > } > > class Master { > > public void addPropertyChangeListener(final PropertyChangeListener listener) { > > } > > public IChild getChild() { > return new IChild() { > > public void addPropertyChangeListener(final PropertyChangeListener listener) { > > } > > @Override > public String getName() { > return "foobar"; > } > > }; > } > > } > > interface IParent { > > String getName(); > > } > > interface IChild extends IParent { > > // Copy the parent method here to make it work > // String getName(); > > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 296011
: 152957