I have this module that's being used in multiple parts of the application COMM (on the SWT Ui side , on the backend etc). This module has a method sendMessage in which I want to add a routine to determine if the calling thread (just in case of using this in the UI) is the SWT UI thread. And warn the programmer that he is trying to do a time consuming operation from the UI thread ... which is bad :)
I want to do this ofcourse by not adding any dependencies on the UI module (from COMM).
How can I determine if the calling thread is the SWT UI thread ?
Thanks, Mircea