Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is a Realm, and do I need to care?

realm
0
10 Posted

What is a Realm, and do I need to care?

0

The data binding core plug-in does not depend on SWT but needs to talk about “being on the UI thread” in the abstract. The class Realm is similar to SWT’s Display class – you can call Realm.asyncExec(Runnable) to execute code within a realm (read: on the UI thread), but it does not have any UI-specific methods or fields. If your UI is the only source of changes to your model, then everything will happen on the UI thread anyway and you don’t have to worry about realms. Workbench#createAndRunWorkbench will initialize the default realm to be associated with the SWT UI thread if you are writing an RCP application, or a plug-in for the Eclipse Platform. If you are writing an application that only uses SWT, data binding, and optionally JFace, you will have to provide the realm explicitly, or set up a default realm in your main method. All of our Snippets do this – they are standalone applications that just use SWT and JFace. For more information, see the wiki page about Realm.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123