Class SwtDebug

java.lang.Object
com.diffplug.common.swt.SwtDebug

public class SwtDebug extends Object
Helpful utilities for debugging SWT.
  • Constructor Details

    • SwtDebug

      public SwtDebug()
  • Method Details

    • dumpEvent

      public static void dumpEvent(String name, @Nullable DropTargetEvent e)
      Dumps the given SWT event to System.out.
    • dumpEvent

      public static void dumpEvent(String name, @Nullable DropTargetEvent e, StringPrinter to)
      Dumps the given SWT event to the given StringPrinter.
    • dumpEventsDropListener

      public static DropTargetListener dumpEventsDropListener()
      A DropTargetListener which dumps events.
    • dumpEvent

      public static void dumpEvent(String name, @Nullable Event e)
      Dumps the given SWT event to System.out.
    • dumpEvent

      public static void dumpEvent(String name, @Nullable Event e, StringPrinter to)
      Dumps the given SWT event to the given StringPrinter.
    • dumpEvents

      public static void dumpEvents(String name, Widget widget)
      Dumps all events from the given widget to System.out.
    • dumpEvents

      public static void dumpEvents(String name, Widget widget, StringPrinter to)
      Dumps all events from the given widget to the given StringPrinter.
    • dumpEvents

      public static void dumpEvents(String name, Widget widget, StringPrinter to, Integer... toSubscribe)
      Dumps the given events on the widget to the given StringPrinter.
    • dumpEvents

      public static void dumpEvents(String name, Widget widget, StringPrinter to, Collection<Integer> toSubscribe)
      Dumps the given events on the widget to the given StringPrinter.
    • dumpEvents

      public static void dumpEvents(String name, Widget widget, StringPrinter to, Stream<Integer> events)
      Dumps the given events on the widget to the given StringPrinter.
    • eventType

      public static String eventType(Event event)
      Returns the name for the given SWT `event`.
    • eventType

      public static String eventType(int type)
      Returns the name for the given SWT `eventType`.
    • allEvents

      public static ImmutableMap<Integer,String> allEvents()
      Returns a map from the SWT event code to its name, for all SWT events.