|
@@ -25,8 +25,7 @@ package com.dmdirc.ui.input;
|
25
|
25
|
import com.dmdirc.DMDircMBassador;
|
26
|
26
|
import com.dmdirc.FrameContainer;
|
27
|
27
|
import com.dmdirc.commandparser.CommandArguments;
|
28
|
|
-import com.dmdirc.commandparser.CommandInfo;
|
29
|
|
-import com.dmdirc.commandparser.commands.Command;
|
|
28
|
+import com.dmdirc.commandparser.CommandInfoPair;
|
30
|
29
|
import com.dmdirc.commandparser.commands.ValidatingCommand;
|
31
|
30
|
import com.dmdirc.commandparser.commands.WrappableCommand;
|
32
|
31
|
import com.dmdirc.commandparser.parsers.CommandParser;
|
|
@@ -52,7 +51,6 @@ import java.awt.Toolkit;
|
52
|
51
|
import java.awt.event.KeyEvent;
|
53
|
52
|
import java.util.ArrayList;
|
54
|
53
|
import java.util.List;
|
55
|
|
-import java.util.Map;
|
56
|
54
|
import java.util.concurrent.Executors;
|
57
|
55
|
import java.util.concurrent.ScheduledExecutorService;
|
58
|
56
|
import java.util.concurrent.ScheduledFuture;
|
|
@@ -281,11 +279,10 @@ public abstract class InputHandler implements ConfigChangeListener {
|
281
|
279
|
final CommandArguments args = new CommandArguments(commandController, text);
|
282
|
280
|
|
283
|
281
|
if (args.isCommand()) {
|
284
|
|
- final Map.Entry<CommandInfo, Command> command = commandController
|
285
|
|
- .getCommand(args.getCommandName());
|
|
282
|
+ final CommandInfoPair command = commandParser.getCommand(args.getCommandName());
|
286
|
283
|
|
287
|
|
- if (command != null && command.getValue() instanceof ValidatingCommand) {
|
288
|
|
- final ValidationResponse vr = ((ValidatingCommand) command.getValue())
|
|
284
|
+ if (command != null && command.getCommand() instanceof ValidatingCommand) {
|
|
285
|
+ final ValidationResponse vr = ((ValidatingCommand) command.getCommand())
|
289
|
286
|
.validateArguments(parentWindow, args);
|
290
|
287
|
|
291
|
288
|
if (vr.isFailure()) {
|
|
@@ -295,8 +292,8 @@ public abstract class InputHandler implements ConfigChangeListener {
|
295
|
292
|
}
|
296
|
293
|
}
|
297
|
294
|
|
298
|
|
- if (command != null && command.getValue() instanceof WrappableCommand) {
|
299
|
|
- final int count = ((WrappableCommand) command.getValue())
|
|
295
|
+ if (command != null && command.getCommand() instanceof WrappableCommand) {
|
|
296
|
+ final int count = ((WrappableCommand) command.getCommand())
|
300
|
297
|
.getLineCount(parentWindow, args);
|
301
|
298
|
fireLineWrap(count);
|
302
|
299
|
}
|