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 127953 Details for
Bug 234496
[DataBinding] ObservableValueEditingSupport: option to use IObservableFactory instead of subclassing
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]
Patch
clipboard.txt (text/plain), 3.48 KB, created by
Matthew Hall
on 2009-03-08 11:47:29 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Matthew Hall
Created:
2009-03-08 11:47:29 EDT
Size:
3.48 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jface.databinding >Index: src/org/eclipse/jface/databinding/viewers/ObservableValueEditingSupport.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableValueEditingSupport.java,v >retrieving revision 1.3 >diff -u -r1.3 ObservableValueEditingSupport.java >--- src/org/eclipse/jface/databinding/viewers/ObservableValueEditingSupport.java 2 Apr 2008 20:44:13 -0000 1.3 >+++ src/org/eclipse/jface/databinding/viewers/ObservableValueEditingSupport.java 8 Mar 2009 15:47:25 -0000 >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Matthew Hall - bug 234496 > *******************************************************************************/ > > package org.eclipse.jface.databinding.viewers; >@@ -14,6 +15,7 @@ > import org.eclipse.core.databinding.Binding; > import org.eclipse.core.databinding.DataBindingContext; > import org.eclipse.core.databinding.UpdateValueStrategy; >+import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory; > import org.eclipse.core.databinding.observable.value.IObservableValue; > import org.eclipse.core.runtime.Assert; > import org.eclipse.jface.viewers.CellEditor; >@@ -145,9 +147,9 @@ > > /** > * Creates a new binding for the provided <code>target</code> and >- * <code>model</code>. Default >- * {@link UpdateValueStrategy value update strategies} are used with the >- * target to model updating on {@link UpdateValueStrategy#POLICY_CONVERT}. >+ * <code>model</code>. Default {@link UpdateValueStrategy value update >+ * strategies} are used with the target to model updating on >+ * {@link UpdateValueStrategy#POLICY_CONVERT}. > * > * @param target > * @param model >@@ -217,4 +219,48 @@ > binding.dispose(); > } > } >+ >+ /** >+ * Returns an ObservableValueEditingSupport instance using the given >+ * arguments. >+ * >+ * @param viewer >+ * the column viewer >+ * @param dbc >+ * the DataBindingContext used for binding between the cell >+ * editor and the viewer element. >+ * @param cellEditor >+ * the cell editor >+ * @param cellEditorObservableFactory >+ * observable factory which creates an IObservableValue observing >+ * the value of the cell editor. >+ * @param elementObservableFactory >+ * observable factory which creates an IObservableValue observing >+ * an aspect of the viewer element. >+ * @return an ObservableValueEditingSupport instance using the given >+ * arguments. >+ * @since 1.3 >+ */ >+ public static EditingSupport create(ColumnViewer viewer, >+ DataBindingContext dbc, final CellEditor cellEditor, >+ final IObservableFactory cellEditorObservableFactory, >+ final IObservableFactory elementObservableFactory) { >+ return new ObservableValueEditingSupport(viewer, dbc) { >+ protected IObservableValue doCreateCellEditorObservable( >+ CellEditor cellEditor) { >+ return (IObservableValue) cellEditorObservableFactory >+ .createObservable(cellEditor.getControl()); >+ } >+ >+ protected IObservableValue doCreateElementObservable( >+ Object element, ViewerCell cell) { >+ return (IObservableValue) elementObservableFactory >+ .createObservable(element); >+ } >+ >+ protected CellEditor getCellEditor(Object element) { >+ return cellEditor; >+ } >+ }; >+ } > }
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 234496
:
102521
|
102527
|
127953
|
128120
|
128121
|
128130