Community
Participate
Working Groups
It would be nice to either refactor UI specific extensions into a new bundle (di.extensions.ui) or to make the dependencies on UI code (eg. SWT) optional. This would allow reusing those extensions in a headless environment.
It looks like the dependency just comes from UIEventObjectSupplier. I think this event handler could just be moved somewhere like org.eclipse.ui.workbench.swt rather than creating a new bundle for it. What do you think Oleg?
(In reply to comment #1) > org.eclipse.ui.workbench.swt You mean "org.eclipse.e4.ui.workbench.swt" ? That bundle depends on org.eclipse.e4.ui.workbench. The better place would be something on e4-JFace level, but we don't have such bundles at the moment. Plus UIEventObjectSupplier needs internal EventObjectSupplier (which can be worked around via x-friends - if we need to). I'd rather move UIEventTopic/UIEventObjectSupplier into a separate package ("org.eclipse.e4.core.di.extensions"?) in its current bundle and mark SWT dependency as optional.
(In reply to comment #2) > ("org.eclipse.e4.core.di.extensions"?) That should have been "org.eclipse.e4.core.di.extensions.ui".
Created attachment 170851 [details] SWT access using reflection What about also using reflection? I hacked a quick idea together. This would allow compiling without SWT.
Fixed as a part of bug 315325. *** This bug has been marked as a duplicate of bug 315325 ***