What is a Realm, and do I need to care?
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
- OK, so I can get Murky to Horde characters on that PvP realm. Can I transfer an Alliance character on a PvE realm to a PvP realm on which I play other Alliance characters?
- OK, so I can’t get Murky to Horde characters on that PvP realm. Can I transfer an Alliance character on a PvE realm to a PvP realm on which I play other Alliance characters?
- If I transfer a character holding an account-bound item to a new realm, will I be able to distribute the item to characters on the new realm?