现在的位置: 首页 > 综合 > 正文

SWT Faq

2013年04月05日 ⁄ 综合 ⁄ 共 756字 ⁄ 字号 评论关闭
How do I enable debug mode in Eclipse for SWT?
A: Follow these steps:

  1. Create a .options file in the same directory as your eclipse executable.
  2. Place the following lines in the .options file: 
    org.eclipse.ui/debug=true 
    org.eclipse.ui/debug/swtdebugglobal=true
  3. Start up eclipse from the command line with the debug flag: ./eclipse -debug

All messages from SWT will be printed to the console window.

Q: How can I implement user interaction tests?
A: The method org.eclipse.swt.widgets.Display.post(Event) can be used to post mouse and keyboard events into the OS, which
emulates the user performing the specified action. This is the typical approach that is used for implementing JUnit test cases.

There are also stand-alone applications available for automating SWT user interaction tests:

抱歉!评论已关闭.