Ctrl+backspace doesn't honor CamelCase in StyledText
E.g. if cursor is at CamelCase| and one hits Ctrl+bksp the whole word is deleted while only Case should be removed (aka Camel| left)
Command is org.eclipse.ui.edit.text.deletePreviousWord, it then goes to StyledText.getWordPrevious() which in turned create an event handled by a MovementListener, which for the generic editor seems to be org.eclipse.jface.text.TextViewer$TextDoubleClickStrategyConnector.
Actually the MovementListener is a no-op here, but surprisingly, the word limits are decided natively by Pango, in TextLayout._getOffset(). One benefit is that the implementation here matches the native one (I verified and the behavior is the same on Firefox than in Eclipse IDE for Ctrl+Left/Right).
Hi @akurtakov @mickaelistria I have tried to check SWT Snippet213, below apps and they also do the same i mean "deleting the whole word when control+backspace is pressed when cursor is at the end of a camel case word say DeepikaUdayagiri".
- Notepad++
- Ms word
- Search on windows 11 taskbar So for me looks like StyledText is behaving in the similar lines as these native applications, so i feel this is not an issue.
@deepika-u If one uses JDT's Java editor the behavior is as I described but I I agree that it's a very fine line where exactly the bug lies without further investigation.
@akurtakov SWT is working at par with native applications so i dont think its an swt issue. Should i move to JDT.ui?
It's most likely a Generic Editor issue aka Platform UI.