Revision 6cf49987
Added by Patrick Plitzner almost 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/event/EventUtility.java | ||
---|---|---|
16 | 16 |
import org.eclipse.e4.core.di.annotations.Optional; |
17 | 17 |
import org.eclipse.e4.core.services.events.IEventBroker; |
18 | 18 |
import org.eclipse.e4.ui.di.UIEventTopic; |
19 |
import org.eclipse.e4.ui.di.UISynchronize; |
|
19 | 20 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
20 | 21 |
import org.eclipse.e4.ui.services.IServiceConstants; |
21 | 22 |
import org.eclipse.swt.widgets.Shell; |
... | ... | |
36 | 37 |
|
37 | 38 |
private static Shell shell; |
38 | 39 |
|
40 |
@Inject |
|
41 |
private static UISynchronize sync; |
|
42 |
|
|
39 | 43 |
@Inject |
40 | 44 |
private static IEventBroker eventBroker; |
41 | 45 |
|
... | ... | |
51 | 55 |
eventBroker.post(topic, data); |
52 | 56 |
} |
53 | 57 |
|
58 |
public static void postSyncEvent(String topic, Object data){ |
|
59 |
sync.syncExec(()->eventBroker.post(topic, data)); |
|
60 |
} |
|
61 |
|
|
62 |
public static void postAsyncEvent(String topic, Object data){ |
|
63 |
sync.asyncExec(()->eventBroker.post(topic, data)); |
|
64 |
} |
|
65 |
|
|
54 | 66 |
public static ECommandService getCommandService() { |
55 | 67 |
return commandService; |
56 | 68 |
} |
Also available in: Unified diff
ref #7439 Re-select after search has finished