@@ -39,20 +39,29 @@ public class TraversePageHandler extends WidgetMethodHandler {
3939 @ Override
4040 public final Object execute (final ExecutionEvent event ) {
4141 Control focusControl = Display .getCurrent ().getFocusControl ();
42+ System .out .println (1 );
4243 if (focusControl != null ) {
4344 boolean forward = "next" .equals (methodName ); //$NON-NLS-1$
44- int traversal = getTraversalDirection (forward );
45+ System .out .println (methodName );
46+ int traversal = "next" .equals (methodName ) ? SWT .TRAVERSE_PAGE_NEXT : SWT .TRAVERSE_PAGE_PREVIOUS ; //$NON-NLS-1$
47+ // int traversal = getTraversalDirection(forward);
4548 Control control = focusControl ;
4649 do {
4750 if (control instanceof CTabFolder folder && isFinalItemInCTabFolder (folder , forward )) {
51+ System .out .println (isFinalItemInCTabFolder (folder , forward ));
52+
4853 loopToSecondToFirstItemInCTabFolder (folder , forward );
4954 traversal = getTraversalDirection (!forward ); // we are in the second-to-last item in the given
5055 // direction. Now, use the Traverse-event to move back by one
5156 }
52- if (control .traverse (traversal ))
57+ if (control .traverse (traversal )) {
58+ System .out .println ("here" ); //$NON-NLS-1$
5359 return null ;
54- if (control instanceof Shell )
60+ }
61+ if (control instanceof Shell ) {
62+ System .out .println ("there" ); //$NON-NLS-1$
5563 return null ;
64+ }
5665 control = control .getParent ();
5766 } while (control != null );
5867 }
0 commit comments