Quellcode durchsuchen

Handle core CommandParser changes.

pull/382/head
Chris Smith vor 9 Jahren
Ursprung
Commit
3a4e1cad51

+ 0
- 5
dcc/src/com/dmdirc/addons/dcc/DCCCommandParser.java Datei anzeigen

@@ -62,9 +62,4 @@ public class DCCCommandParser extends GlobalCommandParser {
62 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 Datei anzeigen

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

+ 0
- 7
debug/src/com/dmdirc/addons/debug/RawWindow.java Datei anzeigen

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

+ 7
- 1
debug/src/com/dmdirc/addons/debug/RawWindowFactory.java Datei anzeigen

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

+ 3
- 1
redirect/src/com/dmdirc/addons/redirect/FakeWriteableFrameContainer.java Datei anzeigen

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

Laden…
Abbrechen
Speichern