Przeglądaj źródła

Commands now use containers not windows

Fixes issue 3998

Change-Id: I901ed80272a445f2bd303a01e842e6f50cc5ae04
Reviewed-on: http://gerrit.dmdirc.com/1116
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
Automatic-Compile: Gregory Holmes <greg@dmdirc.com>
tags/0.6.4rc1
Chris Smith 14 lat temu
rodzic
commit
5334959656
74 zmienionych plików z 266 dodań i 258 usunięć
  1. 1
    1
      src/com/dmdirc/GlobalWindow.java
  2. 8
    9
      src/com/dmdirc/actions/ActionModel.java
  3. 2
    1
      src/com/dmdirc/commandparser/commands/ChannelCommand.java
  4. 2
    2
      src/com/dmdirc/commandparser/commands/ChatCommand.java
  5. 3
    3
      src/com/dmdirc/commandparser/commands/Command.java
  6. 2
    2
      src/com/dmdirc/commandparser/commands/ExternalCommand.java
  7. 2
    1
      src/com/dmdirc/commandparser/commands/GlobalCommand.java
  8. 2
    2
      src/com/dmdirc/commandparser/commands/QueryCommand.java
  9. 2
    2
      src/com/dmdirc/commandparser/commands/ServerCommand.java
  10. 2
    2
      src/com/dmdirc/commandparser/commands/channel/Ban.java
  11. 2
    2
      src/com/dmdirc/commandparser/commands/channel/ChannelSettings.java
  12. 2
    2
      src/com/dmdirc/commandparser/commands/channel/Cycle.java
  13. 2
    2
      src/com/dmdirc/commandparser/commands/channel/KickReason.java
  14. 3
    3
      src/com/dmdirc/commandparser/commands/channel/Mode.java
  15. 3
    3
      src/com/dmdirc/commandparser/commands/channel/Names.java
  16. 2
    2
      src/com/dmdirc/commandparser/commands/channel/Part.java
  17. 10
    6
      src/com/dmdirc/commandparser/commands/channel/SetNickColour.java
  18. 3
    3
      src/com/dmdirc/commandparser/commands/channel/ShowTopic.java
  19. 2
    1
      src/com/dmdirc/commandparser/commands/chat/Me.java
  20. 7
    5
      src/com/dmdirc/commandparser/commands/global/Active.java
  21. 2
    2
      src/com/dmdirc/commandparser/commands/global/AliasCommand.java
  22. 3
    5
      src/com/dmdirc/commandparser/commands/global/AllServers.java
  23. 3
    3
      src/com/dmdirc/commandparser/commands/global/Clear.java
  24. 25
    26
      src/com/dmdirc/commandparser/commands/global/Debug.java
  25. 4
    8
      src/com/dmdirc/commandparser/commands/global/Echo.java
  26. 2
    2
      src/com/dmdirc/commandparser/commands/global/Exit.java
  27. 7
    6
      src/com/dmdirc/commandparser/commands/global/Help.java
  28. 5
    3
      src/com/dmdirc/commandparser/commands/global/Ifplugin.java
  29. 7
    4
      src/com/dmdirc/commandparser/commands/global/Input.java
  30. 2
    2
      src/com/dmdirc/commandparser/commands/global/LoadPlugin.java
  31. 4
    3
      src/com/dmdirc/commandparser/commands/global/NewServer.java
  32. 3
    3
      src/com/dmdirc/commandparser/commands/global/Notify.java
  33. 4
    5
      src/com/dmdirc/commandparser/commands/global/OpenWindow.java
  34. 2
    2
      src/com/dmdirc/commandparser/commands/global/ReloadActions.java
  35. 2
    2
      src/com/dmdirc/commandparser/commands/global/ReloadIdentities.java
  36. 2
    2
      src/com/dmdirc/commandparser/commands/global/ReloadPlugin.java
  37. 2
    2
      src/com/dmdirc/commandparser/commands/global/SaveConfig.java
  38. 11
    11
      src/com/dmdirc/commandparser/commands/global/Set.java
  39. 2
    2
      src/com/dmdirc/commandparser/commands/global/UnloadPlugin.java
  40. 3
    2
      src/com/dmdirc/commandparser/commands/server/AllChannels.java
  41. 2
    2
      src/com/dmdirc/commandparser/commands/server/Away.java
  42. 2
    2
      src/com/dmdirc/commandparser/commands/server/Back.java
  43. 2
    2
      src/com/dmdirc/commandparser/commands/server/ChangeServer.java
  44. 2
    2
      src/com/dmdirc/commandparser/commands/server/Ctcp.java
  45. 2
    2
      src/com/dmdirc/commandparser/commands/server/Disconnect.java
  46. 6
    6
      src/com/dmdirc/commandparser/commands/server/Ignore.java
  47. 2
    2
      src/com/dmdirc/commandparser/commands/server/JoinChannelCommand.java
  48. 2
    1
      src/com/dmdirc/commandparser/commands/server/Message.java
  49. 2
    2
      src/com/dmdirc/commandparser/commands/server/Nick.java
  50. 2
    2
      src/com/dmdirc/commandparser/commands/server/Notice.java
  51. 2
    1
      src/com/dmdirc/commandparser/commands/server/OpenQuery.java
  52. 2
    2
      src/com/dmdirc/commandparser/commands/server/Raw.java
  53. 2
    2
      src/com/dmdirc/commandparser/commands/server/RawServerCommand.java
  54. 2
    2
      src/com/dmdirc/commandparser/commands/server/Reconnect.java
  55. 2
    2
      src/com/dmdirc/commandparser/commands/server/Umode.java
  56. 3
    3
      src/com/dmdirc/commandparser/parsers/ChannelCommandParser.java
  57. 11
    12
      src/com/dmdirc/commandparser/parsers/CommandParser.java
  58. 3
    3
      src/com/dmdirc/commandparser/parsers/GlobalCommandParser.java
  59. 3
    3
      src/com/dmdirc/commandparser/parsers/QueryCommandParser.java
  60. 2
    1
      src/com/dmdirc/commandparser/parsers/RawCommandParser.java
  61. 3
    3
      src/com/dmdirc/commandparser/parsers/ServerCommandParser.java
  62. 2
    2
      src/com/dmdirc/ui/input/InputHandler.java
  63. 2
    2
      test/com/dmdirc/commandparser/commands/channel/BanTest.java
  64. 5
    5
      test/com/dmdirc/commandparser/commands/channel/KickReasonTest.java
  65. 5
    5
      test/com/dmdirc/commandparser/commands/channel/ModeTest.java
  66. 3
    6
      test/com/dmdirc/commandparser/commands/channel/PartTest.java
  67. 4
    4
      test/com/dmdirc/commandparser/commands/channel/SetNickColourTest.java
  68. 2
    2
      test/com/dmdirc/commandparser/commands/chat/MeTest.java
  69. 3
    3
      test/com/dmdirc/commandparser/commands/global/AliasCommandTest.java
  70. 3
    3
      test/com/dmdirc/commandparser/commands/global/DebugTest.java
  71. 3
    3
      test/com/dmdirc/commandparser/commands/global/IfpluginTest.java
  72. 5
    5
      test/com/dmdirc/commandparser/commands/global/NewServerTest.java
  73. 9
    9
      test/com/dmdirc/commandparser/commands/server/ChangeServerTest.java
  74. 4
    3
      test/com/dmdirc/harness/TestCommandParser.java

+ 1
- 1
src/com/dmdirc/GlobalWindow.java Wyświetl plik

@@ -108,7 +108,7 @@ public class GlobalWindow extends WritableFrameContainer {
108 108
     @Override
109 109
     public void sendLine(final String line) {
110 110
         if (!line.isEmpty()) {
111
-            GlobalCommandParser.getGlobalCommandParser().parseCommand(window,
111
+            GlobalCommandParser.getGlobalCommandParser().parseCommand(this,
112 112
                     CommandManager.getCommandChar() + line);
113 113
         }
114 114
     }

+ 8
- 9
src/com/dmdirc/actions/ActionModel.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.actions;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.actions.interfaces.ActionType;
26 27
 import com.dmdirc.Precondition;
27 28
 import com.dmdirc.ServerManager;
@@ -29,8 +30,6 @@ import com.dmdirc.WritableFrameContainer;
29 30
 import com.dmdirc.commandparser.parsers.CommandParser;
30 31
 import com.dmdirc.commandparser.parsers.GlobalCommandParser;
31 32
 import com.dmdirc.ui.WindowManager;
32
-import com.dmdirc.ui.interfaces.InputWindow;
33
-import com.dmdirc.ui.interfaces.Window;
34 33
 
35 34
 import java.util.ArrayList;
36 35
 import java.util.Arrays;
@@ -132,22 +131,22 @@ public class ActionModel {
132 131
             return true;
133 132
         }
134 133
 
135
-        final Window active = WindowManager.getActiveWindow().getFrame();
136
-        InputWindow cw = null;
134
+        final FrameContainer active = WindowManager.getActiveWindow();
135
+        WritableFrameContainer cw = null;
137 136
         CommandParser cp = null;
138 137
 
139 138
         if (arguments.length > 0 && arguments[0] instanceof WritableFrameContainer) {
140
-            cw = ((WritableFrameContainer) arguments[0]).getFrame();
141
-        } else if (active instanceof InputWindow) {
142
-            cw = (InputWindow) active;
139
+            cw = (WritableFrameContainer) arguments[0];
140
+        } else if (active instanceof WritableFrameContainer) {
141
+            cw = (WritableFrameContainer) active;
143 142
         } else if (ServerManager.getServerManager().numServers() > 0) {
144
-            cw = ServerManager.getServerManager().getServers().get(0).getFrame();
143
+            cw = ServerManager.getServerManager().getServers().get(0);
145 144
         }
146 145
 
147 146
         if (cw == null) {
148 147
             cp = GlobalCommandParser.getGlobalCommandParser();
149 148
         } else {
150
-            cp = cw.getCommandParser();
149
+            cp = cw.getFrame().getCommandParser();
151 150
         }
152 151
 
153 152
         for (String command : response) {

+ 2
- 1
src/com/dmdirc/commandparser/commands/ChannelCommand.java Wyświetl plik

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.commandparser.commands;
24 24
 
25 25
 import com.dmdirc.Channel;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.commandparser.CommandInfo;
@@ -45,7 +46,7 @@ public abstract class ChannelCommand extends Command implements CommandInfo {
45 46
      * @param args Arguments passed to this command
46 47
      * @since 0.6.3m1
47 48
      */
48
-    public abstract void execute(InputWindow origin, Server server, Channel channel,
49
+    public abstract void execute(FrameContainer origin, Server server, Channel channel,
49 50
             boolean isSilent, CommandArguments args);
50 51
 
51 52
     /** {@inheritDoc} */

+ 2
- 2
src/com/dmdirc/commandparser/commands/ChatCommand.java Wyświetl plik

@@ -22,12 +22,12 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.MessageTarget;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.commandparser.CommandInfo;
29 30
 import com.dmdirc.commandparser.CommandType;
30
-import com.dmdirc.ui.interfaces.InputWindow;
31 31
 
32 32
 /**
33 33
  * Represents a command that can be performed in the context of a "chat" window
@@ -47,7 +47,7 @@ public abstract class ChatCommand extends Command implements CommandInfo {
47 47
      * @param args Arguments passed to this command
48 48
      * @since 0.6.3m1
49 49
      */
50
-    public abstract void execute(InputWindow origin, Server server, MessageTarget target,
50
+    public abstract void execute(FrameContainer origin, Server server, MessageTarget target,
51 51
             boolean isSilent, CommandArguments args);
52 52
 
53 53
     /** {@inheritDoc} */

+ 3
- 3
src/com/dmdirc/commandparser/commands/Command.java Wyświetl plik

@@ -22,8 +22,8 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandManager;
26
-import com.dmdirc.ui.interfaces.InputWindow;
27 27
 import com.dmdirc.ui.messages.Styliser;
28 28
 
29 29
 /**
@@ -46,7 +46,7 @@ public abstract class Command {
46 46
      * @param type The type of message to send
47 47
      * @param args The arguments of the message
48 48
      */
49
-    protected final void sendLine(final InputWindow target,
49
+    protected final void sendLine(final FrameContainer target,
50 50
             final boolean isSilent, final String type, final Object ... args) {
51 51
         if (!isSilent && target != null) {
52 52
             target.addLine(type, args);
@@ -61,7 +61,7 @@ public abstract class Command {
61 61
      * @param name The name of the command that's raising the error
62 62
      * @param args The arguments that the command accepts or expects
63 63
      */
64
-    protected final void showUsage(final InputWindow target,
64
+    protected final void showUsage(final FrameContainer target,
65 65
             final boolean isSilent, final String name, final String args) {
66 66
         sendLine(target, isSilent, "commandUsage", CommandManager.getCommandChar(),
67 67
                 name, args);

+ 2
- 2
src/com/dmdirc/commandparser/commands/ExternalCommand.java Wyświetl plik

@@ -21,9 +21,9 @@
21 21
  */
22 22
 package com.dmdirc.commandparser.commands;
23 23
 
24
+import com.dmdirc.FrameContainer;
24 25
 import com.dmdirc.Server;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26
-import com.dmdirc.ui.interfaces.InputWindow;
27 27
 
28 28
 /**
29 29
  * An external command is a channel command that can be executed from outside
@@ -43,7 +43,7 @@ public interface ExternalCommand {
43 43
      * @param args Arguments passed to this command
44 44
      * @since 0.6.3m1
45 45
      */
46
-    void execute(InputWindow origin, Server server, String channel,
46
+    void execute(FrameContainer origin, Server server, String channel,
47 47
             boolean isSilent, CommandArguments args);
48 48
 
49 49
 }

+ 2
- 1
src/com/dmdirc/commandparser/commands/GlobalCommand.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandInfo;
27 28
 import com.dmdirc.commandparser.CommandType;
@@ -44,7 +45,7 @@ public abstract class GlobalCommand extends Command implements CommandInfo {
44 45
      * @param args Arguments passed to this command
45 46
      * @since 0.6.3m1
46 47
      */
47
-    public abstract void execute(InputWindow origin, boolean isSilent, CommandArguments args);
48
+    public abstract void execute(FrameContainer origin, boolean isSilent, CommandArguments args);
48 49
 
49 50
     /** {@inheritDoc} */
50 51
     @Override

+ 2
- 2
src/com/dmdirc/commandparser/commands/QueryCommand.java Wyświetl plik

@@ -22,12 +22,12 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Query;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.commandparser.CommandInfo;
29 30
 import com.dmdirc.commandparser.CommandType;
30
-import com.dmdirc.ui.interfaces.InputWindow;
31 31
 
32 32
 /**
33 33
  * Represents a command which can be performed only in the context of a query.
@@ -46,7 +46,7 @@ public abstract class QueryCommand extends Command implements CommandInfo {
46 46
      * @param args Arguments passed to this command
47 47
      * @since 0.6.3m1
48 48
      */
49
-    public abstract void execute(InputWindow origin, Server server, Query query,
49
+    public abstract void execute(FrameContainer origin, Server server, Query query,
50 50
             boolean isSilent, CommandArguments args);
51 51
 
52 52
     /** {@inheritDoc} */

+ 2
- 2
src/com/dmdirc/commandparser/commands/ServerCommand.java Wyświetl plik

@@ -22,11 +22,11 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandInfo;
28 29
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.ui.interfaces.InputWindow;
30 30
 
31 31
 /**
32 32
  * Represents a generic server command. Server commands are associated with
@@ -45,7 +45,7 @@ public abstract class ServerCommand extends Command implements CommandInfo {
45 45
      * @param args Arguments passed to this command
46 46
      * @since 0.6.3m1
47 47
      */
48
-    public abstract void execute(InputWindow origin, Server server,
48
+    public abstract void execute(FrameContainer origin, Server server,
49 49
             boolean isSilent, CommandArguments args);
50 50
 
51 51
     /** {@inheritDoc} */

+ 2
- 2
src/com/dmdirc/commandparser/commands/channel/Ban.java Wyświetl plik

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25 25
 import com.dmdirc.Channel;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.commandparser.commands.ChannelCommand;
@@ -31,7 +32,6 @@ import com.dmdirc.commandparser.commands.IntelligentCommand;
31 32
 import com.dmdirc.parser.interfaces.ChannelClientInfo;
32 33
 import com.dmdirc.ui.input.AdditionalTabTargets;
33 34
 import com.dmdirc.ui.input.TabCompletionType;
34
-import com.dmdirc.ui.interfaces.InputWindow;
35 35
 
36 36
 /**
37 37
  * The kick command bans a specified user or host from the channel.
@@ -49,7 +49,7 @@ public final class Ban extends ChannelCommand implements IntelligentCommand {
49 49
     
50 50
     /** {@inheritDoc} */
51 51
     @Override
52
-    public void execute(final InputWindow origin, final Server server,
52
+    public void execute(final FrameContainer origin, final Server server,
53 53
             final Channel channel, final boolean isSilent, final CommandArguments args) {
54 54
         if (args.getArguments().length == 0) {
55 55
             showUsage(origin, isSilent, "ban", "<user|host>");

+ 2
- 2
src/com/dmdirc/commandparser/commands/channel/ChannelSettings.java Wyświetl plik

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25 25
 import com.dmdirc.Channel;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Main;
27 28
 import com.dmdirc.Server;
28 29
 import com.dmdirc.commandparser.CommandArguments;
@@ -31,7 +32,6 @@ import com.dmdirc.commandparser.CommandManager;
31 32
 import com.dmdirc.commandparser.commands.CommandOptions;
32 33
 import com.dmdirc.commandparser.commands.IntelligentCommand;
33 34
 import com.dmdirc.ui.input.AdditionalTabTargets;
34
-import com.dmdirc.ui.interfaces.InputWindow;
35 35
 
36 36
 /**
37 37
  * Opens the channel settings window for the channel.
@@ -49,7 +49,7 @@ public final class ChannelSettings extends ChannelCommand implements Intelligent
49 49
     
50 50
     /** {@inheritDoc} */
51 51
     @Override
52
-    public void execute(final InputWindow origin, final Server server,
52
+    public void execute(final FrameContainer origin, final Server server,
53 53
             final Channel channel, final boolean isSilent, final CommandArguments args) {
54 54
         Main.getUI().showChannelSettingsDialog(channel);
55 55
     }

+ 2
- 2
src/com/dmdirc/commandparser/commands/channel/Cycle.java Wyświetl plik

@@ -23,12 +23,12 @@
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25 25
 import com.dmdirc.Channel;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.commandparser.commands.ChannelCommand;
29 30
 import com.dmdirc.commandparser.CommandManager;
30 31
 import com.dmdirc.commandparser.commands.CommandOptions;
31
-import com.dmdirc.ui.interfaces.InputWindow;
32 32
 
33 33
 /**
34 34
  * The cycle command allows users to rapidly part and rejoin a channel.
@@ -47,7 +47,7 @@ public final class Cycle extends ChannelCommand {
47 47
     
48 48
     /** {@inheritDoc} */
49 49
     @Override
50
-    public void execute(final InputWindow origin, final Server server,
50
+    public void execute(final FrameContainer origin, final Server server,
51 51
             final Channel channel, final boolean isSilent, final CommandArguments args) {
52 52
         channel.part(args.getArguments().length > 0 ? args.getArgumentsAsString()
53 53
                 : origin.getConfigManager().getOption("general", "cyclemessage"));

+ 2
- 2
src/com/dmdirc/commandparser/commands/channel/KickReason.java Wyświetl plik

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25 25
 import com.dmdirc.Channel;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.commandparser.commands.ChannelCommand;
@@ -32,7 +33,6 @@ import com.dmdirc.commandparser.commands.IntelligentCommand;
32 33
 import com.dmdirc.parser.interfaces.ChannelClientInfo;
33 34
 import com.dmdirc.ui.input.AdditionalTabTargets;
34 35
 import com.dmdirc.ui.input.TabCompletionType;
35
-import com.dmdirc.ui.interfaces.InputWindow;
36 36
 
37 37
 /**
38 38
  * The kick command kicks a specified user from the channel.
@@ -51,7 +51,7 @@ public final class KickReason extends ChannelCommand implements IntelligentComma
51 51
     
52 52
     /** {@inheritDoc} */
53 53
     @Override
54
-    public void execute(final InputWindow origin, final Server server,
54
+    public void execute(final FrameContainer origin, final Server server,
55 55
             final Channel channel, final boolean isSilent, final CommandArguments args) {
56 56
         if (args.getArguments().length == 0) {
57 57
             showUsage(origin, isSilent, "kick", "<user> [reason]");

+ 3
- 3
src/com/dmdirc/commandparser/commands/channel/Mode.java Wyświetl plik

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25 25
 import com.dmdirc.Channel;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.commandparser.commands.ChannelCommand;
@@ -33,7 +34,6 @@ import com.dmdirc.commandparser.commands.IntelligentCommand;
33 34
 import com.dmdirc.parser.interfaces.ChannelInfo;
34 35
 import com.dmdirc.ui.input.AdditionalTabTargets;
35 36
 import com.dmdirc.ui.input.TabCompletionType;
36
-import com.dmdirc.ui.interfaces.InputWindow;
37 37
 
38 38
 /**
39 39
  * The mode command allows the user to inspect and change channel modes.
@@ -52,7 +52,7 @@ public final class Mode extends ChannelCommand implements IntelligentCommand,
52 52
 
53 53
     /** {@inheritDoc} */
54 54
     @Override
55
-    public void execute(final InputWindow origin, final Server server,
55
+    public void execute(final FrameContainer origin, final Server server,
56 56
             final Channel channel, final boolean isSilent, final CommandArguments args) {
57 57
         final ChannelInfo cChannel = channel.getChannelInfo();
58 58
 
@@ -65,7 +65,7 @@ public final class Mode extends ChannelCommand implements IntelligentCommand,
65 65
 
66 66
     /** {@inheritDoc} */
67 67
     @Override
68
-    public void execute(final InputWindow origin, final Server server,
68
+    public void execute(final FrameContainer origin, final Server server,
69 69
             final String channel, final boolean isSilent, final CommandArguments args) {
70 70
         if (args.getArguments().length == 0) {
71 71
             server.getParser().sendRawMessage("MODE " + channel);

+ 3
- 3
src/com/dmdirc/commandparser/commands/channel/Names.java Wyświetl plik

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25 25
 import com.dmdirc.Channel;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.commandparser.CommandManager;
@@ -31,7 +32,6 @@ import com.dmdirc.commandparser.commands.CommandOptions;
31 32
 import com.dmdirc.commandparser.commands.ExternalCommand;
32 33
 import com.dmdirc.commandparser.commands.IntelligentCommand;
33 34
 import com.dmdirc.ui.input.AdditionalTabTargets;
34
-import com.dmdirc.ui.interfaces.InputWindow;
35 35
 
36 36
 /**
37 37
  * Sends a names request.
@@ -52,7 +52,7 @@ public class Names extends ChannelCommand implements IntelligentCommand, Externa
52 52
 
53 53
     /** {@inheritDoc} */
54 54
     @Override
55
-    public void execute(final InputWindow origin, final Server server, 
55
+    public void execute(final FrameContainer origin, final Server server,
56 56
             final Channel channel, final boolean isSilent, final CommandArguments args) {
57 57
         server.getParser().sendRawMessage("NAMES " + channel.getChannelInfo().getName());
58 58
     }
@@ -60,7 +60,7 @@ public class Names extends ChannelCommand implements IntelligentCommand, Externa
60 60
 
61 61
     /** {@inheritDoc} */
62 62
     @Override
63
-    public void execute(final InputWindow origin, final Server server,
63
+    public void execute(final FrameContainer origin, final Server server,
64 64
             final String channel, final boolean isSilent, final CommandArguments args) {
65 65
         server.getParser().sendRawMessage("NAMES " + channel);
66 66
     }    

+ 2
- 2
src/com/dmdirc/commandparser/commands/channel/Part.java Wyświetl plik

@@ -23,12 +23,12 @@
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25 25
 import com.dmdirc.Channel;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.commandparser.commands.ChannelCommand;
29 30
 import com.dmdirc.commandparser.CommandManager;
30 31
 import com.dmdirc.commandparser.commands.CommandOptions;
31
-import com.dmdirc.ui.interfaces.InputWindow;
32 32
 
33 33
 /**
34 34
  * The part command parts the current channel with a specified part message.
@@ -46,7 +46,7 @@ public final class Part extends ChannelCommand {
46 46
     
47 47
     /** {@inheritDoc} */
48 48
     @Override
49
-    public void execute(final InputWindow origin, final Server server,
49
+    public void execute(final FrameContainer origin, final Server server,
50 50
             final Channel channel, final boolean isSilent, final CommandArguments args) {
51 51
         channel.part(args.getArguments().length > 0 ? args.getArgumentsAsString()
52 52
                 : origin.getConfigManager().getOption("general", "partmessage"));

+ 10
- 6
src/com/dmdirc/commandparser/commands/channel/SetNickColour.java Wyświetl plik

@@ -24,6 +24,7 @@ package com.dmdirc.commandparser.commands.channel;
24 24
 
25 25
 import com.dmdirc.Channel;
26 26
 import com.dmdirc.ChannelClientProperty;
27
+import com.dmdirc.FrameContainer;
27 28
 import com.dmdirc.Server;
28 29
 import com.dmdirc.commandparser.CommandArguments;
29 30
 import com.dmdirc.commandparser.CommandManager;
@@ -33,7 +34,6 @@ import com.dmdirc.parser.interfaces.ChannelClientInfo;
33 34
 import com.dmdirc.ui.input.AdditionalTabTargets;
34 35
 import com.dmdirc.ui.input.TabCompletionType;
35 36
 import com.dmdirc.ui.interfaces.ChannelWindow;
36
-import com.dmdirc.ui.interfaces.InputWindow;
37 37
 import com.dmdirc.ui.messages.ColourManager;
38 38
 
39 39
 import java.awt.Color;
@@ -53,17 +53,19 @@ public final class SetNickColour extends ChannelCommand implements IntelligentCo
53 53
     
54 54
     /** {@inheritDoc} */
55 55
     @SuppressWarnings("unchecked") @Override
56
-    public void execute(final InputWindow origin, final Server server,
56
+    public void execute(final FrameContainer origin, final Server server,
57 57
             final Channel channel, final boolean isSilent, final CommandArguments args) {
58 58
         
59 59
         int offset = 0;
60 60
         boolean nicklist = true;
61 61
         boolean text = true;
62 62
         
63
-        if (args.getArguments().length > offset && args.getArguments()[offset].equalsIgnoreCase("--nicklist")) {
63
+        if (args.getArguments().length > offset && args.getArguments()[offset]
64
+                .equalsIgnoreCase("--nicklist")) {
64 65
             text = false;
65 66
             offset++;
66
-        } else if (args.getArguments().length > offset && args.getArguments()[offset].equalsIgnoreCase("--text")) {
67
+        } else if (args.getArguments().length > offset && args.getArguments()[offset]
68
+                .equalsIgnoreCase("--text")) {
67 69
             nicklist = false;
68 70
             offset++;
69 71
         }
@@ -73,11 +75,13 @@ public final class SetNickColour extends ChannelCommand implements IntelligentCo
73 75
             return;
74 76
         }
75 77
         
76
-        final ChannelClientInfo target = channel.getChannelInfo().getChannelClient(args.getArguments()[offset]);
78
+        final ChannelClientInfo target = channel.getChannelInfo()
79
+                .getChannelClient(args.getArguments()[offset]);
77 80
         offset++;
78 81
         
79 82
         if (target == null) {
80
-            sendLine(origin, isSilent, FORMAT_ERROR, "No such nickname (" + args.getArguments()[offset - 1] + ")!");
83
+            sendLine(origin, isSilent, FORMAT_ERROR, "No such nickname ("
84
+                    + args.getArguments()[offset - 1] + ")!");
81 85
         } else if (args.getArguments().length <= offset) {
82 86
             // We're removing the colour
83 87
             if (nicklist) {

+ 3
- 3
src/com/dmdirc/commandparser/commands/channel/ShowTopic.java Wyświetl plik

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25 25
 import com.dmdirc.Channel;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.commandparser.commands.ChannelCommand;
@@ -30,7 +31,6 @@ import com.dmdirc.commandparser.CommandManager;
30 31
 import com.dmdirc.commandparser.commands.CommandOptions;
31 32
 import com.dmdirc.commandparser.commands.ExternalCommand;
32 33
 import com.dmdirc.parser.interfaces.ChannelInfo;
33
-import com.dmdirc.ui.interfaces.InputWindow;
34 34
 
35 35
 /**
36 36
  * The show topic command shows the user the current topic.
@@ -48,7 +48,7 @@ public final class ShowTopic extends ChannelCommand implements ExternalCommand {
48 48
 
49 49
     /** {@inheritDoc} */
50 50
     @Override
51
-    public void execute(final InputWindow origin, final Server server,
51
+    public void execute(final FrameContainer origin, final Server server,
52 52
             final Channel channel, final boolean isSilent, final CommandArguments args) {
53 53
         if (args.getArguments().length == 0) {
54 54
             final ChannelInfo cChannel = channel.getChannelInfo();
@@ -69,7 +69,7 @@ public final class ShowTopic extends ChannelCommand implements ExternalCommand {
69 69
 
70 70
     /** {@inheritDoc} */
71 71
     @Override
72
-    public void execute(final InputWindow origin, final Server server,
72
+    public void execute(final FrameContainer origin, final Server server,
73 73
             final String channel, final boolean isSilent, final CommandArguments args) {
74 74
         if (args.getArguments().length == 0) {
75 75
             server.getParser().sendRawMessage("TOPIC " + channel);

+ 2
- 1
src/com/dmdirc/commandparser/commands/chat/Me.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.chat;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.MessageTarget;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
@@ -46,7 +47,7 @@ public final class Me extends ChatCommand implements ValidatingCommand {
46 47
     
47 48
     /** {@inheritDoc} */
48 49
     @Override
49
-    public void execute(final InputWindow origin, final Server server,
50
+    public void execute(final FrameContainer origin, final Server server,
50 51
             final MessageTarget target, final boolean isSilent, final CommandArguments args) {
51 52
         if (args.getArguments().length == 0) {
52 53
             showUsage(origin, isSilent, "me", "<action>");

+ 7
- 5
src/com/dmdirc/commandparser/commands/global/Active.java Wyświetl plik

@@ -22,6 +22,8 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
26
+import com.dmdirc.WritableFrameContainer;
25 27
 import com.dmdirc.commandparser.CommandArguments;
26 28
 import com.dmdirc.commandparser.CommandManager;
27 29
 import com.dmdirc.commandparser.commands.GlobalCommand;
@@ -29,7 +31,6 @@ import com.dmdirc.commandparser.commands.IntelligentCommand;
29 31
 import com.dmdirc.ui.WindowManager;
30 32
 import com.dmdirc.ui.input.AdditionalTabTargets;
31 33
 import com.dmdirc.ui.input.TabCompleter;
32
-import com.dmdirc.ui.interfaces.InputWindow;
33 34
 
34 35
 /**
35 36
  * The Active command issues a command to the active window.
@@ -48,14 +49,15 @@ public final class Active extends GlobalCommand implements IntelligentCommand {
48 49
     
49 50
     /** {@inheritDoc} */
50 51
     @Override
51
-    public void execute(final InputWindow origin, final boolean isSilent,
52
+    public void execute(final FrameContainer origin, final boolean isSilent,
52 53
             final CommandArguments args) {
53 54
         final String command = args.getArgumentsAsString();
54 55
         
55
-        final InputWindow window = (InputWindow) WindowManager.getActiveWindow();
56
+        final FrameContainer window = WindowManager.getActiveWindow();
56 57
         
57
-        if (window != null) {
58
-            window.getCommandParser().parseCommand(window, command);
58
+        if (window != null && window instanceof WritableFrameContainer) {
59
+            ((WritableFrameContainer) window).getFrame()
60
+                    .getCommandParser().parseCommand(window, command);
59 61
         }
60 62
     }
61 63
     

+ 2
- 2
src/com/dmdirc/commandparser/commands/global/AliasCommand.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.actions.Action;
26 27
 import com.dmdirc.actions.ActionManager;
27 28
 import com.dmdirc.actions.wrappers.Alias;
@@ -32,7 +33,6 @@ import com.dmdirc.commandparser.commands.GlobalCommand;
32 33
 import com.dmdirc.commandparser.commands.IntelligentCommand;
33 34
 import com.dmdirc.ui.input.AdditionalTabTargets;
34 35
 import com.dmdirc.ui.input.TabCompleter;
35
-import com.dmdirc.ui.interfaces.InputWindow;
36 36
 
37 37
 /**
38 38
  * The alias command allows users to create aliases on-the-fly.
@@ -53,7 +53,7 @@ public final class AliasCommand extends GlobalCommand implements
53 53
 
54 54
     /** {@inheritDoc} */
55 55
     @Override
56
-    public void execute(final InputWindow origin, final boolean isSilent,
56
+    public void execute(final FrameContainer origin, final boolean isSilent,
57 57
                         final CommandArguments args) {
58 58
         if (args.getArguments().length < 2) {
59 59
             showUsage(origin, isSilent, "alias", "[--remove] <name> [command]");

+ 3
- 5
src/com/dmdirc/commandparser/commands/global/AllServers.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.ServerManager;
27 28
 import com.dmdirc.commandparser.CommandArguments;
@@ -30,7 +31,6 @@ import com.dmdirc.commandparser.commands.GlobalCommand;
30 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 32
 import com.dmdirc.ui.input.AdditionalTabTargets;
32 33
 import com.dmdirc.ui.input.TabCompleter;
33
-import com.dmdirc.ui.interfaces.InputWindow;
34 34
 
35 35
 /**
36 36
  * The AllServers command allows users to issue commands to all servers.
@@ -47,14 +47,12 @@ public final class AllServers extends GlobalCommand implements IntelligentComman
47 47
     
48 48
     /** {@inheritDoc} */
49 49
     @Override
50
-    public void execute(final InputWindow origin, final boolean isSilent,
50
+    public void execute(final FrameContainer origin, final boolean isSilent,
51 51
             final CommandArguments args) {
52 52
         final String command = args.getArgumentsAsString();
53
-        InputWindow window;
54 53
         
55 54
         for (Server target : ServerManager.getServerManager().getServers()) {
56
-            window = target.getFrame();
57
-            window.getCommandParser().parseCommand(window, command);
55
+            target.getFrame().getCommandParser().parseCommand(target, command);
58 56
         }
59 57
     }
60 58
     

+ 3
- 3
src/com/dmdirc/commandparser/commands/global/Clear.java Wyświetl plik

@@ -22,12 +22,12 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
28 29
 import com.dmdirc.commandparser.commands.IntelligentCommand;
29 30
 import com.dmdirc.ui.input.AdditionalTabTargets;
30
-import com.dmdirc.ui.interfaces.InputWindow;
31 31
 
32 32
 /**
33 33
  * The clear command clears the main text area of the current window.
@@ -47,9 +47,9 @@ public final class Clear extends GlobalCommand implements IntelligentCommand {
47 47
     
48 48
     /** {@inheritDoc} */
49 49
     @Override
50
-    public void execute(final InputWindow origin, final boolean isSilent, 
50
+    public void execute(final FrameContainer origin, final boolean isSilent, 
51 51
             final CommandArguments args) {
52
-        origin.clear();
52
+        origin.getDocument().clear();
53 53
     }
54 54
     
55 55
     

+ 25
- 26
src/com/dmdirc/commandparser/commands/global/Debug.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Main;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
@@ -37,7 +38,6 @@ import com.dmdirc.plugins.PluginManager;
37 38
 import com.dmdirc.plugins.Service;
38 39
 import com.dmdirc.plugins.ServiceProvider;
39 40
 import com.dmdirc.ui.input.AdditionalTabTargets;
40
-import com.dmdirc.ui.interfaces.InputWindow;
41 41
 import com.dmdirc.ui.messages.Styliser;
42 42
 import com.dmdirc.updater.UpdateChecker;
43 43
 
@@ -64,7 +64,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
64 64
     
65 65
     /** {@inheritDoc} */
66 66
     @Override
67
-    public void execute(final InputWindow origin, final boolean isSilent,
67
+    public void execute(final FrameContainer origin, final boolean isSilent,
68 68
             final CommandArguments args) {
69 69
         if (args.getArguments().length == 0) {
70 70
             showUsage(origin, isSilent, "debug", "<debug command> [options]");
@@ -102,7 +102,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
102 102
             Main.getUI().showMigrationWizard();
103 103
         } else if ("notify".equals(args.getArguments()[0])) {
104 104
             sendLine(origin, isSilent, FORMAT_OUTPUT, "Current notification colour is: "
105
-                    + origin.getContainer().getNotification());
105
+                    + origin.getNotification());
106 106
         } else {
107 107
             sendLine(origin, isSilent, FORMAT_ERROR, "Unknown debug action.");
108 108
         }
@@ -142,12 +142,11 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
142 142
      * @param origin The window this command was executed in
143 143
      * @param isSilent Whether this command has been silenced or not
144 144
      */
145
-    private void doShowRaw(final InputWindow origin, final boolean isSilent) {
146
-        if (origin == null || origin.getContainer() == null
147
-                || origin.getContainer().getServer() == null) {
145
+    private void doShowRaw(final FrameContainer origin, final boolean isSilent) {
146
+        if (origin == null || origin.getServer() == null) {
148 147
             sendLine(origin, isSilent, FORMAT_ERROR, "Cannot show raw window here.");
149 148
         } else {
150
-            origin.getContainer().getServer().addRaw();
149
+            origin.getServer().addRaw();
151 150
         }
152 151
     }
153 152
     
@@ -158,7 +157,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
158 157
      * @param isSilent Whether this command has been silenced or not
159 158
      * @param args Arguments array for the command
160 159
      */
161
-    private void doConfigStats(final InputWindow origin, final boolean isSilent,
160
+    private void doConfigStats(final FrameContainer origin, final boolean isSilent,
162 161
             final String[] args) {
163 162
         int arg = -1;
164 163
         if (args.length == 2) {
@@ -192,7 +191,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
192 191
      * @param isSilent Whether this command has been silenced or not
193 192
      * @param regex Regex to match options against
194 193
      */
195
-    private void doConfigStatsOption(final InputWindow origin,
194
+    private void doConfigStatsOption(final FrameContainer origin,
196 195
             final boolean isSilent, final String regex) {
197 196
         final SortedSet<Entry<String, Integer>> sortedStats = getSortedStats();
198 197
         boolean found = false;
@@ -216,7 +215,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
216 215
      * @param isSilent Whether this command has been silenced or not
217 216
      * @param top Top number of entries to show
218 217
      */
219
-    private void doConfigStatsTop(final InputWindow origin,
218
+    private void doConfigStatsTop(final FrameContainer origin,
220 219
             final boolean isSilent, final int top) {
221 220
         final SortedSet<Entry<String, Integer>> sortedStats = getSortedStats();
222 221
         int i = 0;
@@ -238,7 +237,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
238 237
      * @param isSilent Whether this command has been silenced or not
239 238
      * @param cutoff Cut off value for stats
240 239
      */
241
-    private void doConfigStatsCutOff(final InputWindow origin,
240
+    private void doConfigStatsCutOff(final FrameContainer origin,
242 241
             final boolean isSilent, final int cutoff) {
243 242
         final SortedSet<Entry<String, Integer>> sortedStats = getSortedStats();
244 243
         for (Map.Entry<String, Integer> entry : sortedStats) {
@@ -269,7 +268,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
269 268
      * @param origin The window this command was executed in
270 269
      * @param isSilent Whether this command has been silenced or not
271 270
      */
272
-    private void doMemInfo(final InputWindow origin, final boolean isSilent) {
271
+    private void doMemInfo(final FrameContainer origin, final boolean isSilent) {
273 272
         sendLine(origin, isSilent, FORMAT_OUTPUT, "Total Memory: "
274 273
                 + Runtime.getRuntime().totalMemory());
275 274
         sendLine(origin, isSilent, FORMAT_OUTPUT, "Free Memory: "
@@ -284,7 +283,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
284 283
      * @param origin The window this command was executed in
285 284
      * @param isSilent Whether this command has been silenced or not
286 285
      */
287
-    private void doColourSpam(final InputWindow origin, final boolean isSilent) {
286
+    private void doColourSpam(final FrameContainer origin, final boolean isSilent) {
288 287
         for (int i = 0; i < 100; i++) {
289 288
             sendLine(origin, isSilent, FORMAT_OUTPUT, ((char) 3) + "5Colour! "
290 289
                     + ((char) 3) + "6Colour! " + ((char) 3) + "7Colour! "
@@ -300,7 +299,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
300 299
      * @param origin The window this command was executed in
301 300
      * @param isSilent Whether this command has been silenced or not
302 301
      */
303
-    private void doGarbage(final InputWindow origin, final boolean isSilent) {
302
+    private void doGarbage(final FrameContainer origin, final boolean isSilent) {
304 303
         System.gc();
305 304
         sendLine(origin, isSilent, FORMAT_OUTPUT, "Invoked garbage collector.");
306 305
     }
@@ -311,7 +310,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
311 310
      * @param origin The window this command was executed in
312 311
      * @param isSilent Whether this command has been silenced or not
313 312
      */
314
-    private void doConfigInfo(final InputWindow origin, final boolean isSilent) {
313
+    private void doConfigInfo(final FrameContainer origin, final boolean isSilent) {
315 314
         for (Identity source : origin.getConfigManager().getSources()) {
316 315
             sendLine(origin, isSilent, FORMAT_OUTPUT, source.getTarget() + " - "
317 316
                     + source + "(" + source.getTarget().getOrder() + ")");
@@ -324,7 +323,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
324 323
      * @param origin The window this command was executed in
325 324
      * @param isSilent Whether this command has been silenced or not
326 325
      */
327
-    private void doGlobalConfigInfo(final InputWindow origin, final boolean isSilent) {
326
+    private void doGlobalConfigInfo(final FrameContainer origin, final boolean isSilent) {
328 327
         for (Identity source : IdentityManager.getGlobalConfig().getSources()) {
329 328
             sendLine(origin, isSilent, FORMAT_OUTPUT, source.getTarget() + " - "
330 329
                     + source + "(" + source.getTarget().getOrder() + ")");
@@ -337,7 +336,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
337 336
      * @param origin The window this command was executed in
338 337
      * @param isSilent Whether this command has been silenced or not
339 338
      */
340
-    private void doForceUpdate(final InputWindow origin, final boolean isSilent) {
339
+    private void doForceUpdate(final FrameContainer origin, final boolean isSilent) {
341 340
         if (IdentityManager.getGlobalConfig().getOptionBool("updater", "enable")) {
342 341
             new Thread(new UpdateChecker(), "Forced update checker").start();
343 342
         } else {
@@ -354,7 +353,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
354 353
      * @param origin The window this command was executed in
355 354
      * @param isSilent Whether this command has been silenced or not
356 355
      */
357
-    private void doThreads(final InputWindow origin, final boolean isSilent) {
356
+    private void doThreads(final FrameContainer origin, final boolean isSilent) {
358 357
         for (Entry<Thread, StackTraceElement[]> thread: Thread.getAllStackTraces().entrySet()) {
359 358
             sendLine(origin, isSilent, FORMAT_OUTPUT, Styliser.CODE_BOLD
360 359
                     + thread.getKey().getName());
@@ -372,11 +371,11 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
372 371
      * @param origin The window this command was executed in
373 372
      * @param isSilent Whether this command has been silenced or not
374 373
      */
375
-    private void doServerState(final InputWindow origin, final boolean isSilent) {
376
-        if (origin.getContainer().getServer() == null) {
374
+    private void doServerState(final FrameContainer origin, final boolean isSilent) {
375
+        if (origin.getServer() == null) {
377 376
             sendLine(origin, isSilent, FORMAT_ERROR, "This window isn't connected to a server");
378 377
         } else {
379
-            final Server server = origin.getContainer().getServer();
378
+            final Server server = origin.getServer();
380 379
             sendLine(origin, isSilent, FORMAT_OUTPUT, server.getStatus().getTransitionHistory());
381 380
         }
382 381
     }
@@ -387,11 +386,11 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
387 386
      * @param origin The window this command was executed in
388 387
      * @param isSilent Whether this command has been silenced or not
389 388
      */
390
-    private void doServerInfo(final InputWindow origin, final boolean isSilent) {
391
-        if (origin.getContainer().getServer() == null) {
389
+    private void doServerInfo(final FrameContainer origin, final boolean isSilent) {
390
+        if (origin.getServer() == null) {
392 391
             sendLine(origin, isSilent, FORMAT_ERROR, "This window isn't connected to a server");
393 392
         } else {
394
-            final Server server = origin.getContainer().getServer();
393
+            final Server server = origin.getServer();
395 394
             sendLine(origin, isSilent, FORMAT_OUTPUT, "Server name: " + server.getName());
396 395
             sendLine(origin, isSilent, FORMAT_OUTPUT, "Actual name: "
397 396
                     + server.getParser().getServerName());
@@ -412,7 +411,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
412 411
      * 
413 412
      * @param origin The window this command was executed in
414 413
      */
415
-    private void doBenchmark(final InputWindow origin) {
414
+    private void doBenchmark(final FrameContainer origin) {
416 415
         long[] results = new long[10];
417 416
         
418 417
         for (int i = 0; i < results.length; i++) {
@@ -440,7 +439,7 @@ public class Debug extends GlobalCommand implements IntelligentCommand {
440 439
      * @param isSilent Whether this command has been silenced or not
441 440
      * @param args The arguments that were passed to the command
442 441
      */
443
-    private void doServices(final InputWindow origin, final boolean isSilent,
442
+    private void doServices(final FrameContainer origin, final boolean isSilent,
444 443
             final String[] args) {
445 444
         sendLine(origin, isSilent, FORMAT_OUTPUT, "Available Services:");
446 445
         for (Service service : PluginManager.getPluginManager().getAllServices()) {

+ 4
- 8
src/com/dmdirc/commandparser/commands/global/Echo.java Wyświetl plik

@@ -31,7 +31,6 @@ import com.dmdirc.commandparser.commands.GlobalCommand;
31 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
32 32
 import com.dmdirc.ui.WindowManager;
33 33
 import com.dmdirc.ui.input.AdditionalTabTargets;
34
-import com.dmdirc.ui.interfaces.InputWindow;
35 34
 
36 35
 import java.util.ArrayList;
37 36
 import java.util.Arrays;
@@ -55,7 +54,7 @@ public final class Echo extends GlobalCommand implements IntelligentCommand {
55 54
 
56 55
     /** {@inheritDoc} */
57 56
     @Override
58
-    public void execute(final InputWindow origin, final boolean isSilent,
57
+    public void execute(final FrameContainer origin, final boolean isSilent,
59 58
             final CommandArguments args) {
60 59
         if (args.getArguments().length > 0
61 60
                 && args.getArguments()[0].equalsIgnoreCase("--active")) {
@@ -64,11 +63,10 @@ public final class Echo extends GlobalCommand implements IntelligentCommand {
64 63
         } else if (args.getArguments().length > 1
65 64
                 && args.getArguments()[0].equalsIgnoreCase("--target")) {
66 65
             FrameContainer frame = null;
67
-            FrameContainer target = origin.getContainer();
66
+            FrameContainer target = origin;
68 67
 
69 68
             while (frame == null && target != null) {
70 69
                 frame = WindowManager.findCustomWindow(target, args.getArguments()[1]);
71
-                target = WindowManager.getParent(target);
72 70
             }
73 71
 
74 72
             if (frame == null) {
@@ -122,13 +120,11 @@ public final class Echo extends GlobalCommand implements IntelligentCommand {
122 120
                     .getServer();
123 121
 
124 122
             //Active window's Children
125
-            windowList.addAll(Arrays.asList(WindowManager.getChildren(context
126
-                    .getWindow().getContainer())));
123
+            windowList.addAll(context.getWindow().getContainer().getChildren());
127 124
 
128 125
             //Children of Current Window's server
129 126
             if (currentServer != null) {
130
-                windowList.addAll(Arrays.asList(WindowManager.getChildren(
131
-                        currentServer)));
127
+                windowList.addAll(currentServer.getChildren());
132 128
             }
133 129
 
134 130
             //Global Windows

+ 2
- 2
src/com/dmdirc/commandparser/commands/global/Exit.java Wyświetl plik

@@ -22,11 +22,11 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Main;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
28 29
 import com.dmdirc.commandparser.commands.GlobalCommand;
29
-import com.dmdirc.ui.interfaces.InputWindow;
30 30
 
31 31
 /**
32 32
  * The exit command allows the user to quit DMDirc with a custom quit message.
@@ -47,7 +47,7 @@ public final class Exit extends GlobalCommand {
47 47
     
48 48
     /** {@inheritDoc} */
49 49
     @Override
50
-    public void execute(final InputWindow origin, final boolean isSilent,
50
+    public void execute(final FrameContainer origin, final boolean isSilent,
51 51
             final CommandArguments args) {
52 52
         Main.quit(args.getArguments().length > 0 ? args.getArgumentsAsString()
53 53
                 : origin.getConfigManager().getOption("general", "closemessage"));

+ 7
- 6
src/com/dmdirc/commandparser/commands/global/Help.java Wyświetl plik

@@ -22,6 +22,8 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
26
+import com.dmdirc.WritableFrameContainer;
25 27
 import com.dmdirc.commandparser.CommandArguments;
26 28
 import com.dmdirc.commandparser.CommandInfo;
27 29
 import com.dmdirc.commandparser.CommandManager;
@@ -30,7 +32,6 @@ import com.dmdirc.commandparser.commands.GlobalCommand;
30 32
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 33
 import com.dmdirc.ui.input.AdditionalTabTargets;
32 34
 import com.dmdirc.ui.input.TabCompletionType;
33
-import com.dmdirc.ui.interfaces.InputWindow;
34 35
 import com.dmdirc.ui.messages.Styliser;
35 36
 
36 37
 import java.util.ArrayList;
@@ -57,7 +58,7 @@ public final class Help extends GlobalCommand implements IntelligentCommand {
57 58
     
58 59
     /** {@inheritDoc} */
59 60
     @Override
60
-    public void execute(final InputWindow origin, final boolean isSilent,
61
+    public void execute(final FrameContainer origin, final boolean isSilent,
61 62
             final CommandArguments args) {
62 63
         if (args.getArguments().length == 0) {
63 64
             showAllCommands(origin, isSilent);
@@ -72,9 +73,9 @@ public final class Help extends GlobalCommand implements IntelligentCommand {
72 73
      * @param origin The window the command was executed in
73 74
      * @param isSilent Whether this command has been silenced or not
74 75
      */
75
-    private void showAllCommands(final InputWindow origin, final boolean isSilent) {
76
-        final List<String> commands = new ArrayList<String>(origin.getCommandParser()
77
-                .getCommands().keySet());
76
+    private void showAllCommands(final FrameContainer origin, final boolean isSilent) {
77
+        final List<String> commands = new ArrayList<String>(((WritableFrameContainer) origin)
78
+                .getFrame().getCommandParser().getCommands().keySet());
78 79
 
79 80
         Collections.sort(commands);
80 81
         
@@ -109,7 +110,7 @@ public final class Help extends GlobalCommand implements IntelligentCommand {
109 110
      * @param isSilent Whether this command has been silenced or not
110 111
      * @param name The name of the command to display info for
111 112
      */
112
-    private void showCommand(final InputWindow origin, final boolean isSilent,
113
+    private void showCommand(final FrameContainer origin, final boolean isSilent,
113 114
             final String name) {
114 115
         Map.Entry<CommandInfo, Command> command = null;
115 116
 

+ 5
- 3
src/com/dmdirc/commandparser/commands/global/Ifplugin.java Wyświetl plik

@@ -22,6 +22,8 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
26
+import com.dmdirc.WritableFrameContainer;
25 27
 import com.dmdirc.commandparser.CommandArguments;
26 28
 import com.dmdirc.commandparser.CommandManager;
27 29
 import com.dmdirc.commandparser.commands.GlobalCommand;
@@ -31,7 +33,6 @@ import com.dmdirc.plugins.PluginInfo;
31 33
 import com.dmdirc.plugins.PluginManager;
32 34
 import com.dmdirc.ui.input.AdditionalTabTargets;
33 35
 import com.dmdirc.ui.input.TabCompleter;
34
-import com.dmdirc.ui.interfaces.InputWindow;
35 36
 
36 37
 /**
37 38
  * The if plugin command allows the user to execute commands based on whether
@@ -52,7 +53,7 @@ public final class Ifplugin extends GlobalCommand implements IntelligentCommand
52 53
     
53 54
     /** {@inheritDoc} */
54 55
     @Override
55
-    public void execute(final InputWindow origin, final boolean isSilent,
56
+    public void execute(final FrameContainer origin, final boolean isSilent,
56 57
             final CommandArguments args) {
57 58
         if (args.getArguments().length <= 1) {
58 59
             showUsage(origin, isSilent, "ifplugin", "<[!]plugin> <command>");
@@ -76,7 +77,8 @@ public final class Ifplugin extends GlobalCommand implements IntelligentCommand
76 77
                 GlobalCommandParser.getGlobalCommandParser().parseCommand(null,
77 78
                         args.getArgumentsAsString(1));
78 79
             } else {
79
-                origin.getCommandParser().parseCommand(origin, args.getArgumentsAsString(1));
80
+                ((WritableFrameContainer) origin).getFrame().getCommandParser()
81
+                        .parseCommand(origin, args.getArgumentsAsString(1));
80 82
             }
81 83
         }
82 84
     }

+ 7
- 4
src/com/dmdirc/commandparser/commands/global/Input.java Wyświetl plik

@@ -23,12 +23,13 @@
23 23
 
24 24
 package com.dmdirc.commandparser.commands.global;
25 25
 
26
+import com.dmdirc.FrameContainer;
27
+import com.dmdirc.WritableFrameContainer;
26 28
 import com.dmdirc.commandparser.CommandArguments;
27 29
 import com.dmdirc.commandparser.CommandManager;
28 30
 import com.dmdirc.commandparser.commands.GlobalCommand;
29 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
30 32
 import com.dmdirc.ui.input.AdditionalTabTargets;
31
-import com.dmdirc.ui.interfaces.InputWindow;
32 33
 
33 34
 /**
34 35
  * The input command allows you to maniplulate text in a windows inputField.
@@ -49,7 +50,7 @@ public class Input extends GlobalCommand implements IntelligentCommand {
49 50
 
50 51
     /** {@inheritDoc} */
51 52
     @Override
52
-    public void execute(final InputWindow origin, final boolean isSilent,
53
+    public void execute(final FrameContainer origin, final boolean isSilent,
53 54
             final CommandArguments args) {
54 55
 
55 56
         if (args.getArguments().length == 0) {
@@ -58,9 +59,11 @@ public class Input extends GlobalCommand implements IntelligentCommand {
58 59
             return;
59 60
         } else if (args.getArguments().length == 1
60 61
                 && "--clear".equals(args.getArgumentsAsString(0))) {
61
-            origin.getInputHandler().clearInputField();
62
+            ((WritableFrameContainer) origin).getFrame()
63
+                    .getInputHandler().clearInputField();
62 64
         } else {
63
-            origin.getInputHandler().addToInputField(args.getArgumentsAsString());
65
+            ((WritableFrameContainer) origin).getFrame()
66
+                    .getInputHandler().addToInputField(args.getArgumentsAsString());
64 67
         }
65 68
     }
66 69
 

+ 2
- 2
src/com/dmdirc/commandparser/commands/global/LoadPlugin.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
@@ -29,7 +30,6 @@ import com.dmdirc.commandparser.commands.IntelligentCommand;
29 30
 import com.dmdirc.plugins.PluginInfo;
30 31
 import com.dmdirc.plugins.PluginManager;
31 32
 import com.dmdirc.ui.input.AdditionalTabTargets;
32
-import com.dmdirc.ui.interfaces.InputWindow;
33 33
 
34 34
 /**
35 35
  * Allows the user to load a plugin.
@@ -48,7 +48,7 @@ public final class LoadPlugin extends GlobalCommand implements IntelligentComman
48 48
 
49 49
     /** {@inheritDoc} */
50 50
     @Override
51
-    public void execute(final InputWindow origin, final boolean isSilent,
51
+    public void execute(final FrameContainer origin, final boolean isSilent,
52 52
             final CommandArguments args) {
53 53
         if (args.getArguments().length == 0) {
54 54
             showUsage(origin, isSilent, "loadplugin", "<plugin>");

+ 4
- 3
src/com/dmdirc/commandparser/commands/global/NewServer.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
@@ -33,7 +34,7 @@ import com.dmdirc.logger.Logger;
33 34
 import com.dmdirc.plugins.PluginManager;
34 35
 import com.dmdirc.plugins.Service;
35 36
 import com.dmdirc.ui.input.AdditionalTabTargets;
36
-import com.dmdirc.ui.interfaces.InputWindow;
37
+
37 38
 import java.net.URI;
38 39
 import java.net.URISyntaxException;
39 40
 import java.util.regex.Matcher;
@@ -57,7 +58,7 @@ public final class NewServer extends GlobalCommand implements IntelligentCommand
57 58
 
58 59
     /** {@inheritDoc} */
59 60
     @Override
60
-    public void execute(final InputWindow origin, final boolean isSilent,
61
+    public void execute(final FrameContainer origin, final boolean isSilent,
61 62
             final CommandArguments args) {
62 63
         URI address = null;
63 64
 
@@ -135,7 +136,7 @@ public final class NewServer extends GlobalCommand implements IntelligentCommand
135 136
      *
136 137
      * @return URI is input was valid
137 138
      */
138
-    public static URI parseInput(final InputWindow origin, final boolean isSilent,
139
+    public static URI parseInput(final FrameContainer origin, final boolean isSilent,
139 140
             final CommandArguments args) {
140 141
 
141 142
         boolean ssl = false;

+ 3
- 3
src/com/dmdirc/commandparser/commands/global/Notify.java Wyświetl plik

@@ -22,12 +22,12 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
28 29
 import com.dmdirc.commandparser.commands.IntelligentCommand;
29 30
 import com.dmdirc.ui.input.AdditionalTabTargets;
30
-import com.dmdirc.ui.interfaces.InputWindow;
31 31
 import com.dmdirc.ui.messages.ColourManager;
32 32
 
33 33
 import java.awt.Color;
@@ -51,7 +51,7 @@ public final class Notify extends GlobalCommand implements IntelligentCommand {
51 51
     
52 52
     /** {@inheritDoc} */
53 53
     @Override
54
-    public void execute(final InputWindow origin, final boolean isSilent,
54
+    public void execute(final FrameContainer origin, final boolean isSilent,
55 55
             final CommandArguments args) {
56 56
         if (args.getArguments().length == 0) {
57 57
             showUsage(origin, isSilent, "notify", "<colour>");
@@ -67,7 +67,7 @@ public final class Notify extends GlobalCommand implements IntelligentCommand {
67 67
         } else if (origin != null) {            
68 68
             // There's not much point echoing an error if the origin isn't
69 69
             // valid, as errors go to the origin!
70
-            origin.getContainer().sendNotification(colour);
70
+            origin.sendNotification(colour);
71 71
         }
72 72
     }
73 73
     

+ 4
- 5
src/com/dmdirc/commandparser/commands/global/OpenWindow.java Wyświetl plik

@@ -30,7 +30,6 @@ import com.dmdirc.commandparser.commands.GlobalCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.ui.WindowManager;
32 32
 import com.dmdirc.ui.input.AdditionalTabTargets;
33
-import com.dmdirc.ui.interfaces.InputWindow;
34 33
 
35 34
 /**
36 35
  * Opens a new window.
@@ -48,22 +47,22 @@ public class OpenWindow extends GlobalCommand implements IntelligentCommand {
48 47
 
49 48
     /** {@inheritDoc} */
50 49
     @Override
51
-    public void execute(final InputWindow origin, final boolean isSilent,
50
+    public void execute(final FrameContainer origin, final boolean isSilent,
52 51
             final CommandArguments args) {
53 52
         int start = 0;
54 53
         FrameContainer parent = null;
55 54
 
56 55
         if (args.getArguments().length > 0 && "--server".equals(args.getArguments()[0])) {
57
-            if (origin.getContainer().getServer() == null) {
56
+            if (origin.getServer() == null) {
58 57
                 sendLine(origin, isSilent, FORMAT_ERROR,
59 58
                         "This window doesn't have an associated server.");
60 59
                 return;
61 60
             }
62 61
 
63
-            parent = origin.getContainer().getServer();
62
+            parent = origin.getServer();
64 63
             start = 1;
65 64
         } else if (args.getArguments().length > 0 && "--child".equals(args.getArguments()[0])) {
66
-            parent = origin.getContainer();
65
+            parent = origin;
67 66
             start = 1;
68 67
         }
69 68
 

+ 2
- 2
src/com/dmdirc/commandparser/commands/global/ReloadActions.java Wyświetl plik

@@ -22,13 +22,13 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.actions.ActionManager;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
28 29
 import com.dmdirc.commandparser.commands.GlobalCommand;
29 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
30 31
 import com.dmdirc.ui.input.AdditionalTabTargets;
31
-import com.dmdirc.ui.interfaces.InputWindow;
32 32
 
33 33
 /**
34 34
  * Allows the user to reload actions.
@@ -48,7 +48,7 @@ public final class ReloadActions extends GlobalCommand implements IntelligentCom
48 48
     
49 49
     /** {@inheritDoc} */
50 50
     @Override
51
-    public void execute(final InputWindow origin, final boolean isSilent,
51
+    public void execute(final FrameContainer origin, final boolean isSilent,
52 52
             final CommandArguments args) {
53 53
         ActionManager.loadActions();
54 54
         sendLine(origin, isSilent, FORMAT_OUTPUT, "Actions reloaded.");

+ 2
- 2
src/com/dmdirc/commandparser/commands/global/ReloadIdentities.java Wyświetl plik

@@ -22,13 +22,13 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
28 29
 import com.dmdirc.commandparser.commands.IntelligentCommand;
29 30
 import com.dmdirc.config.IdentityManager;
30 31
 import com.dmdirc.ui.input.AdditionalTabTargets;
31
-import com.dmdirc.ui.interfaces.InputWindow;
32 32
 
33 33
 /**
34 34
  * Allows the user to reload identities.
@@ -46,7 +46,7 @@ public class ReloadIdentities extends GlobalCommand implements IntelligentComman
46 46
 
47 47
     /** {@inheritDoc} */
48 48
     @Override    
49
-    public void execute(final InputWindow origin, final boolean isSilent,
49
+    public void execute(final FrameContainer origin, final boolean isSilent,
50 50
             final CommandArguments args) {
51 51
         IdentityManager.loadUser();
52 52
         

+ 2
- 2
src/com/dmdirc/commandparser/commands/global/ReloadPlugin.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
@@ -29,7 +30,6 @@ import com.dmdirc.commandparser.commands.IntelligentCommand;
29 30
 import com.dmdirc.plugins.PluginInfo;
30 31
 import com.dmdirc.plugins.PluginManager;
31 32
 import com.dmdirc.ui.input.AdditionalTabTargets;
32
-import com.dmdirc.ui.interfaces.InputWindow;
33 33
 
34 34
 /**
35 35
  * Allows the user to reload a plugin.
@@ -49,7 +49,7 @@ public final class ReloadPlugin extends GlobalCommand implements IntelligentComm
49 49
     
50 50
     /** {@inheritDoc} */
51 51
     @Override
52
-    public void execute(final InputWindow origin, final boolean isSilent,
52
+    public void execute(final FrameContainer origin, final boolean isSilent,
53 53
             final CommandArguments args) {
54 54
         if (args.getArguments().length == 0) {
55 55
             showUsage(origin, isSilent, "reloadplugin", "<plugin>");

+ 2
- 2
src/com/dmdirc/commandparser/commands/global/SaveConfig.java Wyświetl plik

@@ -22,13 +22,13 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
28 29
 import com.dmdirc.commandparser.commands.IntelligentCommand;
29 30
 import com.dmdirc.config.IdentityManager;
30 31
 import com.dmdirc.ui.input.AdditionalTabTargets;
31
-import com.dmdirc.ui.interfaces.InputWindow;
32 32
 
33 33
 /**
34 34
  * Allows the user to save the config file.
@@ -48,7 +48,7 @@ public final class SaveConfig extends GlobalCommand implements IntelligentComman
48 48
     
49 49
     /** {@inheritDoc} */
50 50
     @Override
51
-    public void execute(final InputWindow origin, final boolean isSilent,
51
+    public void execute(final FrameContainer origin, final boolean isSilent,
52 52
             final CommandArguments args) {
53 53
         IdentityManager.save();
54 54
         

+ 11
- 11
src/com/dmdirc/commandparser/commands/global/Set.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
@@ -30,7 +31,6 @@ import com.dmdirc.config.ConfigManager;
30 31
 import com.dmdirc.config.Identity;
31 32
 import com.dmdirc.config.IdentityManager;
32 33
 import com.dmdirc.ui.input.AdditionalTabTargets;
33
-import com.dmdirc.ui.interfaces.InputWindow;
34 34
 
35 35
 import java.util.List;
36 36
 
@@ -52,7 +52,7 @@ public final class Set extends GlobalCommand implements IntelligentCommand {
52 52
     
53 53
     /** {@inheritDoc} */
54 54
     @Override
55
-    public void execute(final InputWindow origin, final boolean isSilent,
55
+    public void execute(final FrameContainer origin, final boolean isSilent,
56 56
             final CommandArguments args) {
57 57
         int i = 0;
58 58
         
@@ -61,10 +61,10 @@ public final class Set extends GlobalCommand implements IntelligentCommand {
61 61
         
62 62
         if (args.getArguments().length > 0
63 63
                 && "--server".equalsIgnoreCase(args.getArguments()[0]) && origin != null
64
-                && origin.getContainer().getServer() != null) {
64
+                && origin.getServer() != null) {
65 65
             i = 1;
66
-            identity = origin.getContainer().getServer().getServerIdentity();
67
-            manager = origin.getContainer().getServer().getConfigManager();
66
+            identity = origin.getServer().getServerIdentity();
67
+            manager = origin.getServer().getConfigManager();
68 68
         }
69 69
         
70 70
         switch (args.getArguments().length - i) {
@@ -101,7 +101,7 @@ public final class Set extends GlobalCommand implements IntelligentCommand {
101 101
      * @param isSilent Whether or not the command is being silenced or not
102 102
      * @param manager The config manager to use to retrieve data
103 103
      */
104
-    private void doDomainList(final InputWindow origin, final boolean isSilent,
104
+    private void doDomainList(final FrameContainer origin, final boolean isSilent,
105 105
             final ConfigManager manager) {
106 106
         final StringBuffer output = new StringBuffer(67);
107 107
         
@@ -125,7 +125,7 @@ public final class Set extends GlobalCommand implements IntelligentCommand {
125 125
      * @param manager The config manager to use to retrieve data
126 126
      * @param domain The domain to be inspected
127 127
      */
128
-    private void doOptionsList(final InputWindow origin,
128
+    private void doOptionsList(final FrameContainer origin,
129 129
             final boolean isSilent, final ConfigManager manager, final String domain) {
130 130
         final StringBuffer output = new StringBuffer(24);
131 131
         
@@ -158,7 +158,7 @@ public final class Set extends GlobalCommand implements IntelligentCommand {
158 158
      * @param domain The domain of the option
159 159
      * @param option The name of the option
160 160
      */
161
-    private void doShowOption(final InputWindow origin,
161
+    private void doShowOption(final FrameContainer origin,
162 162
             final boolean isSilent, final ConfigManager manager,
163 163
             final String domain, final String option) {
164 164
         if (manager.hasOptionString(domain, option)) {
@@ -179,7 +179,7 @@ public final class Set extends GlobalCommand implements IntelligentCommand {
179 179
      * @param option The name of the option
180 180
      * @param newvalue The value the option should be set to
181 181
      */
182
-    private void doSetOption(final InputWindow origin,
182
+    private void doSetOption(final FrameContainer origin,
183 183
             final boolean isSilent, final Identity identity,
184 184
             final String domain, final String option, final String newvalue) {
185 185
         identity.setOption(domain, option, newvalue);
@@ -199,7 +199,7 @@ public final class Set extends GlobalCommand implements IntelligentCommand {
199 199
      * @param option The name of the option
200 200
      * @param data The data to be appended
201 201
      */
202
-    private void doAppendOption(final InputWindow origin,
202
+    private void doAppendOption(final FrameContainer origin,
203 203
             final boolean isSilent, final Identity identity, final ConfigManager manager,
204 204
             final String domain,final String option, final String data) {
205 205
         doSetOption(origin, isSilent, identity, domain, option,
@@ -216,7 +216,7 @@ public final class Set extends GlobalCommand implements IntelligentCommand {
216 216
      * @param domain The domain of the option
217 217
      * @param option The name of the option
218 218
      */
219
-    private void doUnsetOption(final InputWindow origin,
219
+    private void doUnsetOption(final FrameContainer origin,
220 220
             final boolean isSilent, final Identity identity, final String domain,
221 221
             final String option) {
222 222
         identity.unsetOption(domain, option);

+ 2
- 2
src/com/dmdirc/commandparser/commands/global/UnloadPlugin.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
@@ -29,7 +30,6 @@ import com.dmdirc.commandparser.commands.IntelligentCommand;
29 30
 import com.dmdirc.plugins.PluginInfo;
30 31
 import com.dmdirc.plugins.PluginManager;
31 32
 import com.dmdirc.ui.input.AdditionalTabTargets;
32
-import com.dmdirc.ui.interfaces.InputWindow;
33 33
 
34 34
 /**
35 35
  * Allows the user to unload a plugin.
@@ -49,7 +49,7 @@ public final class UnloadPlugin extends GlobalCommand implements IntelligentComm
49 49
     
50 50
     /** {@inheritDoc} */
51 51
     @Override
52
-    public void execute(final InputWindow origin, final boolean isSilent,
52
+    public void execute(final FrameContainer origin, final boolean isSilent,
53 53
             final CommandArguments args) {
54 54
         if (args.getArguments().length == 0) {
55 55
             showUsage(origin, isSilent, "unloadplugin", "<plugin>");

+ 3
- 2
src/com/dmdirc/commandparser/commands/server/AllChannels.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
@@ -47,14 +48,14 @@ public final class AllChannels extends ServerCommand implements IntelligentComma
47 48
     
48 49
     /** {@inheritDoc} */
49 50
     @Override
50
-    public void execute(final InputWindow origin, final Server server,
51
+    public void execute(final FrameContainer origin, final Server server,
51 52
             final boolean isSilent, final CommandArguments args) {
52 53
         final String command = args.getArgumentsAsString();
53 54
         InputWindow window;
54 55
         
55 56
         for (String channel : server.getChannels()) {
56 57
             window = server.getChannel(channel).getFrame();
57
-            window.getCommandParser().parseCommand(window, command);
58
+            window.getCommandParser().parseCommand(server.getChannel(channel), command);
58 59
         }
59 60
     }
60 61
     

+ 2
- 2
src/com/dmdirc/commandparser/commands/server/Away.java Wyświetl plik

@@ -22,12 +22,12 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
28 29
 import com.dmdirc.commandparser.commands.CommandOptions;
29 30
 import com.dmdirc.commandparser.commands.ServerCommand;
30
-import com.dmdirc.ui.interfaces.InputWindow;
31 31
 
32 32
 /**
33 33
  * The away command allows the user to set their away message.
@@ -47,7 +47,7 @@ public final class Away extends ServerCommand {
47 47
     
48 48
     /** {@inheritDoc} */
49 49
     @Override
50
-    public void execute(final InputWindow origin, final Server server,
50
+    public void execute(final FrameContainer origin, final Server server,
51 51
             final boolean isSilent, final CommandArguments args) {
52 52
         final String line = args.getArgumentsAsString();
53 53
 

+ 2
- 2
src/com/dmdirc/commandparser/commands/server/Back.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
@@ -29,7 +30,6 @@ import com.dmdirc.commandparser.commands.CommandOptions;
29 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
30 31
 import com.dmdirc.commandparser.commands.ServerCommand;
31 32
 import com.dmdirc.ui.input.AdditionalTabTargets;
32
-import com.dmdirc.ui.interfaces.InputWindow;
33 33
 
34 34
 /**
35 35
  * The back command allows the user to unset their away status.
@@ -55,7 +55,7 @@ public final class Back extends ServerCommand implements IntelligentCommand {
55 55
      * @param args The user supplied arguments
56 56
      */
57 57
     @Override
58
-    public void execute(final InputWindow origin, final Server server,
58
+    public void execute(final FrameContainer origin, final Server server,
59 59
             final boolean isSilent, final CommandArguments args) {        
60 60
         server.getParser().getLocalClient().setBack();
61 61
     }

+ 2
- 2
src/com/dmdirc/commandparser/commands/server/ChangeServer.java Wyświetl plik

@@ -22,12 +22,12 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
28 29
 import com.dmdirc.commandparser.commands.ServerCommand;
29 30
 import com.dmdirc.commandparser.commands.global.NewServer;
30
-import com.dmdirc.ui.interfaces.InputWindow;
31 31
 
32 32
 import java.net.URI;
33 33
 import java.net.URISyntaxException;
@@ -50,7 +50,7 @@ public final class ChangeServer extends ServerCommand {
50 50
     
51 51
     /** {@inheritDoc} */
52 52
     @Override
53
-    public void execute(final InputWindow origin,  final Server server,
53
+    public void execute(final FrameContainer origin,  final Server server,
54 54
             final boolean isSilent, final CommandArguments args) {
55 55
         URI address = null;
56 56
         if (args.getArguments().length == 0) {

+ 2
- 2
src/com/dmdirc/commandparser/commands/server/Ctcp.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
@@ -30,7 +31,6 @@ import com.dmdirc.commandparser.commands.IntelligentCommand;
30 31
 import com.dmdirc.commandparser.commands.ServerCommand;
31 32
 import com.dmdirc.ui.input.AdditionalTabTargets;
32 33
 import com.dmdirc.ui.input.TabCompletionType;
33
-import com.dmdirc.ui.interfaces.InputWindow;
34 34
 
35 35
 /**
36 36
  * Allows the user to send CTCP messages.
@@ -56,7 +56,7 @@ public final class Ctcp extends ServerCommand implements IntelligentCommand {
56 56
      * @param args The user supplied arguments
57 57
      */
58 58
     @Override
59
-    public void execute(final InputWindow origin, final Server server,
59
+    public void execute(final FrameContainer origin, final Server server,
60 60
             final boolean isSilent, final CommandArguments args) {
61 61
         if (args.getArguments().length < 2) {
62 62
             showUsage(origin, isSilent, "ctcp", "<target> <type> [arguments]");

+ 2
- 2
src/com/dmdirc/commandparser/commands/server/Disconnect.java Wyświetl plik

@@ -22,11 +22,11 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
28 29
 import com.dmdirc.commandparser.commands.ServerCommand;
29
-import com.dmdirc.ui.interfaces.InputWindow;
30 30
 
31 31
 /**
32 32
  * The disconnect command disconnects from the current server.
@@ -51,7 +51,7 @@ public final class Disconnect extends ServerCommand {
51 51
      * @param args The user supplied arguments
52 52
      */
53 53
     @Override
54
-    public void execute(final InputWindow origin, final Server server,
54
+    public void execute(final FrameContainer origin, final Server server,
55 55
             final boolean isSilent, final CommandArguments args) {
56 56
         String line;
57 57
         

+ 6
- 6
src/com/dmdirc/commandparser/commands/server/Ignore.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
@@ -30,7 +31,6 @@ import com.dmdirc.commandparser.commands.ServerCommand;
30 31
 import com.dmdirc.parser.common.IgnoreList;
31 32
 import com.dmdirc.ui.input.AdditionalTabTargets;
32 33
 import com.dmdirc.ui.input.TabCompletionType;
33
-import com.dmdirc.ui.interfaces.InputWindow;
34 34
 
35 35
 import java.util.List;
36 36
 import java.util.regex.Pattern;
@@ -59,7 +59,7 @@ public final class Ignore extends ServerCommand implements IntelligentCommand {
59 59
      * @param args The user supplied arguments
60 60
      */
61 61
     @Override
62
-    public void execute(final InputWindow origin, final Server server,
62
+    public void execute(final FrameContainer origin, final Server server,
63 63
             final boolean isSilent, final CommandArguments args) {
64 64
 
65 65
         if (args.getArguments().length == 0) {
@@ -73,7 +73,7 @@ public final class Ignore extends ServerCommand implements IntelligentCommand {
73 73
         }
74 74
     }
75 75
 
76
-    protected void executeView(final InputWindow origin, final Server server,
76
+    protected void executeView(final FrameContainer origin, final Server server,
77 77
             final boolean isSilent, final CommandArguments args, final boolean forceRegex) {
78 78
         final IgnoreList ignoreList = server.getIgnoreList();
79 79
 
@@ -100,7 +100,7 @@ public final class Ignore extends ServerCommand implements IntelligentCommand {
100 100
         }
101 101
     }
102 102
 
103
-    protected void executeAdd(final InputWindow origin, final Server server,
103
+    protected void executeAdd(final FrameContainer origin, final Server server,
104 104
             final boolean isSilent, final CommandArguments args) {
105 105
         final IgnoreList ignoreList = server.getIgnoreList();
106 106
         final String target = args.getArgumentsAsString();
@@ -110,7 +110,7 @@ public final class Ignore extends ServerCommand implements IntelligentCommand {
110 110
         sendLine(origin, isSilent, FORMAT_OUTPUT, "Added " + target + " to the ignore list.");
111 111
     }
112 112
 
113
-    protected void executeRegex(final InputWindow origin, final Server server,
113
+    protected void executeRegex(final FrameContainer origin, final Server server,
114 114
             final boolean isSilent, final CommandArguments args) {
115 115
         if (args.getArguments().length == 1) {
116 116
             executeView(origin, server, isSilent, args, true);
@@ -133,7 +133,7 @@ public final class Ignore extends ServerCommand implements IntelligentCommand {
133 133
         sendLine(origin, isSilent, FORMAT_OUTPUT, "Added " + target + " to the ignore list.");
134 134
     }
135 135
 
136
-    protected void executeRemove(final InputWindow origin, final Server server,
136
+    protected void executeRemove(final FrameContainer origin, final Server server,
137 137
             final boolean isSilent, final CommandArguments args) {
138 138
         if (args.getArguments().length == 1) {
139 139
             showUsage(origin, isSilent, "ignore", "--remove <host>");

+ 2
- 2
src/com/dmdirc/commandparser/commands/server/JoinChannelCommand.java Wyświetl plik

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25 25
 import com.dmdirc.Channel;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.actions.ActionManager;
28 29
 import com.dmdirc.actions.CoreActionType;
@@ -34,7 +35,6 @@ import com.dmdirc.commandparser.commands.ServerCommand;
34 35
 import com.dmdirc.interfaces.ActionListener;
35 36
 import com.dmdirc.parser.common.ChannelJoinRequest;
36 37
 import com.dmdirc.ui.input.AdditionalTabTargets;
37
-import com.dmdirc.ui.interfaces.InputWindow;
38 38
 
39 39
 import java.util.ArrayList;
40 40
 import java.util.List;
@@ -61,7 +61,7 @@ public final class JoinChannelCommand extends ServerCommand implements
61 61
     
62 62
     /** {@inheritDoc} */
63 63
     @Override
64
-    public void execute(final InputWindow origin, final Server server,
64
+    public void execute(final FrameContainer origin, final Server server,
65 65
             final boolean isSilent, final CommandArguments args) {
66 66
         if (args.getArguments().length == 0) {
67 67
             showUsage(origin, isSilent, "join", "join <channel [key]>[,channel [key]...]");

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Message.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
@@ -52,7 +53,7 @@ public final class Message extends ServerCommand implements IntelligentCommand,
52 53
     
53 54
     /** {@inheritDoc} */
54 55
     @Override
55
-    public void execute(final InputWindow origin, final Server server,
56
+    public void execute(final FrameContainer origin, final Server server,
56 57
             final boolean isSilent, final CommandArguments args) {
57 58
         if (args.getArguments().length < 2) {
58 59
             showUsage(origin, isSilent, "msg", "<target> <message>");

+ 2
- 2
src/com/dmdirc/commandparser/commands/server/Nick.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
@@ -30,7 +31,6 @@ import com.dmdirc.commandparser.commands.IntelligentCommand;
30 31
 import com.dmdirc.commandparser.commands.ServerCommand;
31 32
 import com.dmdirc.ui.input.AdditionalTabTargets;
32 33
 import com.dmdirc.ui.input.TabCompletionType;
33
-import com.dmdirc.ui.interfaces.InputWindow;
34 34
 
35 35
 /**
36 36
  * Allows the user to change nickname.
@@ -50,7 +50,7 @@ public final class Nick extends ServerCommand implements IntelligentCommand {
50 50
     
51 51
     /** {@inheritDoc} */
52 52
     @Override
53
-    public void execute(final InputWindow origin, final Server server,
53
+    public void execute(final FrameContainer origin, final Server server,
54 54
             final boolean isSilent, final CommandArguments args) {
55 55
         if (args.getArguments().length == 0) {
56 56
             showUsage(origin, isSilent, "nick", "<new nickname>");

+ 2
- 2
src/com/dmdirc/commandparser/commands/server/Notice.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
@@ -30,7 +31,6 @@ import com.dmdirc.commandparser.commands.IntelligentCommand;
30 31
 import com.dmdirc.commandparser.commands.ServerCommand;
31 32
 import com.dmdirc.ui.input.AdditionalTabTargets;
32 33
 import com.dmdirc.ui.input.TabCompletionType;
33
-import com.dmdirc.ui.interfaces.InputWindow;
34 34
 
35 35
 /**
36 36
  * Allows the user to send notices.
@@ -50,7 +50,7 @@ public final class Notice extends ServerCommand implements IntelligentCommand {
50 50
     
51 51
     /** {@inheritDoc} */
52 52
     @Override
53
-    public void execute(final InputWindow origin, final Server server,
53
+    public void execute(final FrameContainer origin, final Server server,
54 54
             final boolean isSilent, final CommandArguments args) {
55 55
         if (args.getArguments().length < 2) {
56 56
             showUsage(origin, isSilent, "notice", "<target> <message>");

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/OpenQuery.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
@@ -51,7 +52,7 @@ public final class OpenQuery extends ServerCommand implements
51 52
     
52 53
     /** {@inheritDoc} */
53 54
     @Override
54
-    public void execute(final InputWindow origin, final Server server,
55
+    public void execute(final FrameContainer origin, final Server server,
55 56
             final boolean isSilent, final CommandArguments args) {
56 57
         if (args.getArguments().length == 0) {
57 58
             showUsage(origin, isSilent, "query", "<target> <message>");

+ 2
- 2
src/com/dmdirc/commandparser/commands/server/Raw.java Wyświetl plik

@@ -22,12 +22,12 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
28 29
 import com.dmdirc.commandparser.commands.CommandOptions;
29 30
 import com.dmdirc.commandparser.commands.ServerCommand;
30
-import com.dmdirc.ui.interfaces.InputWindow;
31 31
 
32 32
 /**
33 33
  * The raw command allows the user to send a raw line of text directly to the
@@ -48,7 +48,7 @@ public final class Raw extends ServerCommand {
48 48
     
49 49
     /** {@inheritDoc} */
50 50
     @Override
51
-    public void execute(final InputWindow origin, final Server server,
51
+    public void execute(final FrameContainer origin, final Server server,
52 52
             final boolean isSilent, final CommandArguments args) {
53 53
         final String line = args.getArgumentsAsString();
54 54
         

+ 2
- 2
src/com/dmdirc/commandparser/commands/server/RawServerCommand.java Wyświetl plik

@@ -22,12 +22,12 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
28 29
 import com.dmdirc.commandparser.commands.CommandOptions;
29 30
 import com.dmdirc.commandparser.commands.ServerCommand;
30
-import com.dmdirc.ui.interfaces.InputWindow;
31 31
 
32 32
 /**
33 33
  * Implements a raw server command (i.e., a command that is sent to the server
@@ -56,7 +56,7 @@ public final class RawServerCommand extends ServerCommand {
56 56
     
57 57
     /** {@inheritDoc} */
58 58
     @Override
59
-    public void execute(final InputWindow origin, final Server server,
59
+    public void execute(final FrameContainer origin, final Server server,
60 60
             final boolean isSilent, final CommandArguments args) {
61 61
         server.getParser().sendRawMessage(myName.toUpperCase() + " " + args.getArgumentsAsString());
62 62
     }

+ 2
- 2
src/com/dmdirc/commandparser/commands/server/Reconnect.java Wyświetl plik

@@ -22,11 +22,11 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
28 29
 import com.dmdirc.commandparser.commands.ServerCommand;
29
-import com.dmdirc.ui.interfaces.InputWindow;
30 30
 
31 31
 /**
32 32
  * The reconnect command reconnects to the current server.
@@ -45,7 +45,7 @@ public final class Reconnect extends ServerCommand {
45 45
     
46 46
     /** {@inheritDoc} */
47 47
     @Override
48
-    public void execute(final InputWindow origin, final Server server,
48
+    public void execute(final FrameContainer origin, final Server server,
49 49
             final boolean isSilent, final CommandArguments args) {
50 50
         String line;
51 51
         

+ 2
- 2
src/com/dmdirc/commandparser/commands/server/Umode.java Wyświetl plik

@@ -22,13 +22,13 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.server;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.ServerState;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.commandparser.CommandManager;
29 30
 import com.dmdirc.commandparser.commands.CommandOptions;
30 31
 import com.dmdirc.commandparser.commands.ServerCommand;
31
-import com.dmdirc.ui.interfaces.InputWindow;
32 32
 
33 33
 /**
34 34
  * Allows the user to change user modes.
@@ -49,7 +49,7 @@ public class Umode extends ServerCommand {
49 49
 
50 50
     /** {@inheritDoc} */
51 51
     @Override
52
-    public void execute(final InputWindow origin, final Server server, 
52
+    public void execute(final FrameContainer origin, final Server server, 
53 53
             final boolean isSilent, final CommandArguments args) {
54 54
         if (server.getState() != ServerState.CONNECTED) {
55 55
             sendLine(origin, isSilent, FORMAT_ERROR, "Not connected");

+ 3
- 3
src/com/dmdirc/commandparser/parsers/ChannelCommandParser.java Wyświetl plik

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.commandparser.parsers;
24 24
 
25 25
 import com.dmdirc.Channel;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.commandparser.CommandManager;
@@ -32,7 +33,6 @@ import com.dmdirc.commandparser.commands.ChatCommand;
32 33
 import com.dmdirc.commandparser.commands.Command;
33 34
 import com.dmdirc.commandparser.commands.GlobalCommand;
34 35
 import com.dmdirc.commandparser.commands.ServerCommand;
35
-import com.dmdirc.ui.interfaces.InputWindow;
36 36
 
37 37
 /**
38 38
  * A command parser that is tailored for use in a channel environment. Handles
@@ -78,7 +78,7 @@ public final class ChannelCommandParser extends CommandParser {
78 78
     
79 79
     /** {@inheritDoc} */
80 80
     @Override
81
-    protected void executeCommand(final InputWindow origin,
81
+    protected void executeCommand(final FrameContainer origin,
82 82
             final boolean isSilent, final Command command, final CommandArguments args) {
83 83
         if (command instanceof ChannelCommand) {
84 84
             ((ChannelCommand) command).execute(origin, server, channel, isSilent, args);
@@ -99,7 +99,7 @@ public final class ChannelCommandParser extends CommandParser {
99 99
      * @param line The line input by the user
100 100
      */
101 101
     @Override
102
-    protected void handleNonCommand(final InputWindow origin, final String line) {
102
+    protected void handleNonCommand(final FrameContainer origin, final String line) {
103 103
         channel.sendLine(line);
104 104
     }
105 105
     

+ 11
- 12
src/com/dmdirc/commandparser/parsers/CommandParser.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.parsers;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.actions.ActionManager;
27 28
 import com.dmdirc.actions.CoreActionType;
@@ -34,7 +35,6 @@ import com.dmdirc.commandparser.commands.CommandOptions;
34 35
 import com.dmdirc.commandparser.commands.ExternalCommand;
35 36
 import com.dmdirc.commandparser.commands.PreviousCommand;
36 37
 import com.dmdirc.config.IdentityManager;
37
-import com.dmdirc.ui.interfaces.InputWindow;
38 38
 import com.dmdirc.util.RollingList;
39 39
 
40 40
 import java.io.Serializable;
@@ -119,7 +119,7 @@ public abstract class CommandParser implements Serializable {
119 119
      * @param parseChannel Whether or not to try and parse the first argument
120 120
      * as a channel name
121 121
      */
122
-    public final void parseCommand(final InputWindow origin,
122
+    public final void parseCommand(final FrameContainer origin,
123 123
             final String line, final boolean parseChannel) {
124 124
         final CommandArguments args = new CommandArguments(line);
125 125
 
@@ -153,20 +153,19 @@ public abstract class CommandParser implements Serializable {
153 153
      * @param parseChannel Whether or not to try parsing channel names
154 154
      * @return True iff the command was handled, false otherwise
155 155
      */
156
-    protected boolean handleChannelCommand(final InputWindow origin,
156
+    protected boolean handleChannelCommand(final FrameContainer origin,
157 157
             final CommandArguments args, final boolean parseChannel) {
158 158
         final boolean silent = args.isSilent();
159 159
         final String command = args.getCommandName();
160 160
         final String[] cargs = args.getArguments();
161 161
 
162 162
         if (cargs.length == 0 || !parseChannel || origin == null
163
-                || origin.getContainer() == null
164
-                || origin.getContainer().getServer() == null
163
+                || origin.getServer() == null
165 164
                 || !CommandManager.isChannelCommand(command)) {
166 165
             return false;
167 166
         }
168 167
 
169
-        final Server server = origin.getContainer().getServer();
168
+        final Server server = origin.getServer();
170 169
         final String[] parts = cargs[0].split(",");
171 170
         boolean someValid = false;
172 171
         for (String part : parts) {
@@ -243,7 +242,7 @@ public abstract class CommandParser implements Serializable {
243 242
      * @param origin The window in which the command was typed
244 243
      * @param line The line to be parsed
245 244
      */
246
-    public final void parseCommand(final InputWindow origin,
245
+    public final void parseCommand(final FrameContainer origin,
247 246
             final String line) {
248 247
         parseCommand(origin, line, true);
249 248
     }
@@ -254,7 +253,7 @@ public abstract class CommandParser implements Serializable {
254 253
      * @param origin The window in which the command was typed
255 254
      * @param line The line to be parsed
256 255
      */
257
-    public final void parseCommandCtrl(final InputWindow origin, final String line) {
256
+    public final void parseCommandCtrl(final FrameContainer origin, final String line) {
258 257
         handleNonCommand(origin, line);
259 258
     }
260 259
 
@@ -267,7 +266,7 @@ public abstract class CommandParser implements Serializable {
267 266
      * @param args The arguments to the command
268 267
      * @since 0.6.3m1
269 268
      */
270
-    protected abstract void executeCommand(final InputWindow origin,
269
+    protected abstract void executeCommand(final FrameContainer origin,
271 270
             final boolean isSilent, final Command command, final CommandArguments args);
272 271
 
273 272
     /**
@@ -279,7 +278,7 @@ public abstract class CommandParser implements Serializable {
279 278
      * @param args The arguments passed to the command
280 279
      * @since 0.6.3m1
281 280
      */
282
-    protected void handleInvalidCommand(final InputWindow origin,
281
+    protected void handleInvalidCommand(final FrameContainer origin,
283 282
             final CommandArguments args) {
284 283
         if (origin == null) {
285 284
             ActionManager.processEvent(CoreActionType.UNKNOWN_COMMAND, null,
@@ -288,7 +287,7 @@ public abstract class CommandParser implements Serializable {
288 287
             final StringBuffer buff = new StringBuffer("unknownCommand");
289 288
 
290 289
             ActionManager.processEvent(CoreActionType.UNKNOWN_COMMAND, buff,
291
-                    origin.getContainer(), args.getCommandName(), args.getArguments());
290
+                    origin, args.getCommandName(), args.getArguments());
292 291
 
293 292
             origin.addLine(buff, args.getCommandName());
294 293
         }
@@ -301,7 +300,7 @@ public abstract class CommandParser implements Serializable {
301 300
      * @param origin The window in which the command was typed
302 301
      * @param line The line input by the user
303 302
      */
304
-    protected abstract void handleNonCommand(final InputWindow origin,
303
+    protected abstract void handleNonCommand(final FrameContainer origin,
305 304
             final String line);
306 305
 
307 306
     /**

+ 3
- 3
src/com/dmdirc/commandparser/parsers/GlobalCommandParser.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.parsers;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.CommandType;
@@ -29,7 +30,6 @@ import com.dmdirc.commandparser.commands.Command;
29 30
 import com.dmdirc.commandparser.commands.GlobalCommand;
30 31
 import com.dmdirc.logger.ErrorLevel;
31 32
 import com.dmdirc.logger.Logger;
32
-import com.dmdirc.ui.interfaces.InputWindow;
33 33
 
34 34
 /**
35 35
  * The command parser used for global commands.
@@ -76,7 +76,7 @@ public final class GlobalCommandParser extends CommandParser {
76 76
     
77 77
     /** {@inheritDoc} */
78 78
     @Override
79
-    protected void executeCommand(final InputWindow origin,
79
+    protected void executeCommand(final FrameContainer origin,
80 80
             final boolean isSilent, final Command command, final CommandArguments args) {
81 81
         ((GlobalCommand) command).execute(origin, isSilent, args);
82 82
     }
@@ -88,7 +88,7 @@ public final class GlobalCommandParser extends CommandParser {
88 88
      * @param line The line input by the user
89 89
      */
90 90
     @Override
91
-    protected void handleNonCommand(final InputWindow origin, final String line) {
91
+    protected void handleNonCommand(final FrameContainer origin, final String line) {
92 92
         if (origin == null) {
93 93
             Logger.userError(ErrorLevel.MEDIUM, "Invalid global command: " + line);
94 94
         } else {

+ 3
- 3
src/com/dmdirc/commandparser/parsers/QueryCommandParser.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.parsers;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Query;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
@@ -32,7 +33,6 @@ import com.dmdirc.commandparser.commands.Command;
32 33
 import com.dmdirc.commandparser.commands.GlobalCommand;
33 34
 import com.dmdirc.commandparser.commands.QueryCommand;
34 35
 import com.dmdirc.commandparser.commands.ServerCommand;
35
-import com.dmdirc.ui.interfaces.InputWindow;
36 36
 
37 37
 /**
38 38
  * A command parser that is tailored for use in a query environment. Handles
@@ -78,7 +78,7 @@ public final class QueryCommandParser extends CommandParser {
78 78
     
79 79
     /** {@inheritDoc} */
80 80
     @Override
81
-    protected void executeCommand(final InputWindow origin,
81
+    protected void executeCommand(final FrameContainer origin,
82 82
             final boolean isSilent, final Command command, final CommandArguments args) {
83 83
         if (command instanceof QueryCommand) {
84 84
             ((QueryCommand) command).execute(origin, server, query, isSilent, args);
@@ -98,7 +98,7 @@ public final class QueryCommandParser extends CommandParser {
98 98
      * @param line The line input by the user
99 99
      */
100 100
     @Override
101
-    protected void handleNonCommand(final InputWindow origin, final String line) {
101
+    protected void handleNonCommand(final FrameContainer origin, final String line) {
102 102
         query.sendLine(line);
103 103
     }
104 104
     

+ 2
- 1
src/com/dmdirc/commandparser/parsers/RawCommandParser.java Wyświetl plik

@@ -23,6 +23,7 @@
23 23
 
24 24
 package com.dmdirc.commandparser.parsers;
25 25
 
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.ui.interfaces.InputWindow;
28 29
 
@@ -53,7 +54,7 @@ public class RawCommandParser extends ServerCommandParser {
53 54
 
54 55
     /** {@inheritDoc} */
55 56
     @Override
56
-    protected void handleNonCommand(final InputWindow origin, final String line) {
57
+    protected void handleNonCommand(final FrameContainer origin, final String line) {
57 58
         server.getParser().sendRawMessage(line);
58 59
     }
59 60
 

+ 3
- 3
src/com/dmdirc/commandparser/parsers/ServerCommandParser.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.parsers;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.ServerState;
27 28
 import com.dmdirc.commandparser.CommandArguments;
@@ -30,7 +31,6 @@ import com.dmdirc.commandparser.CommandType;
30 31
 import com.dmdirc.commandparser.commands.Command;
31 32
 import com.dmdirc.commandparser.commands.GlobalCommand;
32 33
 import com.dmdirc.commandparser.commands.ServerCommand;
33
-import com.dmdirc.ui.interfaces.InputWindow;
34 34
 
35 35
 /**
36 36
  * A command parser used in the context of a server.
@@ -68,7 +68,7 @@ public class ServerCommandParser extends CommandParser {
68 68
     
69 69
     /** {@inheritDoc} */
70 70
     @Override
71
-    protected void executeCommand(final InputWindow origin,
71
+    protected void executeCommand(final FrameContainer origin,
72 72
             final boolean isSilent, final Command command, final CommandArguments args) {
73 73
         if (command instanceof ServerCommand) {
74 74
             if (hasCommandOptions(command) && !getCommandOptions(command).allowOffline()
@@ -93,7 +93,7 @@ public class ServerCommandParser extends CommandParser {
93 93
      * @param line The line input by the user
94 94
      */
95 95
     @Override
96
-    protected void handleNonCommand(final InputWindow origin, final String line) {
96
+    protected void handleNonCommand(final FrameContainer origin, final String line) {
97 97
         server.sendLine(line);
98 98
     }
99 99
     

+ 2
- 2
src/com/dmdirc/ui/input/InputHandler.java Wyświetl plik

@@ -331,7 +331,7 @@ public abstract class InputHandler implements ConfigChangeListener {
331 331
 
332 332
             case KeyEvent.VK_ENTER:
333 333
                 if ((flags & HANDLE_RETURN) != 0 && !line.isEmpty()) {
334
-                    commandParser.parseCommandCtrl(parentWindow, line);
334
+                    commandParser.parseCommandCtrl(parentWindow.getContainer(), line);
335 335
                     addToBuffer(line);
336 336
                 }
337 337
                 break;
@@ -498,7 +498,7 @@ public abstract class InputHandler implements ConfigChangeListener {
498 498
 
499 499
             addToBuffer(thisBuffer.toString());
500 500
 
501
-            commandParser.parseCommand(parentWindow, thisBuffer.toString());
501
+            commandParser.parseCommand(parentWindow.getContainer(), thisBuffer.toString());
502 502
         }
503 503
         fireLineWrap(0);
504 504
         fireCommandPassed();

+ 2
- 2
test/com/dmdirc/commandparser/commands/channel/BanTest.java Wyświetl plik

@@ -22,9 +22,9 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.config.IdentityManager;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27
-import com.dmdirc.ui.interfaces.InputWindow;
28 28
 
29 29
 import org.junit.BeforeClass;
30 30
 import org.junit.Test;
@@ -41,7 +41,7 @@ public class BanTest {
41 41
 
42 42
     @Test
43 43
     public void testUsage() {
44
-        final InputWindow tiw = mock(InputWindow.class);
44
+        final FrameContainer tiw = mock(FrameContainer.class);
45 45
         command.execute(tiw, null, null, false, new CommandArguments("/ban"));
46 46
         
47 47
         verify(tiw).addLine(eq("commandUsage"), anyChar(), anyString(), anyString());

+ 5
- 5
test/com/dmdirc/commandparser/commands/channel/KickReasonTest.java Wyświetl plik

@@ -23,12 +23,12 @@
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25 25
 import com.dmdirc.Channel;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.config.IdentityManager;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.config.ConfigManager;
29 30
 import com.dmdirc.parser.irc.IRCChannelClientInfo;
30 31
 import com.dmdirc.parser.irc.IRCChannelInfo;
31
-import com.dmdirc.ui.interfaces.InputWindow;
32 32
 
33 33
 import org.junit.BeforeClass;
34 34
 import org.junit.Test;
@@ -45,7 +45,7 @@ public class KickReasonTest {
45 45
 
46 46
     @Test
47 47
     public void testUsage() {
48
-        final InputWindow tiw = mock(InputWindow.class);
48
+        final FrameContainer tiw = mock(FrameContainer.class);
49 49
         command.execute(tiw, null, null, false, new CommandArguments("/kick"));
50 50
         
51 51
         verify(tiw).addLine(eq("commandUsage"), anyChar(), anyString(), anyString());
@@ -53,7 +53,7 @@ public class KickReasonTest {
53 53
 
54 54
     @Test
55 55
     public void testUnknown() {
56
-        final InputWindow tiw = mock(InputWindow.class);
56
+        final FrameContainer tiw = mock(FrameContainer.class);
57 57
         final IRCChannelInfo channelInfo = mock(IRCChannelInfo.class);
58 58
         final Channel channel = mock(Channel.class);
59 59
 
@@ -67,7 +67,7 @@ public class KickReasonTest {
67 67
 
68 68
     @Test
69 69
     public void testWithReason() {
70
-        final InputWindow tiw = mock(InputWindow.class);
70
+        final FrameContainer tiw = mock(FrameContainer.class);
71 71
         final IRCChannelInfo channelInfo = mock(IRCChannelInfo.class);
72 72
         final Channel channel = mock(Channel.class);
73 73
         final IRCChannelClientInfo cci = mock(IRCChannelClientInfo.class);
@@ -82,7 +82,7 @@ public class KickReasonTest {
82 82
 
83 83
     @Test
84 84
     public void testWithoutReason() {
85
-        final InputWindow tiw = mock(InputWindow.class);
85
+        final FrameContainer tiw = mock(FrameContainer.class);
86 86
         final ConfigManager manager = mock(ConfigManager.class);
87 87
         final IRCChannelInfo channelInfo = mock(IRCChannelInfo.class);
88 88
         final Channel channel = mock(Channel.class);

+ 5
- 5
test/com/dmdirc/commandparser/commands/channel/ModeTest.java Wyświetl plik

@@ -23,13 +23,13 @@
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25 25
 import com.dmdirc.Channel;
26
+import com.dmdirc.FrameContainer;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
28 29
 import com.dmdirc.config.IdentityManager;
29 30
 import com.dmdirc.config.InvalidIdentityFileException;
30 31
 import com.dmdirc.parser.irc.IRCChannelInfo;
31 32
 import com.dmdirc.parser.irc.IRCParser;
32
-import com.dmdirc.ui.interfaces.InputWindow;
33 33
 
34 34
 import org.junit.Before;
35 35
 import org.junit.BeforeClass;
@@ -66,7 +66,7 @@ public class ModeTest {
66 66
 
67 67
     @Test
68 68
     public void testWithoutArgs() {
69
-        final InputWindow origin = mock(InputWindow.class);
69
+        final FrameContainer origin = mock(FrameContainer.class);
70 70
         
71 71
         command.execute(origin, server, channel, false, new CommandArguments("/mode"));
72 72
 
@@ -75,7 +75,7 @@ public class ModeTest {
75 75
 
76 76
     @Test
77 77
     public void testWithArgs() {
78
-        final InputWindow origin = mock(InputWindow.class);
78
+        final FrameContainer origin = mock(FrameContainer.class);
79 79
 
80 80
         command.execute(origin, server, channel, false, new CommandArguments("/mode +hello -bye"));
81 81
 
@@ -84,7 +84,7 @@ public class ModeTest {
84 84
 
85 85
     @Test
86 86
     public void testExternalWithArgs() {
87
-        final InputWindow origin = mock(InputWindow.class);
87
+        final FrameContainer origin = mock(FrameContainer.class);
88 88
 
89 89
         command.execute(origin, server, "#chan", false,
90 90
                 new CommandArguments("/mode +hello -bye"));
@@ -94,7 +94,7 @@ public class ModeTest {
94 94
 
95 95
     @Test
96 96
     public void testExternalWithoutArgs() {
97
-        final InputWindow origin = mock(InputWindow.class);
97
+        final FrameContainer origin = mock(FrameContainer.class);
98 98
 
99 99
         command.execute(origin, server, "#chan", false,
100 100
                 new CommandArguments("/mode"));

+ 3
- 6
test/com/dmdirc/commandparser/commands/channel/PartTest.java Wyświetl plik

@@ -23,14 +23,11 @@
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25 25
 import com.dmdirc.Channel;
26
-import com.dmdirc.Server;
26
+import com.dmdirc.FrameContainer;
27 27
 import com.dmdirc.commandparser.CommandArguments;
28 28
 import com.dmdirc.config.ConfigManager;
29 29
 import com.dmdirc.config.IdentityManager;
30 30
 import com.dmdirc.config.InvalidIdentityFileException;
31
-import com.dmdirc.parser.irc.IRCChannelInfo;
32
-import com.dmdirc.parser.irc.IRCParser;
33
-import com.dmdirc.ui.interfaces.InputWindow;
34 31
 
35 32
 import org.junit.Before;
36 33
 import org.junit.BeforeClass;
@@ -41,7 +38,7 @@ public class PartTest {
41 38
 
42 39
     private final Part command = new Part();
43 40
     private Channel channel;
44
-    private InputWindow origin;
41
+    private FrameContainer origin;
45 42
     private ConfigManager manager;
46 43
 
47 44
     @BeforeClass
@@ -54,7 +51,7 @@ public class PartTest {
54 51
         IdentityManager.load();
55 52
         
56 53
         channel = mock(Channel.class);
57
-        origin = mock(InputWindow.class);
54
+        origin = mock(FrameContainer.class);
58 55
         manager = mock(ConfigManager.class);
59 56
         
60 57
         when(origin.getConfigManager()).thenReturn(manager);

+ 4
- 4
test/com/dmdirc/commandparser/commands/channel/SetNickColourTest.java Wyświetl plik

@@ -21,9 +21,9 @@
21 21
  */
22 22
 package com.dmdirc.commandparser.commands.channel;
23 23
 
24
+import com.dmdirc.FrameContainer;
24 25
 import com.dmdirc.commandparser.CommandArguments;
25 26
 import com.dmdirc.config.IdentityManager;
26
-import com.dmdirc.ui.interfaces.InputWindow;
27 27
 
28 28
 import org.junit.BeforeClass;
29 29
 import org.junit.Test;
@@ -40,7 +40,7 @@ public class SetNickColourTest {
40 40
 
41 41
     @Test
42 42
     public void testUsageNoArgs() {
43
-        final InputWindow tiw = mock(InputWindow.class);
43
+        final FrameContainer tiw = mock(FrameContainer.class);
44 44
         command.execute(tiw, null, null, false, new CommandArguments("/foo"));
45 45
         
46 46
         verify(tiw).addLine(eq("commandUsage"), anyChar(), anyString(), anyString());
@@ -48,7 +48,7 @@ public class SetNickColourTest {
48 48
     
49 49
     @Test
50 50
     public void testUsageNicklist() {
51
-        final InputWindow tiw = mock(InputWindow.class);
51
+        final FrameContainer tiw = mock(FrameContainer.class);
52 52
         command.execute(tiw, null, null, false, new CommandArguments("/foo --nicklist"));
53 53
         
54 54
         verify(tiw).addLine(eq("commandUsage"), anyChar(), anyString(), anyString());
@@ -56,7 +56,7 @@ public class SetNickColourTest {
56 56
     
57 57
     @Test
58 58
     public void testUsageText() {
59
-        final InputWindow tiw = mock(InputWindow.class);
59
+        final FrameContainer tiw = mock(FrameContainer.class);
60 60
         command.execute(tiw, null, null, false, new CommandArguments("/foo --text"));
61 61
         
62 62
         verify(tiw).addLine(eq("commandUsage"), anyChar(), anyString(), anyString());

+ 2
- 2
test/com/dmdirc/commandparser/commands/chat/MeTest.java Wyświetl plik

@@ -21,10 +21,10 @@
21 21
  */
22 22
 package com.dmdirc.commandparser.commands.chat;
23 23
 
24
+import com.dmdirc.FrameContainer;
24 25
 import com.dmdirc.MessageTarget;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.config.IdentityManager;
27
-import com.dmdirc.ui.interfaces.InputWindow;
28 28
 
29 29
 import org.junit.BeforeClass;
30 30
 import org.junit.Test;
@@ -41,7 +41,7 @@ public class MeTest {
41 41
 
42 42
     @Test
43 43
     public void testUsage() {
44
-        final InputWindow tiw = mock(InputWindow.class);
44
+        final FrameContainer tiw = mock(FrameContainer.class);
45 45
         command.execute(tiw, null, null, false, new CommandArguments("/foo"));
46 46
         
47 47
         verify(tiw).addLine(eq("commandUsage"), anyChar(), anyString(), anyString());

+ 3
- 3
test/com/dmdirc/commandparser/commands/global/AliasCommandTest.java Wyświetl plik

@@ -21,9 +21,9 @@
21 21
  */
22 22
 package com.dmdirc.commandparser.commands.global;
23 23
 
24
+import com.dmdirc.FrameContainer;
24 25
 import com.dmdirc.commandparser.CommandArguments;
25 26
 import com.dmdirc.config.IdentityManager;
26
-import com.dmdirc.ui.interfaces.InputWindow;
27 27
 
28 28
 import org.junit.BeforeClass;
29 29
 import org.junit.Test;
@@ -40,7 +40,7 @@ public class AliasCommandTest {
40 40
 
41 41
     @Test
42 42
     public void testUsageNoArgs() {
43
-        final InputWindow tiw = mock(InputWindow.class);
43
+        final FrameContainer tiw = mock(FrameContainer.class);
44 44
 
45 45
         command.execute(tiw, false, new CommandArguments("/foo"));
46 46
         
@@ -49,7 +49,7 @@ public class AliasCommandTest {
49 49
     
50 50
     @Test
51 51
     public void testUsageOneArg() {
52
-        final InputWindow tiw = mock(InputWindow.class);
52
+        final FrameContainer tiw = mock(FrameContainer.class);
53 53
         
54 54
         command.execute(tiw, false, new CommandArguments("/foo --remove"));
55 55
         

+ 3
- 3
test/com/dmdirc/commandparser/commands/global/DebugTest.java Wyświetl plik

@@ -21,9 +21,9 @@
21 21
  */
22 22
 package com.dmdirc.commandparser.commands.global;
23 23
 
24
+import com.dmdirc.FrameContainer;
24 25
 import com.dmdirc.commandparser.CommandArguments;
25 26
 import com.dmdirc.config.IdentityManager;
26
-import com.dmdirc.ui.interfaces.InputWindow;
27 27
 import org.junit.BeforeClass;
28 28
 import org.junit.Test;
29 29
 import static org.mockito.Mockito.*;
@@ -39,7 +39,7 @@ public class DebugTest {
39 39
 
40 40
     @Test
41 41
     public void testUsage() {
42
-        final InputWindow tiw = mock(InputWindow.class);
42
+        final FrameContainer tiw = mock(FrameContainer.class);
43 43
 
44 44
         command.execute(tiw, false, new CommandArguments("/foo"));
45 45
         
@@ -48,7 +48,7 @@ public class DebugTest {
48 48
     
49 49
     @Test
50 50
     public void testInvalidArg() {
51
-        final InputWindow tiw = mock(InputWindow.class);
51
+        final FrameContainer tiw = mock(FrameContainer.class);
52 52
 
53 53
         command.execute(tiw, false, new CommandArguments("/foo flubadee"));
54 54
         

+ 3
- 3
test/com/dmdirc/commandparser/commands/global/IfpluginTest.java Wyświetl plik

@@ -21,9 +21,9 @@
21 21
  */
22 22
 package com.dmdirc.commandparser.commands.global;
23 23
 
24
+import com.dmdirc.FrameContainer;
24 25
 import com.dmdirc.commandparser.CommandArguments;
25 26
 import com.dmdirc.config.IdentityManager;
26
-import com.dmdirc.ui.interfaces.InputWindow;
27 27
 
28 28
 import org.junit.BeforeClass;
29 29
 import org.junit.Test;
@@ -40,7 +40,7 @@ public class IfpluginTest {
40 40
 
41 41
     @Test
42 42
     public void testUsageNoArgs() {
43
-        final InputWindow tiw = mock(InputWindow.class);
43
+        final FrameContainer tiw = mock(FrameContainer.class);
44 44
         command.execute(tiw, false, new CommandArguments("/foo"));
45 45
         
46 46
         verify(tiw).addLine(eq("commandUsage"), anyChar(), anyString(), anyString());
@@ -48,7 +48,7 @@ public class IfpluginTest {
48 48
     
49 49
     @Test
50 50
     public void testUsageOneArg() {
51
-        final InputWindow tiw = mock(InputWindow.class);
51
+        final FrameContainer tiw = mock(FrameContainer.class);
52 52
         command.execute(tiw, false, new CommandArguments("/foo bar"));
53 53
         
54 54
         verify(tiw).addLine(eq("commandUsage"), anyChar(), anyString(), anyString());

+ 5
- 5
test/com/dmdirc/commandparser/commands/global/NewServerTest.java Wyświetl plik

@@ -21,9 +21,9 @@
21 21
  */
22 22
 package com.dmdirc.commandparser.commands.global;
23 23
 
24
+import com.dmdirc.FrameContainer;
24 25
 import com.dmdirc.commandparser.CommandArguments;
25 26
 import com.dmdirc.config.IdentityManager;
26
-import com.dmdirc.ui.interfaces.InputWindow;
27 27
 
28 28
 import org.junit.BeforeClass;
29 29
 import org.junit.Test;
@@ -40,7 +40,7 @@ public class NewServerTest {
40 40
 
41 41
     @Test
42 42
     public void testUsageNoArgs() {
43
-        final InputWindow tiw = mock(InputWindow.class);
43
+        final FrameContainer tiw = mock(FrameContainer.class);
44 44
         command.execute(tiw, false, new CommandArguments("/foo"));
45 45
         
46 46
         verify(tiw).addLine(eq("commandUsage"), anyChar(), anyString(), anyString());
@@ -48,7 +48,7 @@ public class NewServerTest {
48 48
     
49 49
     @Test
50 50
     public void testInvalidPort() {
51
-        final InputWindow tiw = mock(InputWindow.class);
51
+        final FrameContainer tiw = mock(FrameContainer.class);
52 52
         command.execute(tiw, false, new CommandArguments("/foo foo:abc"));
53 53
         
54 54
         verify(tiw).addLine(eq("commandError"), anyString());
@@ -56,7 +56,7 @@ public class NewServerTest {
56 56
     
57 57
     @Test
58 58
     public void testOutOfRangePort1() {
59
-        final InputWindow tiw = mock(InputWindow.class);
59
+        final FrameContainer tiw = mock(FrameContainer.class);
60 60
         command.execute(tiw, false, new CommandArguments("/foo foo:0"));
61 61
         
62 62
         verify(tiw).addLine(eq("commandError"), anyString());
@@ -64,7 +64,7 @@ public class NewServerTest {
64 64
     
65 65
     @Test
66 66
     public void testOutOfRangePort2() {
67
-        final InputWindow tiw = mock(InputWindow.class);
67
+        final FrameContainer tiw = mock(FrameContainer.class);
68 68
         command.execute(tiw, false, new CommandArguments("/foo foo:65537"));
69 69
         
70 70
         verify(tiw).addLine(eq("commandError"), anyString());

+ 9
- 9
test/com/dmdirc/commandparser/commands/server/ChangeServerTest.java Wyświetl plik

@@ -21,11 +21,11 @@
21 21
  */
22 22
 package com.dmdirc.commandparser.commands.server;
23 23
 
24
+import com.dmdirc.FrameContainer;
24 25
 import com.dmdirc.Server;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.config.Identity;
27 28
 import com.dmdirc.config.IdentityManager;
28
-import com.dmdirc.ui.interfaces.InputWindow;
29 29
 
30 30
 import java.net.URI;
31 31
 import java.net.URISyntaxException;
@@ -44,7 +44,7 @@ public class ChangeServerTest {
44 44
 
45 45
     @Test
46 46
     public void testUsageNoArgs() {
47
-        final InputWindow tiw = mock(InputWindow.class);
47
+        final FrameContainer tiw = mock(FrameContainer.class);
48 48
         command.execute(tiw, null, false, new CommandArguments("/server"));
49 49
         
50 50
         verify(tiw).addLine(eq("commandUsage"), anyChar(), anyString(), anyString());
@@ -52,7 +52,7 @@ public class ChangeServerTest {
52 52
     
53 53
     @Test
54 54
     public void testInvalidPort() {
55
-        final InputWindow tiw = mock(InputWindow.class);
55
+        final FrameContainer tiw = mock(FrameContainer.class);
56 56
         command.execute(tiw, null, false, new CommandArguments("/server foo:abc"));
57 57
         
58 58
         verify(tiw).addLine(eq("commandError"), anyString());
@@ -60,7 +60,7 @@ public class ChangeServerTest {
60 60
     
61 61
     @Test
62 62
     public void testOutOfRangePort1() {
63
-        final InputWindow tiw = mock(InputWindow.class);
63
+        final FrameContainer tiw = mock(FrameContainer.class);
64 64
         command.execute(tiw, null, false, new CommandArguments("/server foo:0"));
65 65
         
66 66
         verify(tiw).addLine(eq("commandError"), anyString());
@@ -68,7 +68,7 @@ public class ChangeServerTest {
68 68
     
69 69
     @Test
70 70
     public void testOutOfRangePort2() {
71
-        final InputWindow tiw = mock(InputWindow.class);
71
+        final FrameContainer tiw = mock(FrameContainer.class);
72 72
         command.execute(tiw, null, false, new CommandArguments("/server foo:65537"));
73 73
         
74 74
         verify(tiw).addLine(eq("commandError"), anyString());
@@ -76,7 +76,7 @@ public class ChangeServerTest {
76 76
 
77 77
     @Test
78 78
     public void testExecuteBasic() throws URISyntaxException {
79
-        final InputWindow tiw = mock(InputWindow.class);
79
+        final FrameContainer tiw = mock(FrameContainer.class);
80 80
         final Identity profile = mock(Identity.class);
81 81
         final Server server = mock(Server.class);
82 82
         when(server.getProfile()).thenReturn(profile);
@@ -88,7 +88,7 @@ public class ChangeServerTest {
88 88
 
89 89
     @Test
90 90
     public void testExecuteNoPort() throws URISyntaxException {
91
-        final InputWindow tiw = mock(InputWindow.class);
91
+        final FrameContainer tiw = mock(FrameContainer.class);
92 92
         final Identity profile = mock(Identity.class);
93 93
         final Server server = mock(Server.class);
94 94
         when(server.getProfile()).thenReturn(profile);
@@ -100,7 +100,7 @@ public class ChangeServerTest {
100 100
 
101 101
     @Test
102 102
     public void testDeprecatedSSL() throws URISyntaxException {
103
-        final InputWindow tiw = mock(InputWindow.class);
103
+        final FrameContainer tiw = mock(FrameContainer.class);
104 104
         final Identity profile = mock(Identity.class);
105 105
         final Server server = mock(Server.class);
106 106
         when(server.getProfile()).thenReturn(profile);
@@ -112,7 +112,7 @@ public class ChangeServerTest {
112 112
 
113 113
     @Test
114 114
     public void testExecuteComplex() throws URISyntaxException {
115
-        final InputWindow tiw = mock(InputWindow.class);
115
+        final FrameContainer tiw = mock(FrameContainer.class);
116 116
         final Identity profile = mock(Identity.class);
117 117
         final Server server = mock(Server.class);
118 118
         when(server.getProfile()).thenReturn(profile);

+ 4
- 3
test/com/dmdirc/harness/TestCommandParser.java Wyświetl plik

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.harness;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.parsers.*;
27 28
 import com.dmdirc.commandparser.CommandManager;
@@ -48,7 +49,7 @@ public class TestCommandParser extends CommandParser {
48 49
     }
49 50
 
50 51
     @Override
51
-    protected void executeCommand(InputWindow origin, boolean isSilent,
52
+    protected void executeCommand(FrameContainer origin, boolean isSilent,
52 53
                                   Command command, CommandArguments args) {
53 54
         executedCommand = command;
54 55
         wasSilent = isSilent;
@@ -56,12 +57,12 @@ public class TestCommandParser extends CommandParser {
56 57
     }
57 58
 
58 59
     @Override
59
-    protected void handleNonCommand(InputWindow origin, String line) {
60
+    protected void handleNonCommand(FrameContainer origin, String line) {
60 61
         nonCommandLine = line;
61 62
     }
62 63
 
63 64
     @Override
64
-    protected void handleInvalidCommand(InputWindow origin,
65
+    protected void handleInvalidCommand(FrameContainer origin,
65 66
                                         CommandArguments args) {
66 67
         invalidCommand = args.getCommandName();
67 68
     }

Ładowanie…
Anuluj
Zapisz