Selaa lähdekoodia

Command no longer implements CommandInfo. Horrible breakage ensues.

tags/0.6.3m1rc1
Chris Smith 15 vuotta sitten
vanhempi
commit
27c887cdae

+ 2
- 2
src/com/dmdirc/commandparser/CommandManager.java Näytä tiedosto

@@ -173,7 +173,7 @@ public final class CommandManager {
173 173
                 commands.remove(info);
174 174
             }
175 175
             
176
-            registerCommandName(command, register);
176
+            registerCommandName(info, register);
177 177
         }
178 178
     }
179 179
     
@@ -195,7 +195,7 @@ public final class CommandManager {
195 195
             if (register) {
196 196
                 parser.registerCommand(command, info);
197 197
             } else {
198
-                parser.unregisterCommand(command);
198
+                parser.unregisterCommand(info);
199 199
             }
200 200
         }
201 201
     }

+ 1
- 15
src/com/dmdirc/commandparser/commands/Command.java Näytä tiedosto

@@ -22,9 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands;
24 24
 
25
-import com.dmdirc.commandparser.CommandInfo;
26 25
 import com.dmdirc.commandparser.CommandManager;
27
-import com.dmdirc.commandparser.CommandType;
28 26
 import com.dmdirc.ui.interfaces.InputWindow;
29 27
 import com.dmdirc.ui.messages.Styliser;
30 28
 
@@ -33,7 +31,7 @@ import com.dmdirc.ui.messages.Styliser;
33 31
  *
34 32
  * @author chris
35 33
  */
36
-public abstract class Command implements CommandInfo, Comparable<Command> {
34
+public abstract class Command {
37 35
     
38 36
     /** The format name used for command output. */
39 37
     protected static final String FORMAT_OUTPUT = "commandOutput";
@@ -149,18 +147,6 @@ public abstract class Command implements CommandInfo, Comparable<Command> {
149 147
         for (int i = 0; i < size - data.length(); i++) {
150 148
             builder.append(' ');
151 149
         }
152
-    }    
153
-    
154
-    /** {@inheritDoc} */
155
-    @Override
156
-    public final int compareTo(final Command o) {
157
-        return getName().compareTo(o.getName());
158
-    }
159
-
160
-    /** {@inheritDoc} */
161
-    @Override
162
-    public CommandType getType() {
163
-        return CommandType.fromCommand(this);
164 150
     }
165 151
 
166 152
 }

Loading…
Peruuta
Tallenna