/**
* Creates a handler that will properly treat backspaces considering python code.
*/
public static VerifyKeyListener createVerifyKeyListener(final TextViewer viewer, final PyEdit edit) {
return new VerifyKeyListener() {
public void verifyKey(VerifyEvent event) {
if ((event.doit && event.character == SWT.BS && event.stateMask == 0 && viewer != null && viewer
.isEditable())) { //isBackspace
boolean blockSelection = false;