Browse Source

Pass EventBus in to FrameContainer.

Change-Id: I65695d195052b7800e14f2128c84d344f61ff19c
Depends-On: I711722755bbf78de5b3ae3a6eec3e43985f4ed63
Reviewed-on: http://gerrit.dmdirc.com/3446
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
changes/46/3446/2
Chris Smith 10 years ago
parent
commit
a985fe1df8

+ 6
- 1
src/com/dmdirc/addons/dcc/ChatContainer.java View File

@@ -32,6 +32,8 @@ import com.dmdirc.ui.core.components.WindowComponent;
32 32
 import com.dmdirc.ui.input.TabCompleterFactory;
33 33
 import com.dmdirc.util.URLBuilder;
34 34
 
35
+import com.google.common.eventbus.EventBus;
36
+
35 37
 import java.util.Arrays;
36 38
 
37 39
 /**
@@ -58,6 +60,7 @@ public class ChatContainer extends DCCFrameContainer implements DCCChatHandler {
58 60
      * @param tabCompleterFactory The factory to use to create tab completers.
59 61
      * @param messageSinkManager  The sink manager to use to despatch messages.
60 62
      * @param urlBuilder          The URL builder to use when finding icons.
63
+     * @param eventBus            The bus to despatch events on.
61 64
      */
62 65
     public ChatContainer(
63 66
             final DCCChat dcc,
@@ -68,12 +71,14 @@ public class ChatContainer extends DCCFrameContainer implements DCCChatHandler {
68 71
             final String targetNick,
69 72
             final TabCompleterFactory tabCompleterFactory,
70 73
             final MessageSinkManager messageSinkManager,
71
-            final URLBuilder urlBuilder) {
74
+            final URLBuilder urlBuilder,
75
+            final EventBus eventBus) {
72 76
         super(title, "dcc-chat-inactive", configManager,
73 77
                 new DCCCommandParser(configManager, commandController),
74 78
                 messageSinkManager,
75 79
                 tabCompleterFactory,
76 80
                 urlBuilder,
81
+                eventBus,
77 82
                 Arrays.asList(
78 83
                         WindowComponent.TEXTAREA.getIdentifier(),
79 84
                         WindowComponent.INPUTFIELD.getIdentifier()));

+ 11
- 4
src/com/dmdirc/addons/dcc/DCCCommand.java View File

@@ -49,6 +49,8 @@ import com.dmdirc.ui.input.TabCompleterFactory;
49 49
 import com.dmdirc.ui.input.TabCompletionType;
50 50
 import com.dmdirc.util.URLBuilder;
51 51
 
52
+import com.google.common.eventbus.EventBus;
53
+
52 54
 import java.io.File;
53 55
 import java.util.concurrent.Callable;
54 56
 
@@ -77,6 +79,8 @@ public class DCCCommand extends Command implements IntelligentCommand {
77 79
     private final TabCompleterFactory tabCompleterFactory;
78 80
     /** The URL builder to use when finding icons. */
79 81
     private final URLBuilder urlBuilder;
82
+    /** The bus to despatch events on. */
83
+    private final EventBus eventBus;
80 84
 
81 85
     /**
82 86
      * Creates a new instance of DCCCommand.
@@ -88,6 +92,7 @@ public class DCCCommand extends Command implements IntelligentCommand {
88 92
      * @param windowManager       Window management
89 93
      * @param tabCompleterFactory The factory to use for tab completers.
90 94
      * @param urlBuilder          The URL builder to use when finding icons.
95
+     * @param eventBus            The bus to despatch events on.
91 96
      */
92 97
     @Inject
93 98
     public DCCCommand(
@@ -97,7 +102,8 @@ public class DCCCommand extends Command implements IntelligentCommand {
97 102
             final MessageSinkManager messageSinkManager,
98 103
             final WindowManager windowManager,
99 104
             final TabCompleterFactory tabCompleterFactory,
100
-            final URLBuilder urlBuilder) {
105
+            final URLBuilder urlBuilder,
106
+            final EventBus eventBus) {
101 107
         super(controller);
102 108
         this.mainFrame = mainFrame;
103 109
         myPlugin = plugin;
@@ -105,6 +111,7 @@ public class DCCCommand extends Command implements IntelligentCommand {
105 111
         this.windowManager = windowManager;
106 112
         this.tabCompleterFactory = tabCompleterFactory;
107 113
         this.urlBuilder = urlBuilder;
114
+        this.eventBus = eventBus;
108 115
     }
109 116
 
110 117
     @Override
@@ -169,7 +176,7 @@ public class DCCCommand extends Command implements IntelligentCommand {
169 176
         if (myPlugin.listen(chat)) {
170 177
             final ChatContainer window = new ChatContainer(chat, origin.getConfigManager(),
171 178
                     getController(), "*Chat: " + target, myNickname, target, tabCompleterFactory,
172
-                    messageSinkManager, urlBuilder);
179
+                    messageSinkManager, urlBuilder, eventBus);
173 180
             windowManager.addWindow(myPlugin.getContainer(), window);
174 181
             parser.sendCTCP(target, "DCC", "CHAT chat " + DCC.ipToLong(
175 182
                     myPlugin.getListenIP(parser)) + " " + chat.getPort());
@@ -247,7 +254,7 @@ public class DCCCommand extends Command implements IntelligentCommand {
247 254
                     final Parser parser = connection.getParser();
248 255
                     final TransferContainer container = new TransferContainer(myPlugin, send,
249 256
                             origin.getConfigManager(), "Send: " + target,
250
-                            target, connection, urlBuilder);
257
+                            target, connection, urlBuilder, eventBus);
251 258
                     windowManager.addWindow(myPlugin.getContainer(), container);
252 259
                     parser.sendCTCP(target, "DCC", "SEND \""
253 260
                             + selectedFile.getName() + "\" "
@@ -260,7 +267,7 @@ public class DCCCommand extends Command implements IntelligentCommand {
260 267
                     if (myPlugin.listen(send)) {
261 268
                         final TransferContainer container = new TransferContainer(myPlugin, send,
262 269
                                 origin.getConfigManager(), "*Send: "
263
-                                + target, target, connection, urlBuilder);
270
+                                + target, target, connection, urlBuilder, eventBus);
264 271
                         windowManager.addWindow(myPlugin.getContainer(), container);
265 272
                         parser.sendCTCP(target, "DCC", "SEND \""
266 273
                                 + selectedFile.getName() + "\" "

+ 5
- 0
src/com/dmdirc/addons/dcc/DCCFrameContainer.java View File

@@ -30,6 +30,8 @@ import com.dmdirc.messages.MessageSinkManager;
30 30
 import com.dmdirc.ui.input.TabCompleterFactory;
31 31
 import com.dmdirc.util.URLBuilder;
32 32
 
33
+import com.google.common.eventbus.EventBus;
34
+
33 35
 import java.util.Collection;
34 36
 
35 37
 /**
@@ -50,6 +52,7 @@ public abstract class DCCFrameContainer extends FrameContainer {
50 52
      * @param messageSinkManager  The sink manager to use to despatch messages.
51 53
      * @param tabCompleterFactory The factory to use to create tab completers.
52 54
      * @param urlBuilder          The URL builder to use when finding icons.
55
+     * @param eventBus            The bus to despatch events on.
53 56
      * @param components          The UI components that this frame requires
54 57
      */
55 58
     public DCCFrameContainer(
@@ -60,10 +63,12 @@ public abstract class DCCFrameContainer extends FrameContainer {
60 63
             final MessageSinkManager messageSinkManager,
61 64
             final TabCompleterFactory tabCompleterFactory,
62 65
             final URLBuilder urlBuilder,
66
+            final EventBus eventBus,
63 67
             final Collection<String> components) {
64 68
         super(icon, title, title, configManager, urlBuilder, parser,
65 69
                 tabCompleterFactory.getTabCompleter(configManager),
66 70
                 messageSinkManager,
71
+                eventBus,
67 72
                 components);
68 73
     }
69 74
 

+ 11
- 4
src/com/dmdirc/addons/dcc/DCCManager.java View File

@@ -55,6 +55,8 @@ import com.dmdirc.ui.WindowManager;
55 55
 import com.dmdirc.ui.input.TabCompleterFactory;
56 56
 import com.dmdirc.util.URLBuilder;
57 57
 
58
+import com.google.common.eventbus.EventBus;
59
+
58 60
 import java.io.File;
59 61
 import java.io.IOException;
60 62
 import java.net.InetAddress;
@@ -91,6 +93,8 @@ public class DCCManager implements ActionListener {
91 93
     private final String domain;
92 94
     /** The URL builder to use when finding icons. */
93 95
     private final URLBuilder urlBuilder;
96
+    /** The bus to despatch events on. */
97
+    private final EventBus eventBus;
94 98
 
95 99
     /**
96 100
      * Creates a new instance of this plugin.
@@ -106,6 +110,7 @@ public class DCCManager implements ActionListener {
106 110
      * @param windowFactory         The window factory to register the DCC implementations with.
107 111
      * @param componentFrameFactory Factory to use to create new component frames for DCC windows.
108 112
      * @param urlBuilder            The URL builder to use when finding icons.
113
+     * @param eventBus              The bus to despatch events on.
109 114
      * @param commandParser         The command parser to use for DCC windows.
110 115
      * @param baseDirectory         The directory to create a downloads directory within.
111 116
      */
@@ -122,6 +127,7 @@ public class DCCManager implements ActionListener {
122 127
             final SwingWindowFactory windowFactory,
123 128
             final ComponentFrameFactory componentFrameFactory,
124 129
             final URLBuilder urlBuilder,
130
+            final EventBus eventBus,
125 131
             final GlobalCommandParser commandParser,
126 132
             @Directory(DirectoryType.BASE) final String baseDirectory) {
127 133
         this.mainFrame = mainFrame;
@@ -132,6 +138,7 @@ public class DCCManager implements ActionListener {
132 138
         this.domain = pluginInfo.getDomain();
133 139
         this.config = globalConfig;
134 140
         this.urlBuilder = urlBuilder;
141
+        this.eventBus = eventBus;
135 142
 
136 143
         windowFactory.registerImplementation(
137 144
                 new HashSet<>(Arrays.asList("com.dmdirc.addons.dcc.ui.PlaceholderPanel")),
@@ -221,7 +228,7 @@ public class DCCManager implements ActionListener {
221 228
                 final boolean resume = handleResume(jc);
222 229
                 if (reverse && !token.isEmpty()) {
223 230
                     TransferContainer container = new TransferContainer(DCCManager.this, send,
224
-                            config, "*Receive: " + nickname, nickname, null, urlBuilder);
231
+                            config, "*Receive: " + nickname, nickname, null, urlBuilder, eventBus);
225 232
                     windowManager.addWindow(getContainer(), container);
226 233
                     send.setToken(token);
227 234
                     if (resume) {
@@ -247,7 +254,7 @@ public class DCCManager implements ActionListener {
247 254
                     }
248 255
                 } else {
249 256
                     TransferContainer container = new TransferContainer(DCCManager.this, send,
250
-                            config, "Receive: " + nickname, nickname, null, urlBuilder);
257
+                            config, "Receive: " + nickname, nickname, null, urlBuilder, eventBus);
251 258
                     windowManager.addWindow(getContainer(), container);
252 259
                     if (resume) {
253 260
                         parser.sendCTCP(nickname, "DCC", "RESUME "
@@ -431,7 +438,7 @@ public class DCCManager implements ActionListener {
431 438
                     .getLocalClient().getNickname();
432 439
             final DCCFrameContainer f = new ChatContainer(chat, config, commandController,
433 440
                     "Chat: " + nickname, myNickname, nickname, tabCompleterFactory,
434
-                    messageSinkManager, urlBuilder);
441
+                    messageSinkManager, urlBuilder, eventBus);
435 442
             windowManager.addWindow(getContainer(), f);
436 443
             f.addLine("DCCChatStarting", nickname, chat.getHost(),
437 444
                     chat.getPort());
@@ -678,7 +685,7 @@ public class DCCManager implements ActionListener {
678 685
      * Create the container window.
679 686
      */
680 687
     protected void createContainer() {
681
-        container = new PlaceholderContainer(this, config, mainFrame, urlBuilder);
688
+        container = new PlaceholderContainer(this, config, mainFrame, urlBuilder, eventBus);
682 689
         windowManager.addWindow(container);
683 690
     }
684 691
 

+ 6
- 2
src/com/dmdirc/addons/dcc/PlaceholderContainer.java View File

@@ -29,6 +29,8 @@ import com.dmdirc.interfaces.Connection;
29 29
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
30 30
 import com.dmdirc.util.URLBuilder;
31 31
 
32
+import com.google.common.eventbus.EventBus;
33
+
32 34
 import java.awt.Dialog.ModalityType;
33 35
 import java.util.Arrays;
34 36
 
@@ -49,13 +51,15 @@ public class PlaceholderContainer extends FrameContainer {
49 51
      * @param config     Config manager
50 52
      * @param mainFrame  Frame that will own new dialogs.
51 53
      * @param urlBuilder The URL builder to use when finding icons.
54
+     * @param eventBus   The bus to despatch events on.
52 55
      */
53 56
     public PlaceholderContainer(
54 57
             final DCCManager plugin,
55 58
             final AggregateConfigProvider config,
56 59
             final MainFrame mainFrame,
57
-            final URLBuilder urlBuilder) {
58
-        super("dcc", "DCCs", "DCCs", config, urlBuilder,
60
+            final URLBuilder urlBuilder,
61
+            final EventBus eventBus) {
62
+        super("dcc", "DCCs", "DCCs", config, urlBuilder, eventBus,
59 63
                 Arrays.asList("com.dmdirc.addons.dcc.ui.PlaceholderPanel"));
60 64
         this.plugin = plugin;
61 65
         this.mainFrame = mainFrame;

+ 8
- 4
src/com/dmdirc/addons/dcc/TransferContainer.java View File

@@ -34,6 +34,8 @@ import com.dmdirc.parser.interfaces.Parser;
34 34
 import com.dmdirc.parser.interfaces.callbacks.SocketCloseListener;
35 35
 import com.dmdirc.util.URLBuilder;
36 36
 
37
+import com.google.common.eventbus.EventBus;
38
+
37 39
 import java.awt.Desktop;
38 40
 import java.io.File;
39 41
 import java.util.Arrays;
@@ -68,8 +70,8 @@ public class TransferContainer extends FrameContainer implements
68 70
     /** Connection the send was initiated on. */
69 71
     private Connection connection = null;
70 72
     /** Show open button. */
71
-    private boolean showOpen = Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(
72
-            Desktop.Action.OPEN);
73
+    private final boolean showOpen = Desktop.isDesktopSupported()
74
+            && Desktop.getDesktop().isSupported(Desktop.Action.OPEN);
73 75
 
74 76
     /**
75 77
      * Creates a new instance of DCCTransferWindow with a given DCCTransfer object.
@@ -81,13 +83,15 @@ public class TransferContainer extends FrameContainer implements
81 83
      * @param targetNick Nickname of target
82 84
      * @param connection The connection that the send was that initiated on
83 85
      * @param urlBuilder The URL builder to use when finding icons.
86
+     * @param eventBus   The bus to despatch events on.
84 87
      */
85 88
     public TransferContainer(final DCCManager plugin, final DCCTransfer dcc,
86 89
             final AggregateConfigProvider config, final String title,
87
-            final String targetNick, final Connection connection, final URLBuilder urlBuilder) {
90
+            final String targetNick, final Connection connection,
91
+            final URLBuilder urlBuilder, final EventBus eventBus) {
88 92
         super(dcc.getType() == DCCTransfer.TransferType.SEND
89 93
                 ? "dcc-send-inactive" : "dcc-receive-inactive",
90
-                title, title, config, urlBuilder,
94
+                title, title, config, urlBuilder, eventBus,
91 95
                 Arrays.asList("com.dmdirc.addons.dcc.ui.TransferPanel"));
92 96
         this.plugin = plugin;
93 97
         this.dcc = dcc;

+ 5
- 1
src/com/dmdirc/addons/logging/HistoryWindow.java View File

@@ -28,6 +28,8 @@ import com.dmdirc.ui.core.components.WindowComponent;
28 28
 import com.dmdirc.util.URLBuilder;
29 29
 import com.dmdirc.util.io.ReverseFileReader;
30 30
 
31
+import com.google.common.eventbus.EventBus;
32
+
31 33
 import java.util.Arrays;
32 34
 
33 35
 /**
@@ -42,6 +44,7 @@ public class HistoryWindow extends FrameContainer {
42 44
      * @param reader     The reader to use to get the history
43 45
      * @param parent     The window this history window was opened from
44 46
      * @param urlBuilder The URL builder to use when finding icons.
47
+     * @param eventBus   The bus to despatch events on.
45 48
      * @param numLines   The number of lines to show
46 49
      */
47 50
     public HistoryWindow(
@@ -49,8 +52,9 @@ public class HistoryWindow extends FrameContainer {
49 52
             final ReverseFileReader reader,
50 53
             final FrameContainer parent,
51 54
             final URLBuilder urlBuilder,
55
+            final EventBus eventBus,
52 56
             final int numLines) {
53
-        super("raw", title, title, parent.getConfigManager(), urlBuilder,
57
+        super("raw", title, title, parent.getConfigManager(), urlBuilder, eventBus,
54 58
                 Arrays.asList(WindowComponent.TEXTAREA.getIdentifier()));
55 59
 
56 60
         final int frameBufferSize = parent.getConfigManager().getOptionInt(

+ 1
- 1
src/com/dmdirc/addons/logging/LoggingManager.java View File

@@ -825,7 +825,7 @@ public class LoggingManager implements ActionListener, ConfigChangeListener {
825 825
         }
826 826
 
827 827
         final HistoryWindow window = new HistoryWindow("History", reader, target, urlBuilder,
828
-                historyLines);
828
+                eventBus, historyLines);
829 829
         windowManager.addWindow(target, window);
830 830
 
831 831
         return true;

+ 6
- 2
src/com/dmdirc/addons/parserdebug/DebugWindow.java View File

@@ -29,6 +29,8 @@ import com.dmdirc.parser.interfaces.callbacks.DebugInfoListener;
29 29
 import com.dmdirc.ui.core.components.WindowComponent;
30 30
 import com.dmdirc.util.URLBuilder;
31 31
 
32
+import com.google.common.eventbus.EventBus;
33
+
32 34
 import java.util.Arrays;
33 35
 
34 36
 /**
@@ -51,15 +53,17 @@ public class DebugWindow extends FrameContainer {
51 53
      * @param parser     The parser this plugin is debugging
52 54
      * @param connection The connection this window is associated with.
53 55
      * @param urlBuilder The URL builder to use when finding icons.
56
+     * @param eventBus   The bus to despatch events on.
54 57
      */
55 58
     public DebugWindow(
56 59
             final DebugInfoListener listener,
57 60
             final String title,
58 61
             final Parser parser,
59 62
             final Connection connection,
60
-            final URLBuilder urlBuilder) {
63
+            final URLBuilder urlBuilder,
64
+            final EventBus eventBus) {
61 65
         super("raw", "Parser Debug", title, connection.getWindowModel().getConfigManager(),
62
-                urlBuilder, Arrays.asList(WindowComponent.TEXTAREA.getIdentifier()));
66
+                urlBuilder, eventBus, Arrays.asList(WindowComponent.TEXTAREA.getIdentifier()));
63 67
         this.listener = listener;
64 68
         this.parser = parser;
65 69
         this.connection = connection;

+ 1
- 1
src/com/dmdirc/addons/parserdebug/ParserDebugManager.java View File

@@ -98,7 +98,7 @@ public class ParserDebugManager implements DebugInfoListener {
98 98
         try {
99 99
             parser.getCallbackManager().addCallback(DebugInfoListener.class, this);
100 100
             final DebugWindow window = new DebugWindow(this, "Parser Debug", parser,
101
-                    connection, urlBuilder);
101
+                    connection, urlBuilder, eventBus);
102 102
             windowManager.addWindow(connection.getWindowModel(), window);
103 103
             registeredParsers.put(parser, window);
104 104
             window.addLine("======================", true);

+ 5
- 1
src/com/dmdirc/addons/redirect/FakeWriteableFrameContainer.java View File

@@ -28,6 +28,8 @@ import com.dmdirc.messages.MessageSinkManager;
28 28
 import com.dmdirc.ui.messages.Formatter;
29 29
 import com.dmdirc.util.URLBuilder;
30 30
 
31
+import com.google.common.eventbus.EventBus;
32
+
31 33
 import java.util.Collections;
32 34
 import java.util.Date;
33 35
 
@@ -44,15 +46,17 @@ public class FakeWriteableFrameContainer extends FrameContainer {
44 46
      *
45 47
      * @param target             The message target that output gets sent to
46 48
      * @param messageSinkManager The sink manager to use to despatch messages.
49
+     * @param eventBus           The bus to despatch events on.
47 50
      * @param urlBuilder         The URL builder to use when finding icons.
48 51
      */
49 52
     public FakeWriteableFrameContainer(
50 53
             final FrameContainer target,
51 54
             final MessageSinkManager messageSinkManager,
55
+            final EventBus eventBus,
52 56
             final URLBuilder urlBuilder) {
53 57
         super(target.getIcon(), target.getName(), target.getTitle(),
54 58
                 target.getConfigManager(), urlBuilder, target.getCommandParser(),
55
-                target.getTabCompleter(), messageSinkManager,
59
+                target.getTabCompleter(), messageSinkManager, eventBus,
56 60
                 Collections.<String>emptyList());
57 61
         this.target = target;
58 62
     }

+ 9
- 2
src/com/dmdirc/addons/redirect/RedirectCommand.java View File

@@ -36,6 +36,8 @@ import com.dmdirc.ui.input.AdditionalTabTargets;
36 36
 import com.dmdirc.ui.input.TabCompleter;
37 37
 import com.dmdirc.util.URLBuilder;
38 38
 
39
+import com.google.common.eventbus.EventBus;
40
+
39 41
 import javax.inject.Inject;
40 42
 
41 43
 /**
@@ -53,6 +55,8 @@ public class RedirectCommand extends Command implements IntelligentCommand {
53 55
     private final MessageSinkManager messageSinkManager;
54 56
     /** The URL builder to use when finding icons. */
55 57
     private final URLBuilder urlBuilder;
58
+    /** The bus to despatch events on. */
59
+    private final EventBus eventBus;
56 60
 
57 61
     /**
58 62
      * Creates a new instance of this command.
@@ -60,15 +64,18 @@ public class RedirectCommand extends Command implements IntelligentCommand {
60 64
      * @param controller         The controller to use for command information.
61 65
      * @param messageSinkManager The sink manager to use to despatch messages.
62 66
      * @param urlBuilder         The URL builder to use when finding icons.
67
+     * @param eventBus           The bus to despatch events on.
63 68
      */
64 69
     @Inject
65 70
     public RedirectCommand(
66 71
             final CommandController controller,
67 72
             final MessageSinkManager messageSinkManager,
68
-            final URLBuilder urlBuilder) {
73
+            final URLBuilder urlBuilder,
74
+            final EventBus eventBus) {
69 75
         super(controller);
70 76
         this.messageSinkManager = messageSinkManager;
71 77
         this.urlBuilder = urlBuilder;
78
+        this.eventBus = eventBus;
72 79
     }
73 80
 
74 81
     @Override
@@ -76,7 +83,7 @@ public class RedirectCommand extends Command implements IntelligentCommand {
76 83
             final CommandArguments args, final CommandContext context) {
77 84
         final FrameContainer target = ((ChatCommandContext) context).getChat();
78 85
         target.getCommandParser().parseCommand(new FakeWriteableFrameContainer(
79
-                target, messageSinkManager, urlBuilder), args.getArgumentsAsString());
86
+                target, messageSinkManager, eventBus, urlBuilder), args.getArgumentsAsString());
80 87
     }
81 88
 
82 89
     @Override

+ 4
- 1
test/com/dmdirc/addons/redirect/RedirectCommandTest.java View File

@@ -36,6 +36,8 @@ import com.dmdirc.ui.WindowManager;
36 36
 import com.dmdirc.ui.input.TabCompleter;
37 37
 import com.dmdirc.util.URLBuilder;
38 38
 
39
+import com.google.common.eventbus.EventBus;
40
+
39 41
 import org.junit.Before;
40 42
 import org.junit.Test;
41 43
 import org.junit.runner.RunWith;
@@ -63,6 +65,7 @@ public class RedirectCommandTest {
63 65
     @Mock private MessageSinkManager messageSinkManager;
64 66
     @Mock private WindowManager windowManager;
65 67
     @Mock private URLBuilder urlBuilder;
68
+    @Mock private EventBus eventBus;
66 69
 
67 70
     @Before
68 71
     public void setup() {
@@ -89,7 +92,7 @@ public class RedirectCommandTest {
89 92
     @Test
90 93
     public void testExecute() {
91 94
         final RedirectCommand command = new RedirectCommand(commandController, messageSinkManager,
92
-                urlBuilder);
95
+                urlBuilder, eventBus);
93 96
 
94 97
         command.execute(target, new CommandArguments(commandController, "/redirect /echo test"),
95 98
                 new ChatCommandContext(frameContainer, RedirectCommand.INFO, target));

Loading…
Cancel
Save