Revision 12f80804
Added by Andreas Kohlbecker about 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/debug/EntityCacheDebugger.java | ||
---|---|---|
13 | 13 |
import java.util.Optional; |
14 | 14 |
|
15 | 15 |
import org.apache.log4j.Logger; |
16 |
import org.springframework.beans.factory.annotation.Autowired; |
|
16 | 17 |
import org.springframework.context.annotation.Profile; |
17 | 18 |
import org.springframework.stereotype.Component; |
18 | 19 |
import org.vaadin.spring.events.Event; |
19 | 20 |
import org.vaadin.spring.events.EventBus; |
20 |
import org.vaadin.spring.events.EventBus.ViewEventBus;
|
|
21 |
import org.vaadin.spring.events.EventBus.UIEventBus;
|
|
21 | 22 |
import org.vaadin.spring.events.EventBusListener; |
22 | 23 |
|
23 | 24 |
import com.vaadin.event.ShortcutAction; |
24 | 25 |
import com.vaadin.event.ShortcutListener; |
25 | 26 |
import com.vaadin.navigator.View; |
26 | 27 |
import com.vaadin.navigator.ViewChangeListener; |
28 |
import com.vaadin.spring.annotation.UIScope; |
|
27 | 29 |
import com.vaadin.ui.UI; |
28 | 30 |
import com.vaadin.ui.Window; |
29 | 31 |
|
... | ... | |
40 | 42 |
* |
41 | 43 |
*/ |
42 | 44 |
@Component |
45 |
@UIScope |
|
43 | 46 |
@Profile("debug") |
44 | 47 |
public class EntityCacheDebugger implements ViewChangeListener, EventBusListener<PopEditorOpenedEvent> { |
45 | 48 |
|
46 | 49 |
Logger logger = Logger.getLogger(EntityCacheDebugger.class); |
47 |
private ViewEventBus viewEventBus; |
|
48 | 50 |
|
51 |
private UIEventBus uiEventBus; |
|
49 | 52 |
|
50 |
// @Autowired // FIXME autowiring fails, need to put in UI Scope? |
|
51 |
protected final void setViewEventBus(EventBus.ViewEventBus viewEventBus){ |
|
52 |
this.viewEventBus = viewEventBus; |
|
53 |
viewEventBus.subscribe(this); |
|
53 |
|
|
54 |
@Autowired |
|
55 |
protected final void setUIEventBus(EventBus.UIEventBus uiEventBus){ |
|
56 |
this.uiEventBus = uiEventBus; |
|
57 |
uiEventBus.subscribe(this); |
|
54 | 58 |
} |
55 | 59 |
|
56 | 60 |
EntityCacheDebuggerShortcutListener shortcutListener; |
Also available in: Unified diff
#7231 fixing bug in EntityCacheDebugger