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

Bug 343655

Summary: CharComposite : magic numbers
Product: z_Archived Reporter: Nicolas Bros <nicolas.bros>
Component: EMF-FacetAssignee: Nicolas Bros <nicolas.bros>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: emft.facet-inbox, gdupe, nicolas.guyomar
Version: unspecifiedFlags: nicolas.bros: indigo+
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Nicolas Bros CLA 2011-04-22 10:29:56 EDT
There are 2 constants defined with magic numbers (127 and 8) in org.eclipse.emf.facet.widgets.celleditors.ecore.composite.CharComposite.

127 corresponds to SWT.DEL, so the SUPPR_KEYCODE ("suppr" is french for "del" by the way) constant can be replaced by SWT.DEL.

As for the DEL_KEYCODE, defined as 8, I don't know what it corresponds to, as it is not defined in SWT. Does the keyCode ever take this value?
Comment 1 Nicolas Guyomar CLA 2011-04-22 10:36:05 EDT
DEL_KEYCODE, defined as 8, correspond the the "BACKSPACE" key on my keyboard
Comment 2 Nicolas Bros CLA 2011-04-22 10:41:46 EDT
(In reply to comment #1)
> DEL_KEYCODE, defined as 8, correspond the the "BACKSPACE" key on my keyboard

Ok. So it should be SWT.BS, which is defined as '\b' and which is equal to 8.
Comment 3 Nicolas Bros CLA 2011-04-26 05:11:20 EDT
Fixed in revision 572.
Comment 4 Gregoire Dupe CLA 2011-06-08 11:05:01 EDT
CharComposite does not define any constants. This bug can then be closed.