diff options
author | Ovidio Mallo | 2010-12-07 16:14:40 +0000 |
---|---|---|
committer | Ovidio Mallo | 2010-12-07 16:14:40 +0000 |
commit | 29b49294dea4a218e0cec56b7a5edb154e64f026 (patch) | |
tree | ac7ff135ca799f98ed0055cdb897a041e41fdf59 | |
parent | 34e8b349069d008346e5b096d6308de22b4260d8 (diff) | |
download | org.eclipse.e4.databinding-I20101214-0800.tar.gz org.eclipse.e4.databinding-I20101214-0800.tar.xz org.eclipse.e4.databinding-I20101214-0800.zip |
REOPENED - bug 331348: [DataBinding] Make get<Value|Set|List|Map> methods of properties non-finalv20101220I20101214-0800I20101208-0800
https://bugs.eclipse.org/bugs/show_bug.cgi?id=331348
- reverting the changes to be commited again after the 3.7 M4 week
4 files changed, 12 insertions, 64 deletions
diff --git a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/ListProperty.java b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/ListProperty.java index cf9590b4..139a0931 100644 --- a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/ListProperty.java +++ b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/ListProperty.java @@ -8,7 +8,6 @@ * Contributors: * Matthew Hall - initial API and implementation (bug 194734) * Matthew Hall - bug 195222 - * Ovidio Mallo - bug 331348 ******************************************************************************/ package org.eclipse.core.databinding.property.list; @@ -34,22 +33,10 @@ import org.eclipse.core.internal.databinding.property.ListPropertyDetailValuesLi * @since 1.2 */ public abstract class ListProperty implements IListProperty { - /** - * By default, this method returns <code>Collections.EMPTY_LIST</code> in - * case the source object is <code>null</code>. Otherwise, this method - * delegates to {@link #doGetList(Object)}. - * - * <p> - * Clients may override this method if they e.g. want to return a specific - * default list in case the source object is <code>null</code>. - * </p> - * - * @see #doGetList(Object) - * * @since 1.3 */ - public List getList(Object source) { + public final List getList(Object source) { if (source == null) { return Collections.EMPTY_LIST; } @@ -145,8 +132,8 @@ public abstract class ListProperty implements IListProperty { } public IObservableList observeDetail(IObservableValue master) { - return MasterDetailObservables.detailList(master, - listFactory(master.getRealm()), getElementType()); + return MasterDetailObservables.detailList(master, listFactory(master + .getRealm()), getElementType()); } public final IListProperty values(IValueProperty detailValue) { diff --git a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/MapProperty.java b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/MapProperty.java index 2b1d5d69..70fcd95d 100644 --- a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/MapProperty.java +++ b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/MapProperty.java @@ -8,7 +8,6 @@ * Contributors: * Matthew Hall - initial API and implementation (bug 194734) * Matthew Hall - bug 195222 - * Ovidio Mallo - bug 331348 ******************************************************************************/ package org.eclipse.core.databinding.property.map; @@ -34,22 +33,10 @@ import org.eclipse.core.internal.databinding.property.MapPropertyDetailValuesMap * @since 1.2 */ public abstract class MapProperty implements IMapProperty { - /** - * By default, this method returns <code>Collections.EMPTY_MAP</code> in - * case the source object is <code>null</code>. Otherwise, this method - * delegates to {@link #doGetMap(Object)}. - * - * <p> - * Clients may override this method if they e.g. want to return a specific - * default map in case the source object is <code>null</code>. - * </p> - * - * @see #doGetMap(Object) - * * @since 1.3 */ - public Map getMap(Object source) { + public final Map getMap(Object source) { if (source == null) { return Collections.EMPTY_MAP; } @@ -147,8 +134,8 @@ public abstract class MapProperty implements IMapProperty { } public IObservableMap observeDetail(IObservableValue master) { - return MasterDetailObservables.detailMap(master, - mapFactory(master.getRealm()), getKeyType(), getValueType()); + return MasterDetailObservables.detailMap(master, mapFactory(master + .getRealm()), getKeyType(), getValueType()); } public final IMapProperty values(IValueProperty detailValues) { diff --git a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SetProperty.java b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SetProperty.java index 52c68c82..8b213ecf 100644 --- a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SetProperty.java +++ b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SetProperty.java @@ -8,7 +8,6 @@ * Contributors: * Matthew Hall - initial API and implementation (bug 194734) * Matthew Hall - bug 195222 - * Ovidio Mallo - bug 331348 ******************************************************************************/ package org.eclipse.core.databinding.property.set; @@ -35,22 +34,10 @@ import org.eclipse.core.internal.databinding.property.SetPropertyDetailValuesMap * @since 1.2 */ public abstract class SetProperty implements ISetProperty { - /** - * By default, this method returns <code>Collections.EMPTY_SET</code> in - * case the source object is <code>null</code>. Otherwise, this method - * delegates to {@link #doGetSet(Object)}. - * - * <p> - * Clients may override this method if they e.g. want to return a specific - * default set in case the source object is <code>null</code>. - * </p> - * - * @see #doGetSet(Object) - * * @since 1.3 */ - public Set getSet(Object source) { + public final Set getSet(Object source) { if (source == null) { return Collections.EMPTY_SET; } @@ -147,8 +134,8 @@ public abstract class SetProperty implements ISetProperty { } public IObservableSet observeDetail(IObservableValue master) { - return MasterDetailObservables.detailSet(master, - setFactory(master.getRealm()), getElementType()); + return MasterDetailObservables.detailSet(master, setFactory(master + .getRealm()), getElementType()); } public final IMapProperty values(IValueProperty detailValues) { diff --git a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/ValueProperty.java b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/ValueProperty.java index 8422e8e2..d7266680 100644 --- a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/ValueProperty.java +++ b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/ValueProperty.java @@ -8,7 +8,6 @@ * Contributors: * Matthew Hall - initial API and implementation (bug 194734) * Matthew Hall - bug 195222 - * Ovidio Mallo - bug 331348 ******************************************************************************/ package org.eclipse.core.databinding.property.value; @@ -32,22 +31,10 @@ import org.eclipse.core.internal.databinding.property.ValuePropertyDetailValue; * @since 1.2 */ public abstract class ValueProperty implements IValueProperty { - /** - * By default, this method returns <code>null</code> in case the source - * object is itself <code>null</code>. Otherwise, this method delegates to - * {@link #doGetValue(Object)}. - * - * <p> - * Clients may override this method if they e.g. want to return a specific - * default value in case the source object is <code>null</code>. - * </p> - * - * @see #doGetValue(Object) - * * @since 1.3 */ - public Object getValue(Object source) { + public final Object getValue(Object source) { if (source == null) { return null; } @@ -121,8 +108,8 @@ public abstract class ValueProperty implements IValueProperty { } public IObservableValue observeDetail(IObservableValue master) { - return MasterDetailObservables.detailValue(master, - valueFactory(master.getRealm()), getValueType()); + return MasterDetailObservables.detailValue(master, valueFactory(master + .getRealm()), getValueType()); } public final IValueProperty value(IValueProperty detailValue) { |