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 122228 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]
Merged all widget properties into WidgetProperties
clipboard.txt (text/plain), 109.37 KB, created by
Matthew Hall
on 2009-01-11 23:31:47 EST
(
hide
)
Description:
Merged all widget properties into WidgetProperties
Filename:
MIME Type:
Creator:
Matthew Hall
Created:
2009-01-11 23:31:47 EST
Size:
109.37 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jface.databinding >Index: src/org/eclipse/jface/databinding/swt/ToolItemProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/ToolItemProperties.java >diff -N src/org/eclipse/jface/databinding/swt/ToolItemProperties.java >--- src/org/eclipse/jface/databinding/swt/ToolItemProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,31 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.ToolItemTooltipTextProperty; >- >-/** >- * A factory for creating properties of SWT ToolItems >- * >- * @since 1.3 >- */ >-public class ToolItemProperties { >- /** >- * Returns a value property for the tooltip text of a SWT ToolItems. >- * >- * @return a value property for the tooltip text of a SWT ToolItems. >- */ >- public static IValueProperty tooltipText() { >- return new ToolItemTooltipTextProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/TextProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/TextProperties.java >diff -N src/org/eclipse/jface/databinding/swt/TextProperties.java >--- src/org/eclipse/jface/databinding/swt/TextProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,46 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.TextEditableProperty; >-import org.eclipse.jface.internal.databinding.swt.TextTextProperty; >-import org.eclipse.swt.SWT; >- >-/** >- * A factory for creating properties of SWT Texts. >- * >- * @since 1.3 >- */ >-public class TextProperties { >- /** >- * Returns a value property for the text of a SWT Text. >- * >- * @param event >- * the SWT event type to register for change events. May be >- * {@link SWT#None}, {@link SWT#Modify} or {@link SWT#FocusOut}. >- * >- * @return a value property for the text of a SWT Text. >- */ >- public static IValueProperty text(int event) { >- return new TextTextProperty(event); >- } >- >- /** >- * Returns a value property for the editable state of a SWT Text. >- * >- * @return a value property for the editable state of a SWT Text. >- */ >- public static IValueProperty editable() { >- return new TextEditableProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/ScaleProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/ScaleProperties.java >diff -N src/org/eclipse/jface/databinding/swt/ScaleProperties.java >--- src/org/eclipse/jface/databinding/swt/ScaleProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,51 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.ScaleMaximumProperty; >-import org.eclipse.jface.internal.databinding.swt.ScaleMinimumProperty; >-import org.eclipse.jface.internal.databinding.swt.ScaleSelectionProperty; >- >-/** >- * A factory for creating properties of SWT Scales. >- * >- * @since 1.3 >- */ >-public class ScaleProperties { >- /** >- * Returns a value property for the selected value of a SWT Scale. >- * >- * @return a value property for the selected value of a SWT Scale. >- */ >- public static IValueProperty selection() { >- return new ScaleSelectionProperty(); >- } >- >- /** >- * Returns a value property for the minimum value of a SWT Scale. >- * >- * @return a value property for the minimum value of a SWT Scale. >- */ >- public static IValueProperty minimum() { >- return new ScaleMinimumProperty(); >- } >- >- /** >- * Returns a value property for the maximum value of a SWT Scale. >- * >- * @return a value property for the maximum value of a SWT Scale. >- */ >- public static IValueProperty maximum() { >- return new ScaleMaximumProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/TrayItemProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/TrayItemProperties.java >diff -N src/org/eclipse/jface/databinding/swt/TrayItemProperties.java >--- src/org/eclipse/jface/databinding/swt/TrayItemProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,31 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.TrayItemTooltipTextProperty; >- >-/** >- * A factory for creating properties of SWT TrayItems >- * >- * @since 1.3 >- */ >-public class TrayItemProperties { >- /** >- * Returns a value property for the tooltip text of a SWT TrayItems. >- * >- * @return a value property for the tooltip text of a SWT TrayItems. >- */ >- public static IValueProperty tooltipText() { >- return new TrayItemTooltipTextProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/LabelProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/LabelProperties.java >diff -N src/org/eclipse/jface/databinding/swt/LabelProperties.java >--- src/org/eclipse/jface/databinding/swt/LabelProperties.java 17 Dec 2008 18:39:58 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,31 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.LabelTextProperty; >- >-/** >- * A factory for creating properties of SWT Labels. >- * >- * @since 1.3 >- */ >-public class LabelProperties { >- /** >- * Returns a value property for the text of a SWT Label. >- * >- * @return a value property for the text of a SWT Label. >- */ >- public static IValueProperty text() { >- return new LabelTextProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/SpinnerProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/SpinnerProperties.java >diff -N src/org/eclipse/jface/databinding/swt/SpinnerProperties.java >--- src/org/eclipse/jface/databinding/swt/SpinnerProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,51 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.SpinnerMaximumProperty; >-import org.eclipse.jface.internal.databinding.swt.SpinnerMinimumProperty; >-import org.eclipse.jface.internal.databinding.swt.SpinnerSelectionProperty; >- >-/** >- * A factory for creating properties of SWT Spinners. >- * >- * @since 1.3 >- */ >-public class SpinnerProperties { >- /** >- * Returns a value property for the selected value of a SWT Spinner. >- * >- * @return a value property for the selected value of a SWT Spinner. >- */ >- public static IValueProperty selection() { >- return new SpinnerSelectionProperty(); >- } >- >- /** >- * Returns a value property for the minimum value of a SWT Spinner. >- * >- * @return a value property for the minimum value of a SWT Spinner. >- */ >- public static IValueProperty minimum() { >- return new SpinnerMinimumProperty(); >- } >- >- /** >- * Returns a value property for the maximum value of a SWT Spinner. >- * >- * @return a value property for the maximum value of a SWT Spinner. >- */ >- public static IValueProperty maximum() { >- return new SpinnerMaximumProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/TableProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/TableProperties.java >diff -N src/org/eclipse/jface/databinding/swt/TableProperties.java >--- src/org/eclipse/jface/databinding/swt/TableProperties.java 17 Dec 2008 18:39:58 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,31 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.TableSingleSelectionIndexProperty; >- >-/** >- * A factory for creating properties of SWT Tables. >- * >- * @since 1.3 >- */ >-public class TableProperties { >- /** >- * Returns a value property for the single selection index of a SWT Table. >- * >- * @return a value property for the single selection index of a SWT Table. >- */ >- public static IValueProperty singleSelectionIndex() { >- return new TableSingleSelectionIndexProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/ItemProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/ItemProperties.java >diff -N src/org/eclipse/jface/databinding/swt/ItemProperties.java >--- src/org/eclipse/jface/databinding/swt/ItemProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,31 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.ItemTextProperty; >- >-/** >- * A factory for creating properties of SWT controls. >- * >- * @since 1.3 >- */ >-public class ItemProperties { >- /** >- * Returns a value property for the text of a SWT Item. >- * >- * @return a value property for the text of a SWT Item >- */ >- public static IValueProperty text() { >- return new ItemTextProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/ControlProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/ControlProperties.java >diff -N src/org/eclipse/jface/databinding/swt/ControlProperties.java >--- src/org/eclipse/jface/databinding/swt/ControlProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,121 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.ControlBackgroundProperty; >-import org.eclipse.jface.internal.databinding.swt.ControlBoundsProperty; >-import org.eclipse.jface.internal.databinding.swt.ControlEnabledProperty; >-import org.eclipse.jface.internal.databinding.swt.ControlFocusedProperty; >-import org.eclipse.jface.internal.databinding.swt.ControlFontProperty; >-import org.eclipse.jface.internal.databinding.swt.ControlForegroundProperty; >-import org.eclipse.jface.internal.databinding.swt.ControlLocationProperty; >-import org.eclipse.jface.internal.databinding.swt.ControlSizeProperty; >-import org.eclipse.jface.internal.databinding.swt.ControlTooltipTextProperty; >-import org.eclipse.jface.internal.databinding.swt.ControlVisibleProperty; >- >-/** >- * A factory for creating properties of SWT controls. >- * >- * @since 1.3 >- */ >-public class ControlProperties { >- /** >- * Returns a value property for the enablement state of a SWT Control. >- * >- * @return a value property for the enablement state of a SWT Control. >- */ >- public static IValueProperty enabled() { >- return new ControlEnabledProperty(); >- } >- >- /** >- * Returns a value property for the visibility state of a SWT Control. >- * >- * @return a value property for the visibility state of a SWT Control. >- */ >- public static IValueProperty visible() { >- return new ControlVisibleProperty(); >- } >- >- /** >- * Returns a value property for the tooltip text of a SWT Control. >- * >- * @return a value property for the tooltip text of a SWT Control. >- */ >- public static IValueProperty toolTipText() { >- return new ControlTooltipTextProperty(); >- } >- >- /** >- * Returns a value property for the foreground color of a SWT Control. >- * >- * @return a value property for the foreground color of a SWT Control. >- */ >- public static IValueProperty foreground() { >- return new ControlForegroundProperty(); >- } >- >- /** >- * Returns a value property for the background color of a SWT Control. >- * >- * @return a value property for the background color of a SWT Control. >- */ >- public static IValueProperty background() { >- return new ControlBackgroundProperty(); >- } >- >- /** >- * Returns a value property for the font of a SWT Control. >- * >- * @return a value property for the font of a SWT Control. >- */ >- public static IValueProperty font() { >- return new ControlFontProperty(); >- } >- >- /** >- * Returns a value property for the size of a SWT Control. >- * >- * @return a value property for the size of a SWT Control. >- */ >- public static IValueProperty size() { >- return new ControlSizeProperty(); >- } >- >- /** >- * Returns a value property for the location of a SWT Control. >- * >- * @return a value property for the location of a SWT Control. >- */ >- public static IValueProperty location() { >- return new ControlLocationProperty(); >- } >- >- /** >- * Returns a value property for the bounds of a SWT Control. >- * >- * @return a value property for the bounds of a SWT Control. >- */ >- public static IValueProperty bounds() { >- return new ControlBoundsProperty(); >- } >- >- /** >- * Returns a value property for the focus state of a SWT Control. >- * >- * @return a value property for the focus state of a SWT Control. >- */ >- public static IValueProperty focused() { >- return new ControlFocusedProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/CLabelProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/CLabelProperties.java >diff -N src/org/eclipse/jface/databinding/swt/CLabelProperties.java >--- src/org/eclipse/jface/databinding/swt/CLabelProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,31 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.CLabelTextProperty; >- >-/** >- * A factory for creating properties of SWT Labels. >- * >- * @since 1.3 >- */ >-public class CLabelProperties { >- /** >- * Returns a value property for the text of a SWT Label. >- * >- * @return a value property for the text of a SWT Label. >- */ >- public static IValueProperty text() { >- return new CLabelTextProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/CTabItemProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/CTabItemProperties.java >diff -N src/org/eclipse/jface/databinding/swt/CTabItemProperties.java >--- src/org/eclipse/jface/databinding/swt/CTabItemProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,31 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.CTabItemTooltipTextProperty; >- >-/** >- * A factory for creating properties of SWT CTabItems >- * >- * @since 1.3 >- */ >-public class CTabItemProperties { >- /** >- * Returns a value property for the tooltip text of a SWT CTabItem. >- * >- * @return a value property for the tooltip text of a SWT CTabItem. >- */ >- public static IValueProperty tooltipText() { >- return new CTabItemTooltipTextProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/TreeColumnProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/TreeColumnProperties.java >diff -N src/org/eclipse/jface/databinding/swt/TreeColumnProperties.java >--- src/org/eclipse/jface/databinding/swt/TreeColumnProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,31 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.TreeItemTooltipTextProperty; >- >-/** >- * A factory for creating properties of SWT TabItems >- * >- * @since 1.3 >- */ >-public class TreeColumnProperties { >- /** >- * Returns a value property for the tooltip text of a SWT TreeColumn. >- * >- * @return a value property for the tooltip text of a SWT TreeColumn. >- */ >- public static IValueProperty tooltipText() { >- return new TreeItemTooltipTextProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/SWTObservables.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/SWTObservables.java,v >retrieving revision 1.24.2.2 >diff -u -r1.24.2.2 SWTObservables.java >--- src/org/eclipse/jface/databinding/swt/SWTObservables.java 6 Jan 2009 06:21:04 -0000 1.24.2.2 >+++ src/org/eclipse/jface/databinding/swt/SWTObservables.java 12 Jan 2009 04:28:11 -0000 >@@ -26,35 +26,10 @@ > import org.eclipse.core.databinding.observable.value.IObservableValue; > import org.eclipse.core.databinding.observable.value.IVetoableValue; > import org.eclipse.core.databinding.observable.value.ValueChangingEvent; >-import org.eclipse.core.databinding.property.list.IListProperty; >-import org.eclipse.core.databinding.property.value.IValueProperty; > import org.eclipse.jface.internal.databinding.swt.SWTDelayedObservableValueDecorator; >-import org.eclipse.jface.internal.databinding.swt.SWTObservableListDecorator; >-import org.eclipse.jface.internal.databinding.swt.SWTObservableValueDecorator; > import org.eclipse.jface.internal.databinding.swt.SWTVetoableValueDecorator; >-import org.eclipse.swt.SWT; >-import org.eclipse.swt.custom.CCombo; >-import org.eclipse.swt.custom.CLabel; >-import org.eclipse.swt.custom.CTabItem; >-import org.eclipse.swt.custom.StyledText; >-import org.eclipse.swt.widgets.Button; >-import org.eclipse.swt.widgets.Combo; > import org.eclipse.swt.widgets.Control; > import org.eclipse.swt.widgets.Display; >-import org.eclipse.swt.widgets.Item; >-import org.eclipse.swt.widgets.Label; >-import org.eclipse.swt.widgets.Link; >-import org.eclipse.swt.widgets.List; >-import org.eclipse.swt.widgets.Scale; >-import org.eclipse.swt.widgets.Shell; >-import org.eclipse.swt.widgets.Spinner; >-import org.eclipse.swt.widgets.TabItem; >-import org.eclipse.swt.widgets.Table; >-import org.eclipse.swt.widgets.TableColumn; >-import org.eclipse.swt.widgets.Text; >-import org.eclipse.swt.widgets.ToolItem; >-import org.eclipse.swt.widgets.TrayItem; >-import org.eclipse.swt.widgets.TreeColumn; > import org.eclipse.swt.widgets.Widget; > > /** >@@ -124,12 +99,6 @@ > .observeDelayedValue(delay, observable), observable.getWidget()); > } > >- private static ISWTObservableValue observeWidgetProperty(Widget widget, >- IValueProperty property) { >- return new SWTObservableValueDecorator(property.observe(getRealm(widget >- .getDisplay()), widget), widget); >- } >- > /** > * Returns an observable value tracking the enabled state of the given > * control >@@ -140,7 +109,8 @@ > * control > */ > public static ISWTObservableValue observeEnabled(Control control) { >- return observeWidgetProperty(control, ControlProperties.enabled()); >+ return (ISWTObservableValue) WidgetProperties.enabled() >+ .observe(control); > } > > /** >@@ -153,7 +123,8 @@ > * control > */ > public static ISWTObservableValue observeVisible(Control control) { >- return observeWidgetProperty(control, ControlProperties.visible()); >+ return (ISWTObservableValue) WidgetProperties.visible() >+ .observe(control); > } > > /** >@@ -175,29 +146,8 @@ > * @since 1.3 > */ > public static ISWTObservableValue observeTooltipText(Widget widget) { >- if (widget instanceof Control) { >- return observeTooltipText((Control) widget); >- } >- >- IValueProperty property; >- if (widget instanceof CTabItem) { >- property = CTabItemProperties.tooltipText(); >- } else if (widget instanceof TabItem) { >- property = TabItemProperties.tooltipText(); >- } else if (widget instanceof TableColumn) { >- property = TableColumnProperties.tooltipText(); >- } else if (widget instanceof ToolItem) { >- property = ToolItemProperties.tooltipText(); >- } else if (widget instanceof TrayItem) { >- property = TrayItemProperties.tooltipText(); >- } else if (widget instanceof TreeColumn) { >- property = TreeColumnProperties.tooltipText(); >- } else { >- throw new IllegalArgumentException( >- "Item [" + widget.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >- } >- >- return observeWidgetProperty(widget, property); >+ return (ISWTObservableValue) WidgetProperties.tooltipText().observe( >+ widget); > } > > /** >@@ -210,7 +160,8 @@ > * control > */ > public static ISWTObservableValue observeTooltipText(Control control) { >- return observeWidgetProperty(control, ControlProperties.toolTipText()); >+ return (ISWTObservableValue) WidgetProperties.tooltipText().observe( >+ control); > } > > /** >@@ -231,25 +182,8 @@ > * if <code>control</code> type is unsupported > */ > public static ISWTObservableValue observeSelection(Control control) { >- IValueProperty property; >- if (control instanceof Spinner) { >- property = SpinnerProperties.selection(); >- } else if (control instanceof Button) { >- property = ButtonProperties.selection(); >- } else if (control instanceof Combo) { >- property = ComboProperties.selection(); >- } else if (control instanceof CCombo) { >- property = CComboProperties.selection(); >- } else if (control instanceof List) { >- property = ListProperties.selection(); >- } else if (control instanceof Scale) { >- property = ScaleProperties.selection(); >- } else { >- throw new IllegalArgumentException( >- "Widget [" + control.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >- } >- >- return observeWidgetProperty(control, property); >+ return (ISWTObservableValue) WidgetProperties.selection().observe( >+ control); > } > > /** >@@ -266,17 +200,8 @@ > * if <code>control</code> type is unsupported > */ > public static ISWTObservableValue observeMin(Control control) { >- IValueProperty property; >- if (control instanceof Spinner) { >- property = SpinnerProperties.minimum(); >- } else if (control instanceof Scale) { >- property = ScaleProperties.minimum(); >- } else { >- throw new IllegalArgumentException( >- "Widget [" + control.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >- } >- >- return observeWidgetProperty(control, property); >+ return (ISWTObservableValue) WidgetProperties.minimum() >+ .observe(control); > } > > /** >@@ -293,17 +218,8 @@ > * if <code>control</code> type is unsupported > */ > public static ISWTObservableValue observeMax(Control control) { >- IValueProperty property; >- if (control instanceof Spinner) { >- property = SpinnerProperties.maximum(); >- } else if (control instanceof Scale) { >- property = ScaleProperties.maximum(); >- } else { >- throw new IllegalArgumentException( >- "Widget [" + control.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >- } >- >- return observeWidgetProperty(control, property); >+ return (ISWTObservableValue) WidgetProperties.maximum() >+ .observe(control); > } > > /** >@@ -322,18 +238,8 @@ > * if <code>control</code> type is unsupported > */ > public static ISWTObservableValue observeText(Control control, int event) { >- IValueProperty property; >- if (control instanceof Text) { >- property = TextProperties.text(event); >- } else if (control instanceof StyledText) { >- property = StyledTextProperties.text(event); >- } else { >- throw new IllegalArgumentException( >- "Widget [" + control.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >- } >- >- return new SWTVetoableValueDecorator(property.observe(getRealm(control >- .getDisplay()), control), control); >+ return new SWTVetoableValueDecorator(WidgetProperties.text(event) >+ .observe(control), control); > } > > /** >@@ -358,14 +264,7 @@ > * @since 1.3 > */ > public static ISWTObservableValue observeText(Widget widget) { >- if (widget instanceof Control) { >- return observeText((Control) widget); >- } else if (widget instanceof Item) { >- return observeWidgetProperty(widget, ItemProperties.text()); >- } >- >- throw new IllegalArgumentException( >- "Widget [" + widget.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >+ return (ISWTObservableValue) WidgetProperties.text().observe(widget); > } > > /** >@@ -388,29 +287,7 @@ > * if <code>control</code> type is unsupported > */ > public static ISWTObservableValue observeText(Control control) { >- if (control instanceof Text || control instanceof StyledText) { >- return observeText(control, SWT.None); >- } >- >- IValueProperty property; >- if (control instanceof Label) { >- property = LabelProperties.text(); >- } else if (control instanceof Link) { >- property = LinkProperties.text(); >- } else if (control instanceof CLabel) { >- property = CLabelProperties.text(); >- } else if (control instanceof Combo) { >- property = ComboProperties.text(); >- } else if (control instanceof CCombo) { >- property = CComboProperties.text(); >- } else if (control instanceof Shell) { >- property = ShellProperties.text(); >- } else { >- throw new IllegalArgumentException( >- "Widget [" + control.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >- } >- >- return observeWidgetProperty(control, property); >+ return (ISWTObservableValue) WidgetProperties.text().observe(control); > } > > /** >@@ -428,20 +305,7 @@ > * if <code>control</code> type is unsupported > */ > public static IObservableList observeItems(Control control) { >- IListProperty property; >- if (control instanceof Combo) { >- property = ComboProperties.items(); >- } else if (control instanceof CCombo) { >- property = CComboProperties.items(); >- } else if (control instanceof List) { >- property = ListProperties.items(); >- } else { >- throw new IllegalArgumentException( >- "Widget [" + control.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >- } >- >- return new SWTObservableListDecorator(property.observe(getRealm(control >- .getDisplay()), control), control); >+ return WidgetProperties.items().observe(control); > } > > /** >@@ -461,21 +325,8 @@ > */ > public static ISWTObservableValue observeSingleSelectionIndex( > Control control) { >- IValueProperty property; >- if (control instanceof Table) { >- property = TableProperties.singleSelectionIndex(); >- } else if (control instanceof Combo) { >- property = ComboProperties.singleSelectionIndex(); >- } else if (control instanceof CCombo) { >- property = CComboProperties.singleSelectionIndex(); >- } else if (control instanceof List) { >- property = ListProperties.singleSelectionIndex(); >- } else { >- throw new IllegalArgumentException( >- "Widget [" + control.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >- } >- >- return observeWidgetProperty(control, property); >+ return (ISWTObservableValue) WidgetProperties.singleSelectionIndex() >+ .observe(control); > } > > /** >@@ -488,7 +339,8 @@ > * control > */ > public static ISWTObservableValue observeForeground(Control control) { >- return observeWidgetProperty(control, ControlProperties.foreground()); >+ return (ISWTObservableValue) WidgetProperties.foreground().observe( >+ control); > } > > /** >@@ -501,7 +353,8 @@ > * control > */ > public static ISWTObservableValue observeBackground(Control control) { >- return observeWidgetProperty(control, ControlProperties.background()); >+ return (ISWTObservableValue) WidgetProperties.background().observe( >+ control); > } > > /** >@@ -512,7 +365,7 @@ > * @return an observable value tracking the font of the given control > */ > public static ISWTObservableValue observeFont(Control control) { >- return observeWidgetProperty(control, ControlProperties.font()); >+ return (ISWTObservableValue) WidgetProperties.font().observe(control); > } > > /** >@@ -524,7 +377,7 @@ > * @since 1.3 > */ > public static ISWTObservableValue observeSize(Control control) { >- return observeWidgetProperty(control, ControlProperties.size()); >+ return (ISWTObservableValue) WidgetProperties.size().observe(control); > } > > /** >@@ -536,7 +389,8 @@ > * @since 1.3 > */ > public static ISWTObservableValue observeLocation(Control control) { >- return observeWidgetProperty(control, ControlProperties.location()); >+ return (ISWTObservableValue) WidgetProperties.location().observe( >+ control); > } > > /** >@@ -548,7 +402,8 @@ > * @since 1.3 > */ > public static ISWTObservableValue observeFocus(Control control) { >- return observeWidgetProperty(control, ControlProperties.focused()); >+ return (ISWTObservableValue) WidgetProperties.focused() >+ .observe(control); > } > > /** >@@ -560,7 +415,7 @@ > * @since 1.3 > */ > public static ISWTObservableValue observeBounds(Control control) { >- return observeWidgetProperty(control, ControlProperties.bounds()); >+ return (ISWTObservableValue) WidgetProperties.bounds().observe(control); > } > > /** >@@ -576,15 +431,8 @@ > * if <code>control</code> type is unsupported > */ > public static ISWTObservableValue observeEditable(Control control) { >- IValueProperty property; >- if (control instanceof Text) { >- property = TextProperties.editable(); >- } else { >- throw new IllegalArgumentException( >- "Widget [" + control.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >- } >- >- return observeWidgetProperty(control, property); >+ return (ISWTObservableValue) WidgetProperties.editable().observe( >+ control); > } > > private static class DisplayRealm extends Realm { >Index: src/org/eclipse/jface/databinding/swt/LinkProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/LinkProperties.java >diff -N src/org/eclipse/jface/databinding/swt/LinkProperties.java >--- src/org/eclipse/jface/databinding/swt/LinkProperties.java 17 Dec 2008 18:39:58 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,31 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.LinkTextProperty; >- >-/** >- * A factory for creating properties of SWT Links. >- * >- * @since 1.3 >- */ >-public class LinkProperties { >- /** >- * Returns a value property for the text of a SWT Link. >- * >- * @return a value property for the text of a SWT Link. >- */ >- public static IValueProperty text() { >- return new LinkTextProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/ButtonProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/ButtonProperties.java >diff -N src/org/eclipse/jface/databinding/swt/ButtonProperties.java >--- src/org/eclipse/jface/databinding/swt/ButtonProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,31 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.ButtonSelectionProperty; >- >-/** >- * A factory for creating properties of SWT Buttons. >- * >- * @since 1.3 >- */ >-public class ButtonProperties { >- /** >- * Returns a value property for the selection state of a SWT Button. >- * >- * @return a value property for the selection state of a SWT Button. >- */ >- public static IValueProperty selection() { >- return new ButtonSelectionProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/CComboProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/CComboProperties.java >diff -N src/org/eclipse/jface/databinding/swt/CComboProperties.java >--- src/org/eclipse/jface/databinding/swt/CComboProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,62 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.list.IListProperty; >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.CComboItemsProperty; >-import org.eclipse.jface.internal.databinding.swt.CComboSelectionProperty; >-import org.eclipse.jface.internal.databinding.swt.CComboSingleSelectionIndexProperty; >-import org.eclipse.jface.internal.databinding.swt.CComboTextProperty; >- >-/** >- * A factory for creating properties of SWT CCombos >- * >- * @since 1.3 >- */ >-public class CComboProperties { >- /** >- * Returns a value property for the selection text of a SWT CCombo. >- * >- * @return a value property for the selection text of a SWT CCombo. >- */ >- public static IValueProperty selection() { >- return new CComboSelectionProperty(); >- } >- >- /** >- * Returns a value property for the text of a SWT CCombo. >- * >- * @return a value property for the text of a SWT CCombo. >- */ >- public static IValueProperty text() { >- return new CComboTextProperty(); >- } >- >- /** >- * Returns a list property for the items of a SWT CCombo. >- * >- * @return a list property for the items of a SWT CCombo. >- */ >- public static IListProperty items() { >- return new CComboItemsProperty(); >- } >- >- /** >- * Returns a value property for the single selection index of a SWT Combo. >- * >- * @return a value property for the single selection index of a SWT Combo. >- */ >- public static IValueProperty singleSelectionIndex() { >- return new CComboSingleSelectionIndexProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/StyledTextProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/StyledTextProperties.java >diff -N src/org/eclipse/jface/databinding/swt/StyledTextProperties.java >--- src/org/eclipse/jface/databinding/swt/StyledTextProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,36 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.StyledTextTextProperty; >-import org.eclipse.swt.SWT; >- >-/** >- * A factory for creating properties of SWT StyledTexts. >- * >- * @since 1.3 >- */ >-public class StyledTextProperties { >- /** >- * Returns a value property for the text of a SWT StyledText. >- * >- * @param event >- * the SWT event type to register for change events. May be >- * {@link SWT#None}, {@link SWT#Modify} or {@link SWT#FocusOut}. >- * >- * @return a value property for the text of a SWT StyledText. >- */ >- public static IValueProperty text(int event) { >- return new StyledTextTextProperty(event); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/ListProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/ListProperties.java >diff -N src/org/eclipse/jface/databinding/swt/ListProperties.java >--- src/org/eclipse/jface/databinding/swt/ListProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,52 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.list.IListProperty; >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.ListItemsProperty; >-import org.eclipse.jface.internal.databinding.swt.ListSelectionProperty; >-import org.eclipse.jface.internal.databinding.swt.ListSingleSelectionIndexProperty; >- >-/** >- * A factory for creating properties of SWT List controls. >- * >- * @since 1.3 >- */ >-public class ListProperties { >- /** >- * Returns a value property for observing the selection text of a SWT List. >- * >- * @return a value property for observing the selection text of a SWT List. >- */ >- public static IValueProperty selection() { >- return new ListSelectionProperty(); >- } >- >- /** >- * Returns a list property for observing the items in a SWT List. >- * >- * @return a list property for observing the items in a SWT List. >- */ >- public static IListProperty items() { >- return new ListItemsProperty(); >- } >- >- /** >- * Returns a value property for the single selection index of a SWT List. >- * >- * @return a value property for the single selection index of a SWT List. >- */ >- public static IValueProperty singleSelectionIndex() { >- return new ListSingleSelectionIndexProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/ShellProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/ShellProperties.java >diff -N src/org/eclipse/jface/databinding/swt/ShellProperties.java >--- src/org/eclipse/jface/databinding/swt/ShellProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,31 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.ShellTextProperty; >- >-/** >- * A factory for creating properties of SWT Shells. >- * >- * @since 1.3 >- */ >-public class ShellProperties { >- /** >- * Returns a value property for the text of a SWT Shell. >- * >- * @return a value property for the text of a SWT Shell. >- */ >- public static IValueProperty text() { >- return new ShellTextProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/TabItemProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/TabItemProperties.java >diff -N src/org/eclipse/jface/databinding/swt/TabItemProperties.java >--- src/org/eclipse/jface/databinding/swt/TabItemProperties.java 17 Dec 2008 18:39:58 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,31 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.TabItemTooltipTextProperty; >- >-/** >- * A factory for creating properties of SWT TabItems >- * >- * @since 1.3 >- */ >-public class TabItemProperties { >- /** >- * Returns a value property for the tooltip text of a SWT TabItem. >- * >- * @return a value property for the tooltip text of a SWT TabItem. >- */ >- public static IValueProperty tooltipText() { >- return new TabItemTooltipTextProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/ComboProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/ComboProperties.java >diff -N src/org/eclipse/jface/databinding/swt/ComboProperties.java >--- src/org/eclipse/jface/databinding/swt/ComboProperties.java 17 Dec 2008 18:39:57 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,62 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.list.IListProperty; >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.ComboItemsProperty; >-import org.eclipse.jface.internal.databinding.swt.ComboSelectionProperty; >-import org.eclipse.jface.internal.databinding.swt.ComboSingleSelectionIndexProperty; >-import org.eclipse.jface.internal.databinding.swt.ComboTextProperty; >- >-/** >- * A factory for creating properties of SWT Combos. >- * >- * @since 1.3 >- */ >-public class ComboProperties { >- /** >- * Returns a value property for the selection text of a SWT Combo. >- * >- * @return a value property for the selection text of a SWT Combo. >- */ >- public static IValueProperty selection() { >- return new ComboSelectionProperty(); >- } >- >- /** >- * Returns a value property for the text of a SWT Combo. >- * >- * @return a value property for the text of a SWT Combo. >- */ >- public static IValueProperty text() { >- return new ComboTextProperty(); >- } >- >- /** >- * Returns a list property for the items of a SWT Combo. >- * >- * @return a list property for the items of a SWT Combo. >- */ >- public static IListProperty items() { >- return new ComboItemsProperty(); >- } >- >- /** >- * Returns a value property for the single selection index of a SWT Combo. >- * >- * @return a value property for the single selection index of a SWT Combo. >- */ >- public static IValueProperty singleSelectionIndex() { >- return new ComboSingleSelectionIndexProperty(); >- } >-} >Index: src/org/eclipse/jface/databinding/swt/TableColumnProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/TableColumnProperties.java >diff -N src/org/eclipse/jface/databinding/swt/TableColumnProperties.java >--- src/org/eclipse/jface/databinding/swt/TableColumnProperties.java 17 Dec 2008 18:39:58 -0000 1.1.2.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,31 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2008 Matthew Hall 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: >- * Matthew Hall - initial API and implementation (bug 194734) >- ******************************************************************************/ >- >-package org.eclipse.jface.databinding.swt; >- >-import org.eclipse.core.databinding.property.value.IValueProperty; >-import org.eclipse.jface.internal.databinding.swt.TableColumnTooltipTextProperty; >- >-/** >- * A factory for creating properties of SWT TableColumns >- * >- * @since 1.3 >- */ >-public class TableColumnProperties { >- /** >- * Returns a value property for the tooltip text of a SWT TableColumns. >- * >- * @return a value property for the tooltip text of a SWT TableColumns. >- */ >- public static IValueProperty tooltipText() { >- return new TableColumnTooltipTextProperty(); >- } >-} >Index: src/org/eclipse/jface/internal/databinding/swt/WidgetValueProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/Attic/WidgetValueProperty.java,v >retrieving revision 1.1.2.6 >diff -u -r1.1.2.6 WidgetValueProperty.java >--- src/org/eclipse/jface/internal/databinding/swt/WidgetValueProperty.java 8 Jan 2009 01:24:52 -0000 1.1.2.6 >+++ src/org/eclipse/jface/internal/databinding/swt/WidgetValueProperty.java 12 Jan 2009 04:28:11 -0000 >@@ -12,6 +12,7 @@ > package org.eclipse.jface.internal.databinding.swt; > > import org.eclipse.core.databinding.observable.Realm; >+import org.eclipse.core.databinding.observable.value.IObservableValue; > import org.eclipse.core.databinding.property.INativePropertyListener; > import org.eclipse.core.databinding.property.IPropertyChangeListener; > import org.eclipse.core.databinding.property.PropertyChangeEvent; >@@ -86,4 +87,9 @@ > WidgetValueProperty.this)); > } > } >+ >+ public IObservableValue observe(Realm realm, Object source) { >+ return new SWTObservableValueDecorator(super.observe(realm, source), >+ (Widget) source); >+ } > } >Index: src/org/eclipse/jface/internal/databinding/swt/WidgetListProperty.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/Attic/WidgetListProperty.java,v >retrieving revision 1.1.2.3 >diff -u -r1.1.2.3 WidgetListProperty.java >--- src/org/eclipse/jface/internal/databinding/swt/WidgetListProperty.java 8 Jan 2009 01:24:52 -0000 1.1.2.3 >+++ src/org/eclipse/jface/internal/databinding/swt/WidgetListProperty.java 12 Jan 2009 04:28:11 -0000 >@@ -12,6 +12,7 @@ > package org.eclipse.jface.internal.databinding.swt; > > import org.eclipse.core.databinding.observable.Realm; >+import org.eclipse.core.databinding.observable.list.IObservableList; > import org.eclipse.core.databinding.property.list.SimpleListProperty; > import org.eclipse.jface.databinding.swt.SWTObservables; > import org.eclipse.swt.widgets.Widget; >@@ -26,4 +27,8 @@ > return SWTObservables.getRealm(((Widget) source).getDisplay()); > return super.getPreferredRealm(source); > } >+ >+ public IObservableList observe(Realm realm, Object source) { >+ return new SWTObservableListDecorator(super.observe(realm, source), (Widget) source); >+ } > } >Index: src/org/eclipse/jface/databinding/swt/WidgetProperties.java >=================================================================== >RCS file: src/org/eclipse/jface/databinding/swt/WidgetProperties.java >diff -N src/org/eclipse/jface/databinding/swt/WidgetProperties.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/jface/databinding/swt/WidgetProperties.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,442 @@ >+/******************************************************************************* >+ * Copyright (c) 2008 Matthew Hall 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: >+ * Matthew Hall - initial API and implementation (bug 194734) >+ ******************************************************************************/ >+ >+package org.eclipse.jface.databinding.swt; >+ >+import org.eclipse.core.databinding.property.list.DelegatingListProperty; >+import org.eclipse.core.databinding.property.list.IListProperty; >+import org.eclipse.core.databinding.property.value.DelegatingValueProperty; >+import org.eclipse.core.databinding.property.value.IValueProperty; >+import org.eclipse.jface.internal.databinding.swt.ButtonSelectionProperty; >+import org.eclipse.jface.internal.databinding.swt.CComboItemsProperty; >+import org.eclipse.jface.internal.databinding.swt.CComboSelectionProperty; >+import org.eclipse.jface.internal.databinding.swt.CComboSingleSelectionIndexProperty; >+import org.eclipse.jface.internal.databinding.swt.CComboTextProperty; >+import org.eclipse.jface.internal.databinding.swt.CLabelTextProperty; >+import org.eclipse.jface.internal.databinding.swt.CTabItemTooltipTextProperty; >+import org.eclipse.jface.internal.databinding.swt.ComboItemsProperty; >+import org.eclipse.jface.internal.databinding.swt.ComboSelectionProperty; >+import org.eclipse.jface.internal.databinding.swt.ComboSingleSelectionIndexProperty; >+import org.eclipse.jface.internal.databinding.swt.ComboTextProperty; >+import org.eclipse.jface.internal.databinding.swt.ControlBackgroundProperty; >+import org.eclipse.jface.internal.databinding.swt.ControlBoundsProperty; >+import org.eclipse.jface.internal.databinding.swt.ControlEnabledProperty; >+import org.eclipse.jface.internal.databinding.swt.ControlFocusedProperty; >+import org.eclipse.jface.internal.databinding.swt.ControlFontProperty; >+import org.eclipse.jface.internal.databinding.swt.ControlForegroundProperty; >+import org.eclipse.jface.internal.databinding.swt.ControlLocationProperty; >+import org.eclipse.jface.internal.databinding.swt.ControlSizeProperty; >+import org.eclipse.jface.internal.databinding.swt.ControlTooltipTextProperty; >+import org.eclipse.jface.internal.databinding.swt.ControlVisibleProperty; >+import org.eclipse.jface.internal.databinding.swt.ItemTextProperty; >+import org.eclipse.jface.internal.databinding.swt.LabelTextProperty; >+import org.eclipse.jface.internal.databinding.swt.LinkTextProperty; >+import org.eclipse.jface.internal.databinding.swt.ListItemsProperty; >+import org.eclipse.jface.internal.databinding.swt.ListSelectionProperty; >+import org.eclipse.jface.internal.databinding.swt.ListSingleSelectionIndexProperty; >+import org.eclipse.jface.internal.databinding.swt.ScaleMaximumProperty; >+import org.eclipse.jface.internal.databinding.swt.ScaleMinimumProperty; >+import org.eclipse.jface.internal.databinding.swt.ScaleSelectionProperty; >+import org.eclipse.jface.internal.databinding.swt.ShellTextProperty; >+import org.eclipse.jface.internal.databinding.swt.SpinnerMaximumProperty; >+import org.eclipse.jface.internal.databinding.swt.SpinnerMinimumProperty; >+import org.eclipse.jface.internal.databinding.swt.SpinnerSelectionProperty; >+import org.eclipse.jface.internal.databinding.swt.StyledTextTextProperty; >+import org.eclipse.jface.internal.databinding.swt.TabItemTooltipTextProperty; >+import org.eclipse.jface.internal.databinding.swt.TableColumnTooltipTextProperty; >+import org.eclipse.jface.internal.databinding.swt.TableSingleSelectionIndexProperty; >+import org.eclipse.jface.internal.databinding.swt.TextEditableProperty; >+import org.eclipse.jface.internal.databinding.swt.TextTextProperty; >+import org.eclipse.jface.internal.databinding.swt.ToolItemTooltipTextProperty; >+import org.eclipse.jface.internal.databinding.swt.TrayItemTooltipTextProperty; >+import org.eclipse.jface.internal.databinding.swt.TreeItemTooltipTextProperty; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.custom.CCombo; >+import org.eclipse.swt.custom.CLabel; >+import org.eclipse.swt.custom.CTabItem; >+import org.eclipse.swt.custom.StyledText; >+import org.eclipse.swt.widgets.Button; >+import org.eclipse.swt.widgets.Combo; >+import org.eclipse.swt.widgets.Control; >+import org.eclipse.swt.widgets.Item; >+import org.eclipse.swt.widgets.Label; >+import org.eclipse.swt.widgets.Link; >+import org.eclipse.swt.widgets.List; >+import org.eclipse.swt.widgets.Scale; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.swt.widgets.Spinner; >+import org.eclipse.swt.widgets.TabItem; >+import org.eclipse.swt.widgets.Table; >+import org.eclipse.swt.widgets.TableColumn; >+import org.eclipse.swt.widgets.Text; >+import org.eclipse.swt.widgets.ToolItem; >+import org.eclipse.swt.widgets.TrayItem; >+import org.eclipse.swt.widgets.TreeColumn; >+import org.eclipse.swt.widgets.TreeItem; >+ >+/** >+ * A factory for creating properties of SWT controls. >+ * >+ * @since 1.3 >+ */ >+public class WidgetProperties { >+ /** >+ * Returns a value property for observing the background color of a >+ * {@link Control}. >+ * >+ * @return a value property for observing the background color of a >+ * {@link Control}. >+ */ >+ public static IValueProperty background() { >+ return new ControlBackgroundProperty(); >+ } >+ >+ /** >+ * Returns a value property for observing the bounds of a {@link Control}. >+ * >+ * @return a value property for observing the bounds of a {@link Control}. >+ */ >+ public static IValueProperty bounds() { >+ return new ControlBoundsProperty(); >+ } >+ >+ /** >+ * Returns a value property for observing the editable state of a >+ * {@link Text}. >+ * >+ * @return a value property for observing the editable state of a >+ * {@link Text}. >+ */ >+ public static IValueProperty editable() { >+ return new TextEditableProperty(); >+ } >+ >+ /** >+ * Returns a value property for observing the enablement state of a >+ * {@link Control}. >+ * >+ * @return a value property for observing the enablement state of a >+ * {@link Control}. >+ */ >+ public static IValueProperty enabled() { >+ return new ControlEnabledProperty(); >+ } >+ >+ /** >+ * Returns a value property for observing the focus state of a >+ * {@link Control}. >+ * >+ * @return a value property for observing the focus state of a >+ * {@link Control}. >+ */ >+ public static IValueProperty focused() { >+ return new ControlFocusedProperty(); >+ } >+ >+ /** >+ * Returns a value property for observing the font of a {@link Control}. >+ * >+ * @return a value property for observing the font of a {@link Control}. >+ */ >+ public static IValueProperty font() { >+ return new ControlFontProperty(); >+ } >+ >+ /** >+ * Returns a value property for observing the foreground color of a >+ * {@link Control}. >+ * >+ * @return a value property for observing the foreground color of a >+ * {@link Control}. >+ */ >+ public static IValueProperty foreground() { >+ return new ControlForegroundProperty(); >+ } >+ >+ /** >+ * Returns a list property for observing the items of a {@link CCombo}, >+ * {@link Combo} or {@link List}. >+ * >+ * @return a list property for observing the items of a {@link CCombo}, >+ * {@link Combo} or {@link List}. >+ */ >+ public static IListProperty items() { >+ return new DelegatingListProperty(String.class) { >+ private IListProperty cCombo = new CComboItemsProperty(); >+ private IListProperty combo = new ComboItemsProperty(); >+ private IListProperty list = new ListItemsProperty(); >+ >+ protected IListProperty doGetDelegate(Object source) { >+ if (source instanceof CCombo) >+ return cCombo; >+ if (source instanceof Combo) >+ return combo; >+ if (source instanceof List) >+ return list; >+ throw new IllegalArgumentException( >+ "Widget [" + source.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >+ } >+ }; >+ } >+ >+ /** >+ * Returns a value property for observing the location of a {@link Control}. >+ * >+ * @return a value property for observing the location of a {@link Control}. >+ */ >+ public static IValueProperty location() { >+ return new ControlLocationProperty(); >+ } >+ >+ /** >+ * Returns a value property for observing the maximum value of a >+ * {@link Scale} or {@link Spinner}. >+ * >+ * @return a value property for observing the maximum value of a >+ * {@link Scale} or {@link Spinner}. >+ */ >+ public static IValueProperty maximum() { >+ return new DelegatingValueProperty(Integer.TYPE) { >+ private IValueProperty scale = new ScaleMaximumProperty(); >+ private IValueProperty spinner = new SpinnerMaximumProperty(); >+ >+ protected IValueProperty doGetDelegate(Object source) { >+ if (source instanceof Scale) >+ return scale; >+ if (source instanceof Spinner) >+ return spinner; >+ throw new IllegalArgumentException( >+ "Widget [" + source.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >+ } >+ }; >+ } >+ >+ /** >+ * Returns a value property for observing the minimum value of a >+ * {@link Scale} or {@link Spinner}. >+ * >+ * @return a value property for observing the minimum value of a >+ * {@link Scale} or {@link Spinner}. >+ */ >+ public static IValueProperty minimum() { >+ return new DelegatingValueProperty(Integer.TYPE) { >+ private IValueProperty scale = new ScaleMinimumProperty(); >+ private IValueProperty spinner = new SpinnerMinimumProperty(); >+ >+ protected IValueProperty doGetDelegate(Object source) { >+ if (source instanceof Scale) >+ return scale; >+ if (source instanceof Spinner) >+ return spinner; >+ throw new IllegalArgumentException( >+ "Widget [" + source.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >+ } >+ }; >+ } >+ >+ /** >+ * Returns a value property for observing the selection state of a >+ * {@link Button}, {@link CCombo}, {@link Combo}, {@link List}, >+ * {@link Scale} or {@link Spinner}. >+ * >+ * @return a value property for observing the selection state of a >+ * {@link Button}, {@link CCombo}, {@link Combo}, {@link List}, >+ * {@link Scale} or {@link Spinner}. >+ */ >+ public static IValueProperty selection() { >+ return new DelegatingValueProperty() { >+ private IValueProperty button = new ButtonSelectionProperty(); >+ private IValueProperty cCombo = new CComboSelectionProperty(); >+ private IValueProperty combo = new ComboSelectionProperty(); >+ private IValueProperty list = new ListSelectionProperty(); >+ private IValueProperty scale = new ScaleSelectionProperty(); >+ private IValueProperty spinner = new SpinnerSelectionProperty(); >+ >+ protected IValueProperty doGetDelegate(Object source) { >+ if (source instanceof Button) >+ return button; >+ if (source instanceof CCombo) >+ return cCombo; >+ if (source instanceof Combo) >+ return combo; >+ if (source instanceof List) >+ return list; >+ if (source instanceof Scale) >+ return scale; >+ if (source instanceof Spinner) >+ return spinner; >+ throw new IllegalArgumentException( >+ "Widget [" + source.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >+ } >+ }; >+ } >+ >+ /** >+ * Returns a value property for observing the single selection index of a >+ * {@link CCombo}, {@link Combo}, {@link List} or {@link Table}. >+ * >+ * @return a value property for the single selection index of a SWT Combo. >+ */ >+ public static IValueProperty singleSelectionIndex() { >+ return new DelegatingValueProperty(Integer.TYPE) { >+ private IValueProperty cCombo = new CComboSingleSelectionIndexProperty(); >+ private IValueProperty combo = new ComboSingleSelectionIndexProperty(); >+ private IValueProperty list = new ListSingleSelectionIndexProperty(); >+ private IValueProperty table = new TableSingleSelectionIndexProperty(); >+ >+ protected IValueProperty doGetDelegate(Object source) { >+ if (source instanceof CCombo) >+ return cCombo; >+ if (source instanceof Combo) >+ return combo; >+ if (source instanceof List) >+ return list; >+ if (source instanceof Table) >+ return table; >+ throw new IllegalArgumentException( >+ "Widget [" + source.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >+ } >+ }; >+ } >+ >+ /** >+ * Returns a value property for observing the size of a {@link Control}. >+ * >+ * @return a value property for observing the size of a {@link Control}. >+ */ >+ public static IValueProperty size() { >+ return new ControlSizeProperty(); >+ } >+ >+ /** >+ * Returns a value property for observing the text of a {@link CCombo}, >+ * {@link CLabel}, {@link Combo}, {@link Label}, {@link Item}, {@link Link}, >+ * {@link Shell} or {@link Text}. >+ * >+ * @return a value property for observing the text of a {@link CCombo}, >+ * {@link CLabel}, {@link Combo}, {@link Label}, {@link Item}, >+ * {@link Link}, {@link Shell} or {@link Text}. >+ */ >+ public static IValueProperty text() { >+ return new DelegatingValueProperty(String.class) { >+ private IValueProperty cCombo = new CComboTextProperty(); >+ private IValueProperty cLabel = new CLabelTextProperty(); >+ private IValueProperty combo = new ComboTextProperty(); >+ private IValueProperty item = new ItemTextProperty(); >+ private IValueProperty label = new LabelTextProperty(); >+ private IValueProperty link = new LinkTextProperty(); >+ private IValueProperty shell = new ShellTextProperty(); >+ private IValueProperty text = new TextTextProperty(SWT.None); >+ >+ protected IValueProperty doGetDelegate(Object source) { >+ if (source instanceof CCombo) >+ return cCombo; >+ if (source instanceof CLabel) >+ return cLabel; >+ if (source instanceof Combo) >+ return combo; >+ if (source instanceof Item) >+ return item; >+ if (source instanceof Label) >+ return label; >+ if (source instanceof Link) >+ return link; >+ if (source instanceof Shell) >+ return shell; >+ if (source instanceof Text) >+ return text; >+ throw new IllegalArgumentException( >+ "Widget [" + source.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >+ } >+ }; >+ } >+ >+ /** >+ * Returns a value property for observing the text of a {@link StyledText} >+ * or {@link Text}. >+ * >+ * @param event >+ * the SWT event type to register for change events. May be >+ * {@link SWT#None}, {@link SWT#Modify} or {@link SWT#FocusOut}. >+ * >+ * @return a value property for observing the text of a {@link StyledText} >+ * or {@link Text}. >+ */ >+ public static IValueProperty text(final int event) { >+ return new DelegatingValueProperty(String.class) { >+ private IValueProperty styledText = new StyledTextTextProperty( >+ event); >+ private IValueProperty text = new TextTextProperty(event); >+ >+ protected IValueProperty doGetDelegate(Object source) { >+ if (source instanceof StyledText) >+ return styledText; >+ if (source instanceof Text) >+ return text; >+ throw new IllegalArgumentException( >+ "Widget [" + source.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >+ } >+ }; >+ } >+ >+ /** >+ * Returns a value property for observing the tooltip text of a >+ * {@link CTabItem}, {@link Control}, {@link TabItem}, {@link TableColumn}, >+ * {@link ToolItem}, {@link TrayItem}, {@link TreeColumn} or >+ * {@link TreeItem}. >+ * >+ * @return a value property for observing the tooltip text of a >+ * {@link CTabItem}, {@link Control}, {@link TabItem}, >+ * {@link TableColumn}, {@link ToolItem}, {@link TrayItem}, >+ * {@link TreeColumn} or {@link TreeItem}. >+ */ >+ public static IValueProperty tooltipText() { >+ return new DelegatingValueProperty(String.class) { >+ private IValueProperty cTabItem = new CTabItemTooltipTextProperty(); >+ private IValueProperty control = new ControlTooltipTextProperty(); >+ private IValueProperty tabItem = new TabItemTooltipTextProperty(); >+ private IValueProperty tableColumn = new TableColumnTooltipTextProperty(); >+ private IValueProperty toolItem = new ToolItemTooltipTextProperty(); >+ private IValueProperty trayItem = new TrayItemTooltipTextProperty(); >+ private IValueProperty treeItem = new TreeItemTooltipTextProperty(); >+ >+ protected IValueProperty doGetDelegate(Object source) { >+ if (source instanceof CTabItem) >+ return cTabItem; >+ if (source instanceof Control) >+ return control; >+ if (source instanceof TabItem) >+ return tabItem; >+ if (source instanceof TableColumn) >+ return tableColumn; >+ if (source instanceof ToolItem) >+ return toolItem; >+ if (source instanceof TrayItem) >+ return trayItem; >+ if (source instanceof TreeItem) >+ return treeItem; >+ throw new IllegalArgumentException( >+ "Item [" + source.getClass().getName() + "] is not supported."); //$NON-NLS-1$//$NON-NLS-2$ >+ } >+ }; >+ } >+ >+ /** >+ * Returns a value property for observing the visibility state of a >+ * {@link Control}. >+ * >+ * @return a value property for observing the visibility state of a >+ * {@link Control}. >+ */ >+ public static IValueProperty visible() { >+ return new ControlVisibleProperty(); >+ } >+} >#P org.eclipse.jface.tests.databinding >Index: src/org/eclipse/jface/tests/internal/databinding/swt/ScaleObservableValueMaxTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/ScaleObservableValueMaxTest.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 ScaleObservableValueMaxTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/ScaleObservableValueMaxTest.java 6 Jan 2009 06:21:02 -0000 1.2.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/ScaleObservableValueMaxTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,7 +22,7 @@ > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; > import org.eclipse.jface.databinding.swt.SWTObservables; >-import org.eclipse.jface.databinding.swt.ScaleProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Scale; >@@ -97,7 +97,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return ScaleProperties.maximum().observe(realm, scale); >+ return WidgetProperties.maximum().observe(realm, scale); > } > > public void change(IObservable observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/ScaleObservableValueMinTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/ScaleObservableValueMinTest.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 ScaleObservableValueMinTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/ScaleObservableValueMinTest.java 6 Jan 2009 06:21:02 -0000 1.2.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/ScaleObservableValueMinTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,7 +22,7 @@ > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; > import org.eclipse.jface.databinding.swt.SWTObservables; >-import org.eclipse.jface.databinding.swt.ScaleProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Scale; >@@ -97,7 +97,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return ScaleProperties.minimum().observe(realm, scale); >+ return WidgetProperties.minimum().observe(realm, scale); > } > > public void change(IObservable observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/TableSingleSelectionObservableValueTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/TableSingleSelectionObservableValueTest.java,v >retrieving revision 1.1.4.2 >diff -u -r1.1.4.2 TableSingleSelectionObservableValueTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/TableSingleSelectionObservableValueTest.java 6 Jan 2009 06:21:02 -0000 1.1.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/TableSingleSelectionObservableValueTest.java 12 Jan 2009 04:28:13 -0000 >@@ -23,7 +23,7 @@ > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; > import org.eclipse.jface.databinding.swt.SWTObservables; >-import org.eclipse.jface.databinding.swt.TableProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Shell; >@@ -109,7 +109,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return TableProperties.singleSelectionIndex().observe(realm, table); >+ return WidgetProperties.singleSelectionIndex().observe(realm, table); > } > > public Object getValueType(IObservableValue observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/ShellObservableValueTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/ShellObservableValueTest.java,v >retrieving revision 1.1.4.2 >diff -u -r1.1.4.2 ShellObservableValueTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/ShellObservableValueTest.java 6 Jan 2009 06:21:02 -0000 1.1.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/ShellObservableValueTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,7 +22,7 @@ > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; > import org.eclipse.jface.databinding.conformance.util.ValueChangeEventTracker; > import org.eclipse.jface.databinding.swt.SWTObservables; >-import org.eclipse.jface.databinding.swt.ShellProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase; > import org.eclipse.swt.widgets.Shell; > >@@ -112,7 +112,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return ShellProperties.text().observe(realm, shell); >+ return WidgetProperties.text().observe(realm, shell); > } > > public Object getValueType(IObservableValue observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/CLabelObservableValueTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/CLabelObservableValueTest.java,v >retrieving revision 1.1.4.2 >diff -u -r1.1.4.2 CLabelObservableValueTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/CLabelObservableValueTest.java 6 Jan 2009 06:21:02 -0000 1.1.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/CLabelObservableValueTest.java 12 Jan 2009 04:28:13 -0000 >@@ -21,8 +21,8 @@ > import org.eclipse.core.databinding.observable.value.IObservableValue; > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; >-import org.eclipse.jface.databinding.swt.CLabelProperties; > import org.eclipse.jface.databinding.swt.SWTObservables; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.CLabel; > import org.eclipse.swt.widgets.Display; >@@ -90,7 +90,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return CLabelProperties.text().observe(realm, label); >+ return WidgetProperties.text().observe(realm, label); > } > > public void change(IObservable observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/ScaleObservableValueSelectionTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/ScaleObservableValueSelectionTest.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 ScaleObservableValueSelectionTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/ScaleObservableValueSelectionTest.java 6 Jan 2009 06:21:02 -0000 1.2.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/ScaleObservableValueSelectionTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,7 +22,7 @@ > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; > import org.eclipse.jface.databinding.swt.SWTObservables; >-import org.eclipse.jface.databinding.swt.ScaleProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Scale; >@@ -97,7 +97,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return ScaleProperties.selection().observe(realm, scale); >+ return WidgetProperties.selection().observe(realm, scale); > } > > public void change(IObservable observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/StyledTextObservableValueModifyTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/Attic/StyledTextObservableValueModifyTest.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 StyledTextObservableValueModifyTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/StyledTextObservableValueModifyTest.java 6 Jan 2009 06:21:02 -0000 1.1.2.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/StyledTextObservableValueModifyTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,7 +22,7 @@ > import org.eclipse.core.databinding.observable.value.IObservableValue; > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; >-import org.eclipse.jface.databinding.swt.StyledTextProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.StyledText; > import org.eclipse.swt.widgets.Shell; >@@ -55,7 +55,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return StyledTextProperties.text(SWT.Modify).observe(realm, text); >+ return WidgetProperties.text(SWT.Modify).observe(realm, text); > } > > public Object getValueType(IObservableValue observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/CComboObservableValueTextTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/CComboObservableValueTextTest.java,v >retrieving revision 1.1.4.2 >diff -u -r1.1.4.2 CComboObservableValueTextTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/CComboObservableValueTextTest.java 6 Jan 2009 06:21:02 -0000 1.1.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/CComboObservableValueTextTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,8 +22,8 @@ > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; > import org.eclipse.jface.databinding.conformance.util.ValueChangeEventTracker; >-import org.eclipse.jface.databinding.swt.CComboProperties; > import org.eclipse.jface.databinding.swt.SWTObservables; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.jface.internal.databinding.swt.SWTObservableValueDecorator; > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.CCombo; >@@ -89,7 +89,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return new SWTObservableValueDecorator(CComboProperties.text() >+ return new SWTObservableValueDecorator(WidgetProperties.text() > .observe(realm, combo), combo); > } > >Index: src/org/eclipse/jface/tests/internal/databinding/swt/TextObservableValueFocusOutTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/TextObservableValueFocusOutTest.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 TextObservableValueFocusOutTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/TextObservableValueFocusOutTest.java 6 Jan 2009 06:21:02 -0000 1.2.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/TextObservableValueFocusOutTest.java 12 Jan 2009 04:28:14 -0000 >@@ -21,7 +21,7 @@ > import org.eclipse.core.databinding.observable.value.IObservableValue; > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; >-import org.eclipse.jface.databinding.swt.TextProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.swt.widgets.Text; >@@ -54,7 +54,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return TextProperties.text(SWT.FocusOut).observe(realm, text); >+ return WidgetProperties.text(SWT.FocusOut).observe(realm, text); > } > > public Object getValueType(IObservableValue observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/ComboObservableValueTextTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/ComboObservableValueTextTest.java,v >retrieving revision 1.1.4.2 >diff -u -r1.1.4.2 ComboObservableValueTextTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/ComboObservableValueTextTest.java 6 Jan 2009 06:21:02 -0000 1.1.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/ComboObservableValueTextTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,8 +22,8 @@ > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; > import org.eclipse.jface.databinding.conformance.util.ValueChangeEventTracker; >-import org.eclipse.jface.databinding.swt.ComboProperties; > import org.eclipse.jface.databinding.swt.SWTObservables; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.jface.internal.databinding.swt.SWTObservableValueDecorator; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Combo; >@@ -90,7 +90,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return new SWTObservableValueDecorator(ComboProperties.text() >+ return new SWTObservableValueDecorator(WidgetProperties.text() > .observe(realm, combo), combo); > } > >Index: src/org/eclipse/jface/tests/internal/databinding/swt/SpinnerObservableValueSelectionTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/SpinnerObservableValueSelectionTest.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 SpinnerObservableValueSelectionTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/SpinnerObservableValueSelectionTest.java 6 Jan 2009 06:21:02 -0000 1.2.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/SpinnerObservableValueSelectionTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,7 +22,7 @@ > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; > import org.eclipse.jface.databinding.swt.SWTObservables; >-import org.eclipse.jface.databinding.swt.SpinnerProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Shell; >@@ -97,7 +97,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return SpinnerProperties.selection().observe(realm, spinner); >+ return WidgetProperties.selection().observe(realm, spinner); > } > > public void change(IObservable observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/TextEditableObservableValueTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/TextEditableObservableValueTest.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 TextEditableObservableValueTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/TextEditableObservableValueTest.java 6 Jan 2009 06:21:02 -0000 1.2.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/TextEditableObservableValueTest.java 12 Jan 2009 04:28:14 -0000 >@@ -21,7 +21,7 @@ > import org.eclipse.jface.databinding.conformance.ObservableDelegateTest; > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; >-import org.eclipse.jface.databinding.swt.TextProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.swt.widgets.Text; >@@ -102,7 +102,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return TextProperties.editable().observe(realm, text); >+ return WidgetProperties.editable().observe(realm, text); > } > > public Object getValueType(IObservableValue observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/ComboObservableValueTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/ComboObservableValueTest.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 ComboObservableValueTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/ComboObservableValueTest.java 6 Jan 2009 06:21:02 -0000 1.2.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/ComboObservableValueTest.java 12 Jan 2009 04:28:13 -0000 >@@ -17,8 +17,8 @@ > import org.eclipse.core.databinding.observable.value.IObservableValue; > import org.eclipse.core.databinding.property.value.IValueProperty; > import org.eclipse.jface.databinding.conformance.util.ValueChangeEventTracker; >-import org.eclipse.jface.databinding.swt.ComboProperties; > import org.eclipse.jface.databinding.swt.SWTObservables; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.jface.internal.databinding.swt.ComboSelectionProperty; > import org.eclipse.jface.internal.databinding.swt.ComboTextProperty; > import org.eclipse.jface.tests.databinding.AbstractSWTTestCase; >@@ -56,8 +56,8 @@ > } > > public void testSetValueWithNull() { >- testSetValueWithNull(ComboProperties.text()); >- testSetValueWithNull(ComboProperties.selection()); >+ testSetValueWithNull(WidgetProperties.text()); >+ testSetValueWithNull(WidgetProperties.selection()); > } > > protected void testSetValueWithNull(IValueProperty property) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/LabelObservableValueTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/LabelObservableValueTest.java,v >retrieving revision 1.1.4.2 >diff -u -r1.1.4.2 LabelObservableValueTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/LabelObservableValueTest.java 6 Jan 2009 06:21:02 -0000 1.1.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/LabelObservableValueTest.java 12 Jan 2009 04:28:13 -0000 >@@ -21,8 +21,8 @@ > import org.eclipse.jface.databinding.conformance.ObservableDelegateTest; > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; >-import org.eclipse.jface.databinding.swt.LabelProperties; > import org.eclipse.jface.databinding.swt.SWTObservables; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Label; >@@ -93,7 +93,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return LabelProperties.text().observe(realm, label); >+ return WidgetProperties.text().observe(realm, label); > } > > public void change(IObservable observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/TextObservableValueTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/TextObservableValueTest.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 TextObservableValueTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/TextObservableValueTest.java 6 Jan 2009 06:21:02 -0000 1.2.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/TextObservableValueTest.java 12 Jan 2009 04:28:14 -0000 >@@ -17,7 +17,7 @@ > import org.eclipse.core.databinding.observable.Realm; > import org.eclipse.core.databinding.observable.value.IObservableValue; > import org.eclipse.jface.databinding.conformance.util.ValueChangeEventTracker; >-import org.eclipse.jface.databinding.swt.TextProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Shell; >@@ -47,16 +47,16 @@ > */ > public void testConstructorUpdateEventTypes() { > try { >- TextProperties.text(SWT.None); >- TextProperties.text(SWT.FocusOut); >- TextProperties.text(SWT.Modify); >+ WidgetProperties.text(SWT.None); >+ WidgetProperties.text(SWT.FocusOut); >+ WidgetProperties.text(SWT.Modify); > assertTrue(true); > } catch (IllegalArgumentException e) { > fail(); > } > > try { >- TextProperties.text(SWT.Verify); >+ WidgetProperties.text(SWT.Verify); > fail(); > } catch (IllegalArgumentException e) { > assertTrue(true); >@@ -69,7 +69,7 @@ > * @throws Exception > */ > public void testGetValueBeforeFocusOutChangeEventsFire() throws Exception { >- IObservableValue observableValue = TextProperties.text(SWT.FocusOut) >+ IObservableValue observableValue = WidgetProperties.text(SWT.FocusOut) > .observe(Realm.getDefault(), text); > observableValue.addValueChangeListener(listener); > >@@ -96,7 +96,7 @@ > } > > public void testDispose() throws Exception { >- IObservableValue observableValue = TextProperties.text(SWT.Modify) >+ IObservableValue observableValue = WidgetProperties.text(SWT.Modify) > .observe(Realm.getDefault(), text); > ValueChangeEventTracker testCounterValueChangeListener = new ValueChangeEventTracker(); > observableValue.addValueChangeListener(testCounterValueChangeListener); >Index: src/org/eclipse/jface/tests/internal/databinding/swt/StyledTextObservableValueFocusOutTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/Attic/StyledTextObservableValueFocusOutTest.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 StyledTextObservableValueFocusOutTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/StyledTextObservableValueFocusOutTest.java 6 Jan 2009 06:21:02 -0000 1.1.2.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/StyledTextObservableValueFocusOutTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,7 +22,7 @@ > import org.eclipse.core.databinding.observable.value.IObservableValue; > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; >-import org.eclipse.jface.databinding.swt.StyledTextProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.StyledText; > import org.eclipse.swt.widgets.Shell; >@@ -55,7 +55,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return StyledTextProperties.text(SWT.FocusOut).observe(realm, text); >+ return WidgetProperties.text(SWT.FocusOut).observe(realm, text); > } > > public Object getValueType(IObservableValue observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/CComboObservableValueSelectionTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/CComboObservableValueSelectionTest.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 CComboObservableValueSelectionTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/CComboObservableValueSelectionTest.java 6 Jan 2009 06:21:02 -0000 1.2.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/CComboObservableValueSelectionTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,9 +22,9 @@ > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; > import org.eclipse.jface.databinding.conformance.util.ValueChangeEventTracker; >-import org.eclipse.jface.databinding.swt.CComboProperties; > import org.eclipse.jface.databinding.swt.ISWTObservable; > import org.eclipse.jface.databinding.swt.SWTObservables; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.jface.internal.databinding.swt.SWTObservableValueDecorator; > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.CCombo; >@@ -91,7 +91,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return new SWTObservableValueDecorator(CComboProperties.selection() >+ return new SWTObservableValueDecorator(WidgetProperties.selection() > .observe(realm, combo), combo); > } > >Index: src/org/eclipse/jface/tests/internal/databinding/swt/CComboSingleSelectionObservableValueTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/CComboSingleSelectionObservableValueTest.java,v >retrieving revision 1.1.4.2 >diff -u -r1.1.4.2 CComboSingleSelectionObservableValueTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/CComboSingleSelectionObservableValueTest.java 6 Jan 2009 06:21:02 -0000 1.1.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/CComboSingleSelectionObservableValueTest.java 12 Jan 2009 04:28:13 -0000 >@@ -21,8 +21,8 @@ > import org.eclipse.core.databinding.observable.value.IObservableValue; > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; >-import org.eclipse.jface.databinding.swt.CComboProperties; > import org.eclipse.jface.databinding.swt.SWTObservables; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.jface.tests.databinding.AbstractSWTTestCase; > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.CCombo; >@@ -78,7 +78,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return CComboProperties.singleSelectionIndex() >+ return WidgetProperties.singleSelectionIndex() > .observe(realm, combo); > } > >Index: src/org/eclipse/jface/tests/internal/databinding/swt/SpinnerObservableValueMinTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/SpinnerObservableValueMinTest.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 SpinnerObservableValueMinTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/SpinnerObservableValueMinTest.java 6 Jan 2009 06:21:02 -0000 1.2.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/SpinnerObservableValueMinTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,7 +22,7 @@ > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; > import org.eclipse.jface.databinding.swt.SWTObservables; >-import org.eclipse.jface.databinding.swt.SpinnerProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Shell; >@@ -97,7 +97,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return SpinnerProperties.minimum().observe(realm, spinner); >+ return WidgetProperties.minimum().observe(realm, spinner); > } > > public void change(IObservable observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/CComboObservableValueTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/CComboObservableValueTest.java,v >retrieving revision 1.3.4.2 >diff -u -r1.3.4.2 CComboObservableValueTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/CComboObservableValueTest.java 6 Jan 2009 06:21:02 -0000 1.3.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/CComboObservableValueTest.java 12 Jan 2009 04:28:13 -0000 >@@ -18,9 +18,9 @@ > import org.eclipse.core.databinding.observable.value.IObservableValue; > import org.eclipse.core.databinding.property.value.IValueProperty; > import org.eclipse.jface.databinding.conformance.util.ValueChangeEventTracker; >-import org.eclipse.jface.databinding.swt.CComboProperties; > import org.eclipse.jface.databinding.swt.ISWTObservableValue; > import org.eclipse.jface.databinding.swt.SWTObservables; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.jface.tests.databinding.AbstractSWTTestCase; > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.CCombo; >@@ -56,8 +56,8 @@ > } > > public void testSetValueWithNull() { >- testSetValueWithNull(CComboProperties.text()); >- testSetValueWithNull(CComboProperties.selection()); >+ testSetValueWithNull(WidgetProperties.text()); >+ testSetValueWithNull(WidgetProperties.selection()); > } > > protected void testSetValueWithNull(IValueProperty property) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/TextObservableValueModifyTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/TextObservableValueModifyTest.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 TextObservableValueModifyTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/TextObservableValueModifyTest.java 6 Jan 2009 06:21:02 -0000 1.2.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/TextObservableValueModifyTest.java 12 Jan 2009 04:28:14 -0000 >@@ -21,7 +21,7 @@ > import org.eclipse.core.databinding.observable.value.IObservableValue; > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; >-import org.eclipse.jface.databinding.swt.TextProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.swt.widgets.Text; >@@ -54,7 +54,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return TextProperties.text(SWT.Modify).observe(realm, text); >+ return WidgetProperties.text(SWT.Modify).observe(realm, text); > } > > public Object getValueType(IObservableValue observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/ComboObservableValueSelectionTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/ComboObservableValueSelectionTest.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 ComboObservableValueSelectionTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/ComboObservableValueSelectionTest.java 6 Jan 2009 06:21:02 -0000 1.2.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/ComboObservableValueSelectionTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,9 +22,9 @@ > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; > import org.eclipse.jface.databinding.conformance.util.ValueChangeEventTracker; >-import org.eclipse.jface.databinding.swt.ComboProperties; > import org.eclipse.jface.databinding.swt.ISWTObservable; > import org.eclipse.jface.databinding.swt.SWTObservables; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.jface.internal.databinding.swt.SWTObservableValueDecorator; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Combo; >@@ -93,7 +93,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return new SWTObservableValueDecorator(ComboProperties.selection() >+ return new SWTObservableValueDecorator(WidgetProperties.selection() > .observe(realm, combo), combo); > } > >Index: src/org/eclipse/jface/tests/internal/databinding/swt/SpinnerObservableValueMaxTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/SpinnerObservableValueMaxTest.java,v >retrieving revision 1.2.4.2 >diff -u -r1.2.4.2 SpinnerObservableValueMaxTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/SpinnerObservableValueMaxTest.java 6 Jan 2009 06:21:02 -0000 1.2.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/SpinnerObservableValueMaxTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,7 +22,7 @@ > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; > import org.eclipse.jface.databinding.swt.SWTObservables; >-import org.eclipse.jface.databinding.swt.SpinnerProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Shell; >@@ -97,7 +97,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return SpinnerProperties.maximum().observe(realm, spinner); >+ return WidgetProperties.maximum().observe(realm, spinner); > } > > public void change(IObservable observable) { >Index: src/org/eclipse/jface/tests/internal/databinding/swt/ButtonObservableValueTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/swt/ButtonObservableValueTest.java,v >retrieving revision 1.1.4.2 >diff -u -r1.1.4.2 ButtonObservableValueTest.java >--- src/org/eclipse/jface/tests/internal/databinding/swt/ButtonObservableValueTest.java 6 Jan 2009 06:21:02 -0000 1.1.4.2 >+++ src/org/eclipse/jface/tests/internal/databinding/swt/ButtonObservableValueTest.java 12 Jan 2009 04:28:13 -0000 >@@ -22,9 +22,9 @@ > import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableValueContractDelegate; > import org.eclipse.jface.databinding.conformance.swt.SWTMutableObservableValueContractTest; > import org.eclipse.jface.databinding.conformance.util.ValueChangeEventTracker; >-import org.eclipse.jface.databinding.swt.ButtonProperties; > import org.eclipse.jface.databinding.swt.ISWTObservableValue; > import org.eclipse.jface.databinding.swt.SWTObservables; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.jface.tests.databinding.AbstractSWTTestCase; > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Button; >@@ -132,7 +132,7 @@ > } > > public IObservableValue createObservableValue(Realm realm) { >- return ButtonProperties.selection().observe(realm, button); >+ return WidgetProperties.selection().observe(realm, button); > } > > public Object getValueType(IObservableValue observable) { >#P org.eclipse.jface.examples.databinding >Index: src/org/eclipse/jface/examples/databinding/snippets/Snippet025TableViewerWithPropertyDerivedColumns.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Attic/Snippet025TableViewerWithPropertyDerivedColumns.java,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 Snippet025TableViewerWithPropertyDerivedColumns.java >--- src/org/eclipse/jface/examples/databinding/snippets/Snippet025TableViewerWithPropertyDerivedColumns.java 6 Jan 2009 06:20:58 -0000 1.1.2.2 >+++ src/org/eclipse/jface/examples/databinding/snippets/Snippet025TableViewerWithPropertyDerivedColumns.java 12 Jan 2009 04:28:16 -0000 >@@ -23,7 +23,7 @@ > import org.eclipse.core.databinding.observable.value.IObservableValue; > import org.eclipse.core.databinding.property.Properties; > import org.eclipse.jface.databinding.swt.SWTObservables; >-import org.eclipse.jface.databinding.swt.TextProperties; >+import org.eclipse.jface.databinding.swt.WidgetProperties; > import org.eclipse.jface.databinding.viewers.ObservableListContentProvider; > import org.eclipse.jface.databinding.viewers.ObservableMapLabelProvider; > import org.eclipse.jface.databinding.viewers.SelectionProviderProperties; >@@ -250,7 +250,7 @@ > IObservableValue masterSelection = SelectionProviderProperties > .singleSelection().observe(peopleViewer); > >- dbc.bindValue(TextProperties.text(SWT.Modify).observe(nameText), >+ dbc.bindValue(WidgetProperties.text(SWT.Modify).observe(nameText), > BeanProperties.value(Person.class, "name").observeDetail( > masterSelection), null, null); >
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