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 121141 Details for
Bug 194734
[Databinding] Property-based observables
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.
[patch]
Abandoned experiment
clipboard.txt (text/plain), 52.07 KB, created by
Matthew Hall
on 2008-12-23 10:07:15 EST
(
hide
)
Description:
Abandoned experiment
Filename:
MIME Type:
Creator:
Matthew Hall
Created:
2008-12-23 10:07:15 EST
Size:
52.07 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.core.databinding >Index: src/org/eclipse/core/databinding/property/set/SimpleSetPropertyObservableSet.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding/src/org/eclipse/core/databinding/property/set/Attic/SimpleSetPropertyObservableSet.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 SimpleSetPropertyObservableSet.java >--- src/org/eclipse/core/databinding/property/set/SimpleSetPropertyObservableSet.java 20 Dec 2008 07:00:29 -0000 1.1.2.2 >+++ src/org/eclipse/core/databinding/property/set/SimpleSetPropertyObservableSet.java 23 Dec 2008 14:58:12 -0000 >@@ -151,21 +151,20 @@ > Collections.EMPTY_SET); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setSet(source, set, diff); >+ diff = property.setSet(source, set, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedSet = getSet(); > fireSetChange(diff); > } > >- return changed; >+ return diff != null; > } > > public Iterator iterator() { >@@ -198,16 +197,15 @@ > Collections.singleton(last)); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setSet(source, set, diff); >+ diff = property.setSet(source, set, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedSet = getSet(); > fireSetChange(diff); > >@@ -234,21 +232,20 @@ > .singleton(o)); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setSet(source, set, diff); >+ diff = property.setSet(source, set, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedSet = property.getSet(source); > fireSetChange(diff); > } > >- return changed; >+ return diff != null; > } > > // Bulk change operations >@@ -274,21 +271,20 @@ > SetDiff diff = Diffs.createSetDiff(additions, Collections.EMPTY_SET); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setSet(source, set, diff); >+ diff = property.setSet(source, set, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedSet = property.getSet(source); > fireSetChange(diff); > } > >- return changed; >+ return diff != null; > } > > public boolean removeAll(Collection c) { >@@ -315,21 +311,20 @@ > SetDiff diff = Diffs.createSetDiff(Collections.EMPTY_SET, removals); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setSet(source, set, diff); >+ diff = property.setSet(source, set, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedSet = property.getSet(source); > fireSetChange(diff); > } > >- return changed; >+ return diff != null; > } > > public boolean retainAll(Collection c) { >@@ -361,21 +356,20 @@ > SetDiff diff = Diffs.createSetDiff(Collections.EMPTY_SET, removals); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setSet(source, set, diff); >+ diff = property.setSet(source, set, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedSet = property.getSet(source); > fireSetChange(diff); > } > >- return changed; >+ return diff != null; > } > > public void clear() { >@@ -388,16 +382,15 @@ > SetDiff diff = Diffs.createSetDiff(Collections.EMPTY_SET, set); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setSet(source, Collections.EMPTY_SET, diff); >+ diff = property.setSet(source, Collections.EMPTY_SET, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedSet = property.getSet(source); > fireSetChange(diff); > } >Index: src/org/eclipse/core/databinding/property/set/SimpleSetProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding/src/org/eclipse/core/databinding/property/set/Attic/SimpleSetProperty.java,v >retrieving revision 1.1.2.3 >diff -u -r1.1.2.3 SimpleSetProperty.java >--- src/org/eclipse/core/databinding/property/set/SimpleSetProperty.java 20 Dec 2008 07:00:29 -0000 1.1.2.3 >+++ src/org/eclipse/core/databinding/property/set/SimpleSetProperty.java 23 Dec 2008 14:58:12 -0000 >@@ -105,11 +105,11 @@ > * the new set > * @param diff > * a diff describing the change >- * @return true if the property was modified on the source object, false >- * otherwise >+ * @return a SetDiff describing the change that was made, or null if no >+ * change could be made. > * @noreference This method is not intended to be referenced by clients. > */ >- protected abstract boolean setSet(Object source, Set set, SetDiff diff); >+ protected abstract SetDiff setSet(Object source, Set set, SetDiff diff); > > // Listeners > >Index: src/org/eclipse/core/databinding/property/map/SimpleMapProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding/src/org/eclipse/core/databinding/property/map/Attic/SimpleMapProperty.java,v >retrieving revision 1.1.2.4 >diff -u -r1.1.2.4 SimpleMapProperty.java >--- src/org/eclipse/core/databinding/property/map/SimpleMapProperty.java 20 Dec 2008 07:00:29 -0000 1.1.2.4 >+++ src/org/eclipse/core/databinding/property/map/SimpleMapProperty.java 23 Dec 2008 14:58:12 -0000 >@@ -114,11 +114,11 @@ > * the new map > * @param diff > * a diff describing the change >- * @return true if the property was modified on the source object, false >- * otherwise >+ * @return a MapDiff describing the change that was made, or null if no >+ * change could be made. > * @noreference This method is not intended to be referenced by clients. > */ >- protected abstract boolean setMap(Object source, Map map, MapDiff diff); >+ protected abstract MapDiff setMap(Object source, Map map, MapDiff diff); > > // Listeners > >Index: src/org/eclipse/core/databinding/property/map/SimpleMapPropertyObservableMap.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding/src/org/eclipse/core/databinding/property/map/Attic/SimpleMapPropertyObservableMap.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 SimpleMapPropertyObservableMap.java >--- src/org/eclipse/core/databinding/property/map/SimpleMapPropertyObservableMap.java 20 Dec 2008 07:00:29 -0000 1.1.2.2 >+++ src/org/eclipse/core/databinding/property/map/SimpleMapPropertyObservableMap.java 23 Dec 2008 14:58:12 -0000 >@@ -163,15 +163,14 @@ > .getValue()); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setMap(source, map, diff); >+ diff = property.setMap(source, map, diff); > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedMap = getMap(); > fireMapChange(diff); > >@@ -209,16 +208,15 @@ > diff = Diffs.createMapDiffSingleChange(key, oldValue, value); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setMap(source, map, diff); >+ diff = property.setMap(source, map, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedMap = property.getMap(source); > fireMapChange(diff); > } >@@ -254,16 +252,15 @@ > changedKeys, oldValues, newValues); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setMap(source, map, diff); >+ diff = property.setMap(source, map, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedMap = getMap(); > fireMapChange(diff); > } >Index: src/org/eclipse/core/databinding/property/value/ObservableListSimpleValuePropertyObservableList.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding/src/org/eclipse/core/databinding/property/value/Attic/ObservableListSimpleValuePropertyObservableList.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 ObservableListSimpleValuePropertyObservableList.java >--- src/org/eclipse/core/databinding/property/value/ObservableListSimpleValuePropertyObservableList.java 20 Dec 2008 07:00:29 -0000 1.1.2.2 >+++ src/org/eclipse/core/databinding/property/value/ObservableListSimpleValuePropertyObservableList.java 23 Dec 2008 14:58:12 -0000 >@@ -37,6 +37,7 @@ > import org.eclipse.core.databinding.observable.set.ISetChangeListener; > import org.eclipse.core.databinding.observable.set.SetChangeEvent; > import org.eclipse.core.databinding.observable.set.WritableSet; >+import org.eclipse.core.databinding.observable.value.ValueDiff; > import org.eclipse.core.databinding.property.INativePropertyListener; > import org.eclipse.core.internal.databinding.IdentityWrapper; > import org.eclipse.core.internal.databinding.Util; >@@ -378,15 +379,16 @@ > lastMasterElement)); > > boolean wasUpdating = updating; >- boolean changed; >+ ValueDiff diff; > updating = true; > try { >- changed = detailProperty.setValue(lastElement, o); >+ diff = detailProperty.setValue(lastElement, o, Diffs >+ .createValueDiff(oldValue, o)); > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > Object newValue = detailProperty.getValue(lastElement); > > if (!Util.equals(oldValue, newValue)) { >@@ -414,15 +416,16 @@ > Object oldValue = detailProperty.getValue(masterElement); > > boolean wasUpdating = updating; >- boolean changed; >+ ValueDiff diff; > updating = true; > try { >- changed = detailProperty.setValue(masterElement, o); >+ diff = detailProperty.setValue(masterElement, o, Diffs >+ .createValueDiff(oldValue, o)); > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > Object newValue = detailProperty.getValue(masterElement); > > if (!Util.equals(oldValue, newValue)) { >Index: src/org/eclipse/core/databinding/property/value/ObservableSetSimpleValuePropertyObservableMap.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding/src/org/eclipse/core/databinding/property/value/Attic/ObservableSetSimpleValuePropertyObservableMap.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 ObservableSetSimpleValuePropertyObservableMap.java >--- src/org/eclipse/core/databinding/property/value/ObservableSetSimpleValuePropertyObservableMap.java 20 Dec 2008 07:00:28 -0000 1.1.2.2 >+++ src/org/eclipse/core/databinding/property/value/ObservableSetSimpleValuePropertyObservableMap.java 23 Dec 2008 14:58:12 -0000 >@@ -106,18 +106,18 @@ > protected Object doPut(Object key, Object value) { > Object oldValue = detailProperty.getValue(key); > >- boolean changed; >+ ValueDiff diff = Diffs.createValueDiff(oldValue, value); > updating = true; > try { >- changed = detailProperty.setValue(key, value); >+ diff = detailProperty.setValue(key, value, diff); > } finally { > updating = false; > } >- >- if (changed) { >+ >+ if (diff != null) { > Object newValue = detailProperty.getValue(key); > cachedValues.put(key, newValue); >- >+ > if (oldValue != newValue) { > fireMapChange(Diffs.createMapDiffSingleChange(key, oldValue, > newValue)); >Index: src/org/eclipse/core/databinding/property/value/ObservableMapSimpleValuePropertyObservableMap.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding/src/org/eclipse/core/databinding/property/value/Attic/ObservableMapSimpleValuePropertyObservableMap.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 ObservableMapSimpleValuePropertyObservableMap.java >--- src/org/eclipse/core/databinding/property/value/ObservableMapSimpleValuePropertyObservableMap.java 20 Dec 2008 07:00:29 -0000 1.1.2.2 >+++ src/org/eclipse/core/databinding/property/value/ObservableMapSimpleValuePropertyObservableMap.java 23 Dec 2008 14:58:12 -0000 >@@ -33,6 +33,7 @@ > import org.eclipse.core.databinding.observable.set.ISetChangeListener; > import org.eclipse.core.databinding.observable.set.SetChangeEvent; > import org.eclipse.core.databinding.observable.set.WritableSet; >+import org.eclipse.core.databinding.observable.value.ValueDiff; > import org.eclipse.core.databinding.property.INativePropertyListener; > import org.eclipse.core.internal.databinding.IdentityWrapper; > import org.eclipse.core.internal.databinding.Util; >@@ -283,20 +284,20 @@ > > Object oldValue = detailProperty.getValue(source); > >- boolean changed; >+ ValueDiff diff = Diffs.createValueDiff(oldValue, value); > updating = true; > try { >- changed = detailProperty.setValue(source, value); >+ diff = detailProperty.setValue(source, value, diff); > } finally { > updating = false; > } > >- if (changed) { >+ if (diff != null) { > Object newValue = detailProperty.getValue(source); >- >+ > if (!Util.equals(oldValue, newValue)) { >- fireMapChange(Diffs.createMapDiffSingleChange(key, oldValue, >- newValue)); >+ fireMapChange(Diffs.createMapDiffSingleChange(key, >+ oldValue, newValue)); > } > } > >Index: src/org/eclipse/core/databinding/property/value/SimpleValueProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding/src/org/eclipse/core/databinding/property/value/Attic/SimpleValueProperty.java,v >retrieving revision 1.1.2.4 >diff -u -r1.1.2.4 SimpleValueProperty.java >--- src/org/eclipse/core/databinding/property/value/SimpleValueProperty.java 20 Dec 2008 07:00:29 -0000 1.1.2.4 >+++ src/org/eclipse/core/databinding/property/value/SimpleValueProperty.java 23 Dec 2008 14:58:12 -0000 >@@ -19,6 +19,7 @@ > import org.eclipse.core.databinding.observable.masterdetail.MasterDetailObservables; > import org.eclipse.core.databinding.observable.set.IObservableSet; > import org.eclipse.core.databinding.observable.value.IObservableValue; >+import org.eclipse.core.databinding.observable.value.ValueDiff; > import org.eclipse.core.databinding.property.INativePropertyListener; > > /** >@@ -29,7 +30,7 @@ > * Subclasses must implement these methods: > * <ul> > * <li> {@link #getValue(Object)} >- * <li> {@link #setValue(Object, Object)} >+ * <li> {@link #setValue(Object, Object, ValueDiff)} > * <li> {@link #adaptListener(IValuePropertyChangeListener)} > * <li> {@link #addListener(Object, INativePropertyListener)} > * <li> {@link #removeListener(Object, INativePropertyListener)} >@@ -66,11 +67,12 @@ > * the property source > * @param value > * the new value >- * @return true if the property was modified on the source object, false >- * otherwise >+ * @param diff TODO >+ * @return a ValueDiff describing the change that was made, or null if no >+ * change could be made. > * @noreference This method is not intended to be referenced by clients. > */ >- protected abstract boolean setValue(Object source, Object value); >+ protected abstract ValueDiff setValue(Object source, Object value, ValueDiff diff); > > /** > * Returns a listener which implements the correct listener interface for >Index: src/org/eclipse/core/databinding/property/value/SimpleValuePropertyObservableValue.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding/src/org/eclipse/core/databinding/property/value/Attic/SimpleValuePropertyObservableValue.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 SimpleValuePropertyObservableValue.java >--- src/org/eclipse/core/databinding/property/value/SimpleValuePropertyObservableValue.java 20 Dec 2008 07:00:28 -0000 1.1.2.2 >+++ src/org/eclipse/core/databinding/property/value/SimpleValuePropertyObservableValue.java 23 Dec 2008 14:58:12 -0000 >@@ -102,25 +102,25 @@ > } > > protected void doSetValue(Object value) { >- if (hasListeners()) { >- Object oldValue = cachedValue; >+ Object oldValue = cachedValue; >+ ValueDiff diff = Diffs.createValueDiff(oldValue, value); > >- boolean changed; >+ if (hasListeners()) { > updating = true; > try { >- changed = property.setValue(source, value); >+ diff = property.setValue(source, value, diff); > } finally { > updating = false; > } > >- if (changed) { >+ if (diff != null) { > Object newValue = cachedValue = property.getValue(source); > if (hasListeners() && !Util.equals(oldValue, newValue)) { > fireValueChange(Diffs.createValueDiff(oldValue, newValue)); > } > } > } else { >- property.setValue(source, value); >+ property.setValue(source, value, diff); > } > } > >Index: src/org/eclipse/core/databinding/property/list/SimpleListProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding/src/org/eclipse/core/databinding/property/list/Attic/SimpleListProperty.java,v >retrieving revision 1.1.2.4 >diff -u -r1.1.2.4 SimpleListProperty.java >--- src/org/eclipse/core/databinding/property/list/SimpleListProperty.java 20 Dec 2008 07:00:28 -0000 1.1.2.4 >+++ src/org/eclipse/core/databinding/property/list/SimpleListProperty.java 23 Dec 2008 14:58:12 -0000 >@@ -105,11 +105,11 @@ > * the new list > * @param diff > * a diff describing the change >- * @return true if the property was modified on the source object, false >- * otherwise >+ * @return a ListDiff describing the change that was made, or null if no >+ * change could be made. > * @noreference This method is not intended to be referenced by clients. > */ >- protected abstract boolean setList(Object source, List list, ListDiff diff); >+ protected abstract ListDiff setList(Object source, List list, ListDiff diff); > > // Listeners > >Index: src/org/eclipse/core/databinding/property/list/SimpleListPropertyObservableList.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding/src/org/eclipse/core/databinding/property/list/Attic/SimpleListPropertyObservableList.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 SimpleListPropertyObservableList.java >--- src/org/eclipse/core/databinding/property/list/SimpleListPropertyObservableList.java 20 Dec 2008 07:00:28 -0000 1.1.2.2 >+++ src/org/eclipse/core/databinding/property/list/SimpleListPropertyObservableList.java 23 Dec 2008 14:58:12 -0000 >@@ -166,20 +166,19 @@ > public void add(int index, Object o) { > checkRealm(); > boolean wasUpdating = updating; >- boolean changed; > updating = true; > List list = new ArrayList(getList()); > list.add(index, o); > ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(index, > true, o)); > try { >- changed = property.setList(source, list, diff); >+ diff = property.setList(source, list, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedList = getList(); > fireListChange(diff); > } >@@ -220,16 +219,15 @@ > lastIndex, false, lastElement)); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setList(source, list, diff); >+ diff = property.setList(source, list, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedList = getList(); > fireListChange(diff); > >@@ -268,16 +266,15 @@ > true, element)); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setList(source, list, diff); >+ diff = property.setList(source, list, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedList = getList(); > fireListChange(diff); > } >@@ -363,16 +360,15 @@ > ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry( > index, true, o)); > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setList(source, list, diff); >+ diff = property.setList(source, list, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedList = getList(); > fireListChange(diff); > >@@ -392,16 +388,15 @@ > .createListDiffEntry(lastIndex, true, o)); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setList(source, list, diff); >+ diff = property.setList(source, list, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedList = getList(); > fireListChange(diff); > >@@ -422,16 +417,15 @@ > lastIndex, false, lastElement)); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setList(source, list, diff); >+ diff = property.setList(source, list, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedList = getList(); > fireListChange(diff); > >@@ -457,16 +451,15 @@ > false, element)); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setList(source, list, diff); >+ diff = property.setList(source, list, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedList = getList(); > fireListChange(diff); > } >@@ -484,16 +477,15 @@ > false, oldElement), Diffs.createListDiffEntry(index, true, o)); > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setList(source, list, diff); >+ diff = property.setList(source, list, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedList = getList(); > fireListChange(diff); > } >@@ -534,23 +526,21 @@ > } > ListDiff diff = Diffs.createListDiff(entries); > >- boolean changed; >- > boolean wasUpdating = updating; > updating = true; > try { >- changed = property.setList(source, list, diff); >+ diff = property.setList(source, list, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedList = getList(); > fireListChange(diff); > } > >- return changed; >+ return diff != null; > } > > public boolean removeAll(Collection c) { >@@ -568,7 +558,6 @@ > ListDiff diff; > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { > for (ListIterator it = list.listIterator(); it.hasNext();) { >@@ -585,18 +574,18 @@ > > diff = Diffs.createListDiff((ListDiffEntry[]) entries > .toArray(new ListDiffEntry[entries.size()])); >- changed = property.setList(source, list, diff); >+ diff = property.setList(source, list, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedList = getList(); > fireListChange(diff); > } > >- return changed; >+ return diff != null; > } > > public boolean retainAll(Collection c) { >@@ -616,7 +605,6 @@ > ListDiff diff; > > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { > for (ListIterator it = list.listIterator(); it.hasNext();) { >@@ -633,18 +621,18 @@ > > diff = Diffs.createListDiff((ListDiffEntry[]) entries > .toArray(new ListDiffEntry[entries.size()])); >- changed = property.setList(source, list, diff); >+ diff = property.setList(source, list, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedList = getList(); > fireListChange(diff); > } > >- return changed; >+ return diff != null; > } > > public void clear() { >@@ -663,16 +651,15 @@ > ListDiff diff = Diffs.createListDiff((ListDiffEntry[]) entries > .toArray(new ListDiffEntry[entries.size()])); > boolean wasUpdating = updating; >- boolean changed; > updating = true; > try { >- changed = property.setList(source, Collections.EMPTY_LIST, diff); >+ diff = property.setList(source, Collections.EMPTY_LIST, diff); > modCount++; > } finally { > updating = wasUpdating; > } > >- if (changed) { >+ if (diff != null) { > cachedList = getList(); > fireListChange(diff); > } >#P org.eclipse.core.databinding.beans >Index: src/org/eclipse/core/internal/databinding/beans/BeanSetProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/Attic/BeanSetProperty.java,v >retrieving revision 1.1.2.3 >diff -u -r1.1.2.3 BeanSetProperty.java >--- src/org/eclipse/core/internal/databinding/beans/BeanSetProperty.java 20 Dec 2008 07:00:20 -0000 1.1.2.3 >+++ src/org/eclipse/core/internal/databinding/beans/BeanSetProperty.java 23 Dec 2008 14:58:16 -0000 >@@ -68,12 +68,12 @@ > return (Set) propertyValue; > } > >- protected boolean setSet(Object source, Set set, SetDiff diff) { >+ protected SetDiff setSet(Object source, Set set, SetDiff diff) { > if (source == null) >- return false; >+ return null; > BeanPropertyHelper.writeProperty(source, propertyDescriptor, > convertSetToBeanPropertyType(set)); >- return true; >+ return diff; > } > > private Object convertSetToBeanPropertyType(Set set) { >Index: src/org/eclipse/core/internal/databinding/beans/PojoValueProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/Attic/PojoValueProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 PojoValueProperty.java >--- src/org/eclipse/core/internal/databinding/beans/PojoValueProperty.java 20 Dec 2008 07:00:20 -0000 1.1.2.2 >+++ src/org/eclipse/core/internal/databinding/beans/PojoValueProperty.java 23 Dec 2008 14:58:16 -0000 >@@ -14,6 +14,7 @@ > import java.beans.PropertyDescriptor; > > import org.eclipse.core.databinding.beans.IBeanProperty; >+import org.eclipse.core.databinding.observable.value.ValueDiff; > import org.eclipse.core.databinding.property.INativePropertyListener; > import org.eclipse.core.databinding.property.value.IValuePropertyChangeListener; > import org.eclipse.core.databinding.property.value.SimpleValueProperty; >@@ -48,11 +49,11 @@ > return BeanPropertyHelper.readProperty(source, propertyDescriptor); > } > >- public boolean setValue(Object source, Object value) { >+ public ValueDiff setValue(Object source, Object value, ValueDiff diff) { > if (source == null) >- return false; >+ return null; > BeanPropertyHelper.writeProperty(source, propertyDescriptor, value); >- return true; >+ return diff; > } > > public PropertyDescriptor getPropertyDescriptor() { >Index: src/org/eclipse/core/internal/databinding/beans/PojoSetProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/Attic/PojoSetProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 PojoSetProperty.java >--- src/org/eclipse/core/internal/databinding/beans/PojoSetProperty.java 20 Dec 2008 07:00:20 -0000 1.1.2.2 >+++ src/org/eclipse/core/internal/databinding/beans/PojoSetProperty.java 23 Dec 2008 14:58:16 -0000 >@@ -64,12 +64,12 @@ > return (Set) propertyValue; > } > >- protected boolean setSet(Object source, Set set, SetDiff diff) { >+ protected SetDiff setSet(Object source, Set set, SetDiff diff) { > if (source == null) >- return false; >+ return null; > BeanPropertyHelper.writeProperty(source, propertyDescriptor, > convertSetToBeanPropertyType(set)); >- return true; >+ return diff; > } > > private Object convertSetToBeanPropertyType(Set set) { >Index: src/org/eclipse/core/internal/databinding/beans/BeanListProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/Attic/BeanListProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 BeanListProperty.java >--- src/org/eclipse/core/internal/databinding/beans/BeanListProperty.java 20 Dec 2008 07:00:20 -0000 1.1.2.2 >+++ src/org/eclipse/core/internal/databinding/beans/BeanListProperty.java 23 Dec 2008 14:58:16 -0000 >@@ -69,12 +69,12 @@ > return (List) propertyValue; > } > >- protected boolean setList(Object source, List list, ListDiff diff) { >+ protected ListDiff setList(Object source, List list, ListDiff diff) { > if (source == null) >- return false; >+ return null; > BeanPropertyHelper.writeProperty(source, propertyDescriptor, > convertListToBeanPropertyType(list)); >- return true; >+ return diff; > } > > private Object convertListToBeanPropertyType(List list) { >Index: src/org/eclipse/core/internal/databinding/beans/PojoMapProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/Attic/PojoMapProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 PojoMapProperty.java >--- src/org/eclipse/core/internal/databinding/beans/PojoMapProperty.java 20 Dec 2008 07:00:20 -0000 1.1.2.2 >+++ src/org/eclipse/core/internal/databinding/beans/PojoMapProperty.java 23 Dec 2008 14:58:16 -0000 >@@ -65,11 +65,11 @@ > return (Map) propertyValue; > } > >- protected boolean setMap(Object source, Map map, MapDiff diff) { >+ protected MapDiff setMap(Object source, Map map, MapDiff diff) { > if (source == null) >- return false; >+ return null; > BeanPropertyHelper.writeProperty(source, propertyDescriptor, map); >- return true; >+ return diff; > } > > public PropertyDescriptor getPropertyDescriptor() { >Index: src/org/eclipse/core/internal/databinding/beans/BeanMapProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/Attic/BeanMapProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 BeanMapProperty.java >--- src/org/eclipse/core/internal/databinding/beans/BeanMapProperty.java 20 Dec 2008 07:00:20 -0000 1.1.2.2 >+++ src/org/eclipse/core/internal/databinding/beans/BeanMapProperty.java 23 Dec 2008 14:58:16 -0000 >@@ -69,11 +69,11 @@ > return (Map) propertyValue; > } > >- protected boolean setMap(Object source, Map map, MapDiff diff) { >+ protected MapDiff setMap(Object source, Map map, MapDiff diff) { > if (source == null) >- return false; >+ return null; > BeanPropertyHelper.writeProperty(source, propertyDescriptor, map); >- return true; >+ return diff; > } > > public PropertyDescriptor getPropertyDescriptor() { >Index: src/org/eclipse/core/internal/databinding/beans/PojoListProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/Attic/PojoListProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 PojoListProperty.java >--- src/org/eclipse/core/internal/databinding/beans/PojoListProperty.java 20 Dec 2008 07:00:20 -0000 1.1.2.2 >+++ src/org/eclipse/core/internal/databinding/beans/PojoListProperty.java 23 Dec 2008 14:58:16 -0000 >@@ -65,12 +65,12 @@ > return (List) propertyValue; > } > >- protected boolean setList(Object source, List list, ListDiff diff) { >+ protected ListDiff setList(Object source, List list, ListDiff diff) { > if (source == null) >- return false; >+ return null; > BeanPropertyHelper.writeProperty(source, propertyDescriptor, > convertListToBeanPropertyType(list)); >- return true; >+ return diff; > } > > private Object convertListToBeanPropertyType(List list) { >Index: src/org/eclipse/core/internal/databinding/beans/BeanValueProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/Attic/BeanValueProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 BeanValueProperty.java >--- src/org/eclipse/core/internal/databinding/beans/BeanValueProperty.java 20 Dec 2008 07:00:20 -0000 1.1.2.2 >+++ src/org/eclipse/core/internal/databinding/beans/BeanValueProperty.java 23 Dec 2008 14:58:16 -0000 >@@ -53,11 +53,11 @@ > return BeanPropertyHelper.readProperty(source, propertyDescriptor); > } > >- public boolean setValue(Object source, Object value) { >+ public ValueDiff setValue(Object source, Object value, ValueDiff diff) { > if (source == null) >- return false; >+ return null; > BeanPropertyHelper.writeProperty(source, propertyDescriptor, value); >- return true; >+ return diff; > } > > public PropertyDescriptor getPropertyDescriptor() { >#P org.eclipse.jface.databinding >Index: src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderSingleSelectionProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/Attic/SelectionProviderSingleSelectionProperty.java,v >retrieving revision 1.1.2.3 >diff -u -r1.1.2.3 SelectionProviderSingleSelectionProperty.java >--- src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderSingleSelectionProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.3 >+++ src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderSingleSelectionProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -11,6 +11,7 @@ > > package org.eclipse.jface.internal.databinding.viewers; > >+import org.eclipse.core.databinding.observable.value.ValueDiff; > import org.eclipse.core.databinding.property.INativePropertyListener; > import org.eclipse.core.databinding.property.value.IValuePropertyChangeListener; > import org.eclipse.core.databinding.property.value.ValuePropertyChangeEvent; >@@ -39,13 +40,13 @@ > return null; > } > >- public boolean setValue(Object source, Object value) { >+ public ValueDiff setValue(Object source, Object value, ValueDiff diff) { > if (source == null) >- return false; >+ return null; > ((ISelectionProvider) source) > .setSelection(value == null ? StructuredSelection.EMPTY > : new StructuredSelection(value)); >- return true; >+ return diff; > } > > public INativePropertyListener adaptListener( >Index: src/org/eclipse/jface/internal/databinding/viewers/ViewerInputProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/Attic/ViewerInputProperty.java,v >retrieving revision 1.1.2.3 >diff -u -r1.1.2.3 ViewerInputProperty.java >--- src/org/eclipse/jface/internal/databinding/viewers/ViewerInputProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.3 >+++ src/org/eclipse/jface/internal/databinding/viewers/ViewerInputProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -11,6 +11,7 @@ > > package org.eclipse.jface.internal.databinding.viewers; > >+import org.eclipse.core.databinding.observable.value.ValueDiff; > import org.eclipse.core.databinding.property.INativePropertyListener; > import org.eclipse.core.databinding.property.value.IValuePropertyChangeListener; > import org.eclipse.jface.viewers.Viewer; >@@ -28,11 +29,11 @@ > return ((Viewer) source).getInput(); > } > >- public boolean setValue(Object source, Object value) { >+ public ValueDiff setValue(Object source, Object value, ValueDiff diff) { > if (source == null) >- return false; >+ return null; > ((Viewer) source).setInput(value); >- return true; >+ return diff; > } > > public INativePropertyListener adaptListener( >Index: src/org/eclipse/jface/internal/databinding/viewers/StructuredViewerFiltersProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/Attic/StructuredViewerFiltersProperty.java,v >retrieving revision 1.1.2.3 >diff -u -r1.1.2.3 StructuredViewerFiltersProperty.java >--- src/org/eclipse/jface/internal/databinding/viewers/StructuredViewerFiltersProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.3 >+++ src/org/eclipse/jface/internal/databinding/viewers/StructuredViewerFiltersProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -35,9 +35,9 @@ > .getFilters())); > } > >- public boolean setSet(Object source, Set set, SetDiff diff) { >+ public SetDiff setSet(Object source, Set set, SetDiff diff) { > if (source == null) >- return false; >+ return null; > StructuredViewer viewer = (StructuredViewer) source; > viewer.getControl().setRedraw(false); > try { >@@ -46,7 +46,7 @@ > } finally { > viewer.getControl().setRedraw(true); > } >- return true; >+ return diff; > } > > public INativePropertyListener adaptListener( >Index: src/org/eclipse/jface/internal/databinding/viewers/CheckableCheckedElementsProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/Attic/CheckableCheckedElementsProperty.java,v >retrieving revision 1.1.2.3 >diff -u -r1.1.2.3 CheckableCheckedElementsProperty.java >--- src/org/eclipse/jface/internal/databinding/viewers/CheckableCheckedElementsProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.3 >+++ src/org/eclipse/jface/internal/databinding/viewers/CheckableCheckedElementsProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -62,9 +62,9 @@ > return new HashSet(); > } > >- protected boolean setSet(Object source, Set set, SetDiff diff) { >+ protected SetDiff setSet(Object source, Set set, SetDiff diff) { > if (source == null) >- return false; >+ return null; > ICheckable checkable = (ICheckable) source; > for (Iterator it = diff.getAdditions().iterator(); it.hasNext();) { > checkable.setChecked(it.next(), true); >@@ -72,7 +72,7 @@ > for (Iterator it = diff.getRemovals().iterator(); it.hasNext();) { > checkable.setChecked(it.next(), false); > } >- return true; >+ return diff; > } > > public INativePropertyListener adaptListener( >Index: src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderMultipleSelectionProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/Attic/SelectionProviderMultipleSelectionProperty.java,v >retrieving revision 1.1.2.3 >diff -u -r1.1.2.3 SelectionProviderMultipleSelectionProperty.java >--- src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderMultipleSelectionProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.3 >+++ src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderMultipleSelectionProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -43,12 +43,12 @@ > return Collections.EMPTY_LIST; > } > >- protected boolean setList(Object source, List list, ListDiff diff) { >+ protected ListDiff setList(Object source, List list, ListDiff diff) { > if (source == null) >- return false; >+ return null; > ((ISelectionProvider) source) > .setSelection(new StructuredSelection(list)); >- return true; >+ return diff; > } > > public INativePropertyListener adaptListener( >Index: src/org/eclipse/jface/internal/databinding/swt/WidgetBooleanValueProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/Attic/WidgetBooleanValueProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 WidgetBooleanValueProperty.java >--- src/org/eclipse/jface/internal/databinding/swt/WidgetBooleanValueProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.2 >+++ src/org/eclipse/jface/internal/databinding/swt/WidgetBooleanValueProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -11,6 +11,9 @@ > > package org.eclipse.jface.internal.databinding.swt; > >+import org.eclipse.core.databinding.observable.Diffs; >+import org.eclipse.core.databinding.observable.value.ValueDiff; >+ > /** > * @since 3.3 > * >@@ -36,13 +39,15 @@ > return doGetBooleanValue(source) ? Boolean.TRUE : Boolean.FALSE; > } > >- public boolean setValue(Object source, Object value) { >+ public ValueDiff setValue(Object source, Object value, ValueDiff diff) { > if (source == null) >- return false; >- if (value == null) >+ return null; >+ if (value == null) { > value = Boolean.FALSE; >+ diff = Diffs.createValueDiff(diff.getOldValue(), value); >+ } > doSetBooleanValue(source, ((Boolean) value).booleanValue()); >- return true; >+ return diff; > } > > abstract boolean doGetBooleanValue(Object source); >Index: src/org/eclipse/jface/internal/databinding/swt/ControlStringListProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/Attic/ControlStringListProperty.java,v >retrieving revision 1.1.2.3 >diff -u -r1.1.2.3 ControlStringListProperty.java >--- src/org/eclipse/jface/internal/databinding/swt/ControlStringListProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.3 >+++ src/org/eclipse/jface/internal/databinding/swt/ControlStringListProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -28,12 +28,12 @@ > return String.class; > } > >- protected boolean setList(Object source, List list, ListDiff diff) { >+ protected ListDiff setList(Object source, List list, ListDiff diff) { > if (source == null) >- return false; >+ return null; > String[] strings = (String[]) list.toArray(new String[list.size()]); > doSetStringList((Control) source, strings); >- return true; >+ return diff; > } > > abstract void doSetStringList(Control control, String[] list); >Index: src/org/eclipse/jface/internal/databinding/swt/ControlBackgroundProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/Attic/ControlBackgroundProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 ControlBackgroundProperty.java >--- src/org/eclipse/jface/internal/databinding/swt/ControlBackgroundProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.2 >+++ src/org/eclipse/jface/internal/databinding/swt/ControlBackgroundProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -11,6 +11,7 @@ > > package org.eclipse.jface.internal.databinding.swt; > >+import org.eclipse.core.databinding.observable.value.ValueDiff; > import org.eclipse.swt.graphics.Color; > import org.eclipse.swt.widgets.Control; > >@@ -27,11 +28,11 @@ > return ((Control) source).getBackground(); > } > >- public boolean setValue(Object source, Object value) { >+ public ValueDiff setValue(Object source, Object value, ValueDiff diff) { > if (source == null) >- return false; >+ return null; > ((Control) source).setBackground((Color) value); >- return true; >+ return diff; > } > > public String toString() { >Index: src/org/eclipse/jface/internal/databinding/swt/ControlSizeProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/Attic/ControlSizeProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 ControlSizeProperty.java >--- src/org/eclipse/jface/internal/databinding/swt/ControlSizeProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.2 >+++ src/org/eclipse/jface/internal/databinding/swt/ControlSizeProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -12,6 +12,7 @@ > > package org.eclipse.jface.internal.databinding.swt; > >+import org.eclipse.core.databinding.observable.value.ValueDiff; > import org.eclipse.swt.SWT; > import org.eclipse.swt.graphics.Point; > import org.eclipse.swt.widgets.Control; >@@ -36,11 +37,11 @@ > return ((Control) source).getSize(); > } > >- public boolean setValue(Object source, Object value) { >+ public ValueDiff setValue(Object source, Object value, ValueDiff diff) { > if (source == null) >- return false; >+ return null; > ((Control) source).setSize((Point) value); >- return true; >+ return diff; > } > > public String toString() { >Index: src/org/eclipse/jface/internal/databinding/swt/WidgetStringValueProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/Attic/WidgetStringValueProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 WidgetStringValueProperty.java >--- src/org/eclipse/jface/internal/databinding/swt/WidgetStringValueProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.2 >+++ src/org/eclipse/jface/internal/databinding/swt/WidgetStringValueProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -11,6 +11,8 @@ > > package org.eclipse.jface.internal.databinding.swt; > >+import org.eclipse.core.databinding.observable.value.ValueDiff; >+ > /** > * @since 3.3 > * >@@ -32,11 +34,11 @@ > return doGetStringValue(source); > } > >- public boolean setValue(Object source, Object value) { >+ public ValueDiff setValue(Object source, Object value, ValueDiff diff) { > if (source == null) >- return false; >+ return null; > doSetStringValue(source, (String) value); >- return true; >+ return diff; > } > > abstract String doGetStringValue(Object source); >Index: src/org/eclipse/jface/internal/databinding/swt/ControlFontProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/Attic/ControlFontProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 ControlFontProperty.java >--- src/org/eclipse/jface/internal/databinding/swt/ControlFontProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.2 >+++ src/org/eclipse/jface/internal/databinding/swt/ControlFontProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -11,6 +11,7 @@ > > package org.eclipse.jface.internal.databinding.swt; > >+import org.eclipse.core.databinding.observable.value.ValueDiff; > import org.eclipse.swt.graphics.Font; > import org.eclipse.swt.widgets.Control; > >@@ -27,11 +28,11 @@ > return ((Control) source).getFont(); > } > >- public boolean setValue(Object source, Object value) { >+ public ValueDiff setValue(Object source, Object value, ValueDiff diff) { > if (source == null) >- return false; >+ return null; > ((Control) source).setFont((Font) value); >- return true; >+ return diff; > } > > public String toString() { >Index: src/org/eclipse/jface/internal/databinding/swt/ControlBoundsProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/Attic/ControlBoundsProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 ControlBoundsProperty.java >--- src/org/eclipse/jface/internal/databinding/swt/ControlBoundsProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.2 >+++ src/org/eclipse/jface/internal/databinding/swt/ControlBoundsProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -12,6 +12,7 @@ > > package org.eclipse.jface.internal.databinding.swt; > >+import org.eclipse.core.databinding.observable.value.ValueDiff; > import org.eclipse.swt.SWT; > import org.eclipse.swt.graphics.Rectangle; > import org.eclipse.swt.widgets.Control; >@@ -36,11 +37,11 @@ > return ((Control) source).getBounds(); > } > >- public boolean setValue(Object source, Object value) { >+ public ValueDiff setValue(Object source, Object value, ValueDiff diff) { > if (source == null) >- return false; >+ return null; > ((Control) source).setBounds((Rectangle) value); >- return true; >+ return diff; > } > > public String toString() { >Index: src/org/eclipse/jface/internal/databinding/swt/ControlLocationProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/Attic/ControlLocationProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 ControlLocationProperty.java >--- src/org/eclipse/jface/internal/databinding/swt/ControlLocationProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.2 >+++ src/org/eclipse/jface/internal/databinding/swt/ControlLocationProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -12,6 +12,7 @@ > > package org.eclipse.jface.internal.databinding.swt; > >+import org.eclipse.core.databinding.observable.value.ValueDiff; > import org.eclipse.swt.SWT; > import org.eclipse.swt.graphics.Point; > import org.eclipse.swt.widgets.Control; >@@ -36,11 +37,11 @@ > return ((Control) source).getLocation(); > } > >- public boolean setValue(Object source, Object value) { >+ public ValueDiff setValue(Object source, Object value, ValueDiff diff) { > if (source == null) >- return false; >+ return null; > ((Control) source).setLocation((Point) value); >- return true; >+ return diff; > } > > public String toString() { >Index: src/org/eclipse/jface/internal/databinding/swt/ControlForegroundProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/Attic/ControlForegroundProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 ControlForegroundProperty.java >--- src/org/eclipse/jface/internal/databinding/swt/ControlForegroundProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.2 >+++ src/org/eclipse/jface/internal/databinding/swt/ControlForegroundProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -11,6 +11,7 @@ > > package org.eclipse.jface.internal.databinding.swt; > >+import org.eclipse.core.databinding.observable.value.ValueDiff; > import org.eclipse.swt.graphics.Color; > import org.eclipse.swt.widgets.Control; > >@@ -27,11 +28,11 @@ > return ((Control) source).getForeground(); > } > >- public boolean setValue(Object source, Object value) { >+ public ValueDiff setValue(Object source, Object value, ValueDiff diff) { > if (source == null) >- return false; >+ return null; > ((Control) source).setForeground((Color) value); >- return true; >+ return diff; > } > > public String toString() { >Index: src/org/eclipse/jface/internal/databinding/swt/WidgetIntValueProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/Attic/WidgetIntValueProperty.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 WidgetIntValueProperty.java >--- src/org/eclipse/jface/internal/databinding/swt/WidgetIntValueProperty.java 20 Dec 2008 07:00:24 -0000 1.1.2.2 >+++ src/org/eclipse/jface/internal/databinding/swt/WidgetIntValueProperty.java 23 Dec 2008 14:58:18 -0000 >@@ -11,6 +11,8 @@ > > package org.eclipse.jface.internal.databinding.swt; > >+import org.eclipse.core.databinding.observable.value.ValueDiff; >+ > /** > * @since 3.3 > * >@@ -36,11 +38,11 @@ > return new Integer(doGetIntValue(source)); > } > >- public boolean setValue(Object source, Object value) { >+ public ValueDiff setValue(Object source, Object value, ValueDiff diff) { > if (source == null) >- return false; >+ return null; > doSetIntValue(source, ((Integer) value).intValue()); >- return true; >+ return diff; > } > > abstract int doGetIntValue(Object source);
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 194734
:
106529
|
107000
|
107001
|
107041
|
107042
|
111164
|
111165
|
111335
|
111336
|
111448
|
111449
|
111640
|
111641
|
111717
|
111719
|
111845
|
111846
|
111897
|
111898
|
111993
|
111994
|
112161
|
112162
|
112268
|
112269
|
112360
|
112361
|
112370
|
112371
|
112471
|
112472
|
112606
|
112607
|
112629
|
112630
|
113149
|
113150
|
113165
|
113166
|
114858
|
114859
|
115196
|
115197
|
115284
|
115458
|
115459
|
117500
|
117501
|
117990
|
117991
|
119231
|
119232
|
119274
|
120541
|
120542
|
120651
|
120652
|
120653
|
120654
|
120914
|
120915
|
120989
|
120990
|
121020
|
121021
| 121141 |
121142
|
122228
|
122229
|
122234
|
122235
|
122288
|
122289
|
122609
|
122610
|
122613
|
122614
|
122775
|
122776
|
122813
|
122814
|
122852
|
122853
|
122864
|
122865
|
123137
|
123138