Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349574

Summary: [CellEditor] EMF Facet Ecore String composite textField cannot be disabled
Product: z_Archived Reporter: Nicolas Guyomar <nicolas.guyomar>
Component: EMF-FacetAssignee: Nicolas Bros <nicolas.bros>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: emft.facet-inbox, gdupe, nicolas.bros
Version: unspecifiedFlags: gdupe: juno+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 349546    
Attachments:
Description Flags
Patch for Bug 349574 nicolas.bros: iplog+, nicolas.bros: review+

Description Nicolas Guyomar CLA 2011-06-16 10:57:35 EDT
Hi,

The composite /org.eclipse.emf.facet.widgets.celleditors.ecore.composite.StringComposite.java does not override setEnabled() method.

It should override it and the boolean value should be passed to the textField, so that when the user disable the whole cellEditor, it also disabled the textField.

Regards,
Nicolas Guyomar
Comment 1 Nicolas Guyomar CLA 2011-06-16 10:59:34 EDT
Created attachment 198117 [details]
Patch for Bug 349574

Hi,

Please find attached the corresponding code modifications.
StringComposite now overrides the setEnabled method in order to disable/enable its inner textField.

(a) I, Nicolas Guyomar, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.

Regards,
Nicolas Guyomar
Comment 2 Nicolas Bros CLA 2011-09-30 05:47:01 EDT
Comment on attachment 198117 [details]
Patch for Bug 349574

This is a contribution from an employee of Mia-Software, targeting a future
Juno release. The company has signed a Member Committer Agreement. The
contribution does not need a CQ (see bug 322327).

Committed in revision 889.
Comment 3 Nicolas Bros CLA 2011-09-30 05:49:01 EDT
Committed in revision 889.
Comment 4 Nicolas Bros CLA 2011-09-30 05:54:49 EDT
Note: the setEnabled method when called on the Composite did disable the Composite and its contents, but the text field inside it did not *appear* to be disabled. So the user may try to click it and wonder why it didn't work. So this patch fixes this by restoring the standard visual clue when a text field is disabled (so that it appears, for example, grayed out on Windows).
Comment 5 Gregoire Dupe CLA 2012-05-23 06:40:42 EDT
This bug can be closed.