Skip to main content



      Home
Home » Eclipse Projects » Linux Tools Project » [DATABINDING] Race Condition with Key Board Commit on Linux
[DATABINDING] Race Condition with Key Board Commit on Linux [message #1102235] Thu, 05 September 2013 10:54 Go to next message
Eclipse UserFriend
Hi,

given a simple Dialog with a dialog area containing a Composite, an Ok
and a Cancel Button.

The Composite contains a user and a password Text field.

An object of the ConnectionAttributes class serves as the model with
getters and setters for user and password.

The text fields and the model are connected using jface databinding.

The Dialogs buttonPressed method is overridden in order to actually
execute the login procedure.

This works well on Windows no matter if the user clicks the OK button or
justs hits enter when finished with the password.

On Linux however the password is not transferred to the model when the
user commits his changes using the Enter key. Some debugging revealed
that the Dialog.buttonPressed() method is executed before the
ConnectionAttributes.setPassword() method so the login procedure sees a
null password.

There is some asyncExec going on somewhere inside the databinding stuff
that probably causes executing ConnectionAttributes.setPassword() too
late. I tried to flush the event queue with

while (display.readAndDispatch()) {
; // do nothing
}

before starting the login procedure but to no success.

Strangewisely it works if I verify the order of execution using the
debugger. But as soon as the debugger is detached the order is wrong again.

This use case seems so common so I believe there is a simple solution.

Any ideas?

Thanks and regards,
Dirk
Re: [DATABINDING] Race Condition with Key Board Commit on Linux [message #1102260 is a reply to message #1102235] Thu, 05 September 2013 11:19 Go to previous messageGo to next message
Eclipse UserFriend
Dirk, you should post this to the Eclipse platform forum. The Linux Tools project is a set of plug-ins that enhances Eclipse on Linux, usually sitting on top of the CDT (C/C++ Development Tools) to support things such as LTTng and C/C++ profiling for Linux.
Re: [DATABINDING] Race Condition with Key Board Commit on Linux [message #1102861 is a reply to message #1102260] Fri, 06 September 2013 02:24 Go to previous message
Eclipse UserFriend
Yes of course, it was a mistake, already posted it to
eclipse.platform.jface.

Sorry for that.

Am 05.09.2013 17:19, schrieb Jeff Johnston:
> Dirk, you should post this to the Eclipse platform forum. The Linux
> Tools project is a set of plug-ins that enhances Eclipse on Linux,
> usually sitting on top of the CDT (C/C++ Development Tools) to support
> things such as LTTng and C/C++ profiling for Linux.
Previous Topic:Valgrind keeps showing fixed errors
Next Topic:2.1.0 Release Available
Goto Forum:
  


Current Time: Tue Jul 22 19:00:35 EDT 2025

Powered by FUDForum. Page generated in 0.03597 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top