Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334539 - [celleditors] change listener
Summary: [celleditors] change listener
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 342832
  Show dependency tree
 
Reported: 2011-01-17 11:45 EST by Nicolas Bros CLA
Modified: 2020-05-01 11:27 EDT (History)
2 users (show)

See Also:
nicolas.bros: indigo+


Attachments
patch (39.95 KB, patch)
2011-04-20 04:32 EDT, Nicolas Bros CLA
nicolas.bros: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Bros CLA 2011-01-17 11:45:27 EST
In some cases, we need to be informed of each modification of the value in the cell editor, before receiving the "commit" event that only happens when the user hits enter or changes the focus.
For example, in dialogs extending JFace TitleAreaDialog, we want the error message to be updated in "real time".
Comment 1 Nicolas Bros CLA 2011-01-17 11:46:50 EST
I propose adding methods addChangeListener and addRemoveListener in org.eclipse.emf.facet.widgets.celleditors.IWidget to allow this.
Comment 2 Gregoire Dupe CLA 2011-04-14 12:59:37 EDT
Hello,

To fix this bug we have to:

 - Add an interface IWidget2 which is a copy of IWidget with four more methods:
	/** Add a listener for commit of the wigdet */
	void addCommitListener(IListener listener);

	/** Remove an existing listener */
	void removeCommitListener(IListener listener);

	/** Add a listener for change to the value */
	void addChangeListener(IListener listener);

	/** Remove an existing listener */
	void removeChangeListener(IListener listener);

        Where the IListener is a platform independant interfaces.

 - Modify the class org.eclipse.emf.facet.widgets.celleditors.AbstractCellEditorComposite<T> to:
  * implement IWidget2.
  * Add a fireChanged

 - Modify all the sub classes of AbstractCellEditorComposite to implement the change notification behavior.

Regards,
Gregoire
Comment 3 Nicolas Bros CLA 2011-04-20 04:32:45 EDT
Created attachment 193666 [details]
patch
Comment 4 Nicolas Bros CLA 2011-04-20 04:33:46 EDT
Done in revision 531.
Comment 5 Gregoire Dupe CLA 2011-06-08 10:08:17 EDT
This bug can be closed.