Browse Source

Handle core CommandParser changes.

pull/382/head
Chris Smith 9 years ago
parent
commit
3a4e1cad51

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

62
         origin.sendLine(line);
62
         origin.sendLine(line);
63
     }
63
     }
64
 
64
 
65
-    @Override
66
-    public void setOwner(final WindowModel owner) {
67
-        // Don't care
68
-    }
69
-
70
 }
65
 }

+ 2
- 1
dcc/src/com/dmdirc/addons/dcc/DCCFrameContainer.java View File

69
             final TabCompleterFactory tabCompleterFactory,
69
             final TabCompleterFactory tabCompleterFactory,
70
             final DMDircMBassador eventBus,
70
             final DMDircMBassador eventBus,
71
             final Collection<String> components) {
71
             final Collection<String> components) {
72
-        super(parent, icon, title, title, configManager, backBufferFactory, parser,
72
+        super(parent, icon, title, title, configManager, backBufferFactory,
73
                 tabCompleterFactory.getTabCompleter(configManager),
73
                 tabCompleterFactory.getTabCompleter(configManager),
74
                 messageSinkManager,
74
                 messageSinkManager,
75
                 eventBus,
75
                 eventBus,
76
                 components);
76
                 components);
77
         initBackBuffer();
77
         initBackBuffer();
78
+        setCommandParser(parser);
78
     }
79
     }
79
 
80
 
80
     @Override
81
     @Override

+ 0
- 7
debug/src/com/dmdirc/addons/debug/RawWindow.java View File

24
 
24
 
25
 import com.dmdirc.FrameContainer;
25
 import com.dmdirc.FrameContainer;
26
 import com.dmdirc.commandparser.CommandType;
26
 import com.dmdirc.commandparser.CommandType;
27
-import com.dmdirc.commandparser.parsers.ServerCommandParser;
28
 import com.dmdirc.events.ServerConnectingEvent;
27
 import com.dmdirc.events.ServerConnectingEvent;
29
-import com.dmdirc.interfaces.CommandController;
30
 import com.dmdirc.interfaces.Connection;
28
 import com.dmdirc.interfaces.Connection;
31
 import com.dmdirc.parser.common.CallbackManager;
29
 import com.dmdirc.parser.common.CallbackManager;
32
 import com.dmdirc.parser.interfaces.Parser;
30
 import com.dmdirc.parser.interfaces.Parser;
52
 
50
 
53
     public RawWindow(
51
     public RawWindow(
54
             final Connection connection,
52
             final Connection connection,
55
-            final CommandController commandController,
56
             final MessageSinkManager messageSinkManager,
53
             final MessageSinkManager messageSinkManager,
57
             final TabCompleterFactory tabCompleterFactory,
54
             final TabCompleterFactory tabCompleterFactory,
58
             final BackBufferFactory backBufferFactory) {
55
             final BackBufferFactory backBufferFactory) {
59
         super(connection.getWindowModel(), "raw", "Raw", "(Raw log)",
56
         super(connection.getWindowModel(), "raw", "Raw", "(Raw log)",
60
                 connection.getWindowModel().getConfigManager(),
57
                 connection.getWindowModel().getConfigManager(),
61
                 backBufferFactory,
58
                 backBufferFactory,
62
-                new ServerCommandParser(
63
-                        connection.getWindowModel().getConfigManager(),
64
-                        commandController,
65
-                        connection.getWindowModel().getEventBus()),
66
                 tabCompleterFactory.getTabCompleter(connection.getWindowModel().getTabCompleter(),
59
                 tabCompleterFactory.getTabCompleter(connection.getWindowModel().getTabCompleter(),
67
                         connection.getWindowModel().getConfigManager(),
60
                         connection.getWindowModel().getConfigManager(),
68
                         CommandType.TYPE_QUERY, CommandType.TYPE_CHAT),
61
                         CommandType.TYPE_QUERY, CommandType.TYPE_CHAT),

+ 7
- 1
debug/src/com/dmdirc/addons/debug/RawWindowFactory.java View File

22
 
22
 
23
 package com.dmdirc.addons.debug;
23
 package com.dmdirc.addons.debug;
24
 
24
 
25
+import com.dmdirc.commandparser.parsers.ServerCommandParser;
25
 import com.dmdirc.interfaces.CommandController;
26
 import com.dmdirc.interfaces.CommandController;
26
 import com.dmdirc.interfaces.Connection;
27
 import com.dmdirc.interfaces.Connection;
27
 import com.dmdirc.ui.WindowManager;
28
 import com.dmdirc.ui.WindowManager;
56
     }
57
     }
57
 
58
 
58
     public RawWindow getRawWindow(final Connection connection) {
59
     public RawWindow getRawWindow(final Connection connection) {
59
-        final RawWindow rawWindow = new RawWindow(connection, commandController,
60
+        final RawWindow rawWindow = new RawWindow(connection,
60
                 messageSinkManager, tabCompleterFactory,  backBufferFactory);
61
                 messageSinkManager, tabCompleterFactory,  backBufferFactory);
62
+        rawWindow.setCommandParser(new ServerCommandParser(
63
+                connection.getWindowModel().getConfigManager(),
64
+                commandController,
65
+                connection.getWindowModel().getEventBus(),
66
+                connection));
61
         windowManager.addWindow(connection.getWindowModel(), rawWindow);
67
         windowManager.addWindow(connection.getWindowModel(), rawWindow);
62
         return rawWindow;
68
         return rawWindow;
63
     }
69
     }

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

52
             final BackBufferFactory backBufferFactory) {
52
             final BackBufferFactory backBufferFactory) {
53
         super(target, target.getIcon(), target.getName(), target.getTitle(),
53
         super(target, target.getIcon(), target.getName(), target.getTitle(),
54
                 target.getConfigManager(), backBufferFactory,
54
                 target.getConfigManager(), backBufferFactory,
55
-                target.getCommandParser(), target.getTabCompleter(), messageSinkManager, eventBus,
55
+                target.getTabCompleter(), messageSinkManager, eventBus,
56
                 Collections.<String>emptyList());
56
                 Collections.<String>emptyList());
57
         this.target = target;
57
         this.target = target;
58
         initBackBuffer();
58
         initBackBuffer();
59
+        setCommandParser(target.getCommandParser());
59
     }
60
     }
60
 
61
 
61
     @Override
62
     @Override
63
+    @Deprecated
62
     public void addLine(final String line, final boolean timestamp) {
64
     public void addLine(final String line, final boolean timestamp) {
63
         addLine(line);
65
         addLine(line);
64
     }
66
     }

Loading…
Cancel
Save