Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[albireo-dev] thoughts on how to proceed

Hi Gordon,

Some thoughts about testing and its implications.

About the tests
===============

Changes in the mouse event subsystem will inevitably have an effect on
what happens with the focus and with the cursors. There are many similar
dependencies.

Also, we want to guarantee that things work on all platforms, and not
every developer has access to all platforms. (I have access to Linux,
MacOS X and - if needed - Windows.)

Therefore, I would find it appropriate to have a set of tests that can
be run to verify the functioning of particular features. These tests are
manual (since that's probably more faithful than any java.awt.Robot like
class). I.e. each test consists of some Eclipse/RCP application together
with one (or multiple) scripts which actions to execute. Example:
  - Start application XY.
  - Open window of type Z.
  - Right-click, to get a popup menu.
  - Click outside the main window.
  - Verify that the popup menu has disappeared.

What to do first
================

Mouse events handling should be implemented before focus event handling;
simple key events handling should be implemented before focus event handling;
popup menus should be implemented after focus event handling, IMO.

If we want to have the same code )mostly) across all platforms, this means
IMO that we have to test the mouse event handling on all platforms before
we can start working on focus event handling. Otherwise, we discover late
that mouse events on, say, MacOS X, work differently, have to rewrite
the mouse event handling, and the focus event handling on Windows gets
easily broken.

But first of all, I think, the single-event-thread feature should be
implemented. The reason is that
  1) single-event-thread is an important feature: many developers will
     not be able to build a _large_ and _reliable_ application if they
     have to constantly switch from AWT to SWT thread and back, using
     various synchronization mechanisms.
  2) the behaviour of mouse and focus is very different (it shows different
     bugs) when the two event threads are merged and when they are separate.
     Since single-event-thread is an optional feature, it means that each
     testing must be executed twice. And, to ensure a common code that
     works for both cases, it's best if the single-event-thread feature
     is already implemented when we start working on popup menus, focus etc.

Bruno


Back to the top