What is SwingUtilities.invokeLater()
equivalent in Eclipse API 3.x?
I.e. how to run something on "main thread"?
Can I use
@Inject
UISynchronize sync;
for this in Eclipse Plug-In 3.x?
It is written, that UISynchronize
is valid "since 1.0". What does it mean? Why is it in e4
package then?
You can only use @Inject
simply on Eclipse 4.x application model objects (the Eclipse 4.x API is known as e4
). So unless you do extra work you can't use injection in the Eclipse 3.x API.
More recent versions of Eclipse do support views declared using the e4view
element of the org.eclipse.ui.views
extension point. These can make use of @Inject
.
Display.getDefault().asyncExec()
is used with SWT
objects to run code in the SWT
main thread.
Display.getDefault().asyncExec(new Runnable()
{
@Override
public void run()
{
.. code to update the UI
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With