Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315173 - di.extensions should work headless
Summary: di.extensions should work headless
Status: CLOSED DUPLICATE of bug 315325
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 03:10 EDT by Gunnar Wagenknecht CLA
Modified: 2010-06-03 15:50 EDT (History)
1 user (show)

See Also:


Attachments
SWT access using reflection (3.80 KB, patch)
2010-06-02 13:59 EDT, Gunnar Wagenknecht CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gunnar Wagenknecht CLA 2010-06-01 03:10:14 EDT
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.
Comment 1 John Arthorne CLA 2010-06-01 11:30:37 EDT
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?
Comment 2 Oleg Besedin CLA 2010-06-02 13:44:11 EDT
(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.
Comment 3 Oleg Besedin CLA 2010-06-02 13:48:28 EDT
(In reply to comment #2)
> ("org.eclipse.e4.core.di.extensions"?)

That should have been "org.eclipse.e4.core.di.extensions.ui".
Comment 4 Gunnar Wagenknecht CLA 2010-06-02 13:59:08 EDT
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.
Comment 5 Oleg Besedin CLA 2010-06-03 15:50:33 EDT
Fixed as a part of bug 315325.

*** This bug has been marked as a duplicate of bug 315325 ***