java - Eclipse wizard closes after pressing Enter key -


i've created eclipse wizard. works fine except wizard closes if hit enter key.

i tried handle traverselistener, didn't work.

i tried swt.traverse_return, didn't work.

new traverselistener() {             @override             public void keytraversed(traverseevent event) {                 if(event.keycode == swt.cr){   /** */                      event.doit = false;                 }             }         }; 

the plugin written in java 1.7 in eclipse mars.

what best practice handle issues this?

add traverse listener dialog shell , use swt.traverse_return

getshell().addtraverselistener(new traverselistener() {    @override    public void keytraversed(traverseevent event) {      if (event.detail == swt.traverse_return) {         event.doit = false;      }    } }); 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -