Parcourir la source

Fixed imports and autoformatted trunk/*.java and trunk/commandparser/*.java

git-svn-id: http://svn.dmdirc.com/trunk@489 00569f92-eb28-0410-84fd-f71c24880f
tags/0.3
Chris Smith il y a 17 ans
Parent
révision
471b85c37c

+ 3
- 4
src/uk/org/ownage/dmdirc/Channel.java Voir le fichier

@@ -54,7 +54,6 @@ import uk.org.ownage.dmdirc.ui.ChannelFrame;
54 54
 import uk.org.ownage.dmdirc.ui.MainFrame;
55 55
 import uk.org.ownage.dmdirc.ui.input.TabCompleter;
56 56
 import uk.org.ownage.dmdirc.ui.messages.ColourManager;
57
-import uk.org.ownage.dmdirc.ui.messages.Formatter;
58 57
 import uk.org.ownage.dmdirc.ui.messages.Styliser;
59 58
 
60 59
 /**
@@ -347,7 +346,7 @@ public class Channel implements IChannelMessage, IChannelGotNames, IChannelTopic
347 346
     public void onChannelTopic(final IRCParser tParser, final ChannelInfo cChannel,
348 347
             final boolean bIsJoinTopic) {
349 348
         if (bIsJoinTopic) {
350
-            frame.addLine("channelJoinTopic", cChannel.getTopic(), 
349
+            frame.addLine("channelJoinTopic", cChannel.getTopic(),
351 350
                     cChannel.getTopicUser(), 1000*cChannel.getTopicTime(), cChannel);
352 351
         } else {
353 352
             ChannelClientInfo user = cChannel.getUser(cChannel.getTopicUser());
@@ -389,7 +388,7 @@ public class Channel implements IChannelMessage, IChannelGotNames, IChannelTopic
389 388
      */
390 389
     public void onChannelPart(final IRCParser tParser, final ChannelInfo cChannel,
391 390
             final ChannelClientInfo cChannelClient, final String sReason) {
392
-        ClientInfo client = cChannelClient.getClient(); 
391
+        ClientInfo client = cChannelClient.getClient();
393 392
         String nick = cChannelClient.getNickname();
394 393
         String ident = client.getIdent();
395 394
         String host = client.getHost();
@@ -436,7 +435,7 @@ public class Channel implements IChannelMessage, IChannelGotNames, IChannelTopic
436 435
         String victimhost = cKickedClient.getClient().getHost();
437 436
         
438 437
         if (sReason.equals("")) {
439
-            frame.addLine("channelKick", kickermodes, kicker[0], kicker[1], kicker[2], victimmodes, 
438
+            frame.addLine("channelKick", kickermodes, kicker[0], kicker[1], kicker[2], victimmodes,
440 439
                     victim, victimident, victimhost, cChannel.getName());
441 440
         } else {
442 441
             frame.addLine("channelKickReason", kickermodes, kicker[0], kicker[1], kicker[2], victimmodes,

+ 3
- 5
src/uk/org/ownage/dmdirc/Query.java Voir le fichier

@@ -31,7 +31,6 @@ import javax.swing.event.InternalFrameEvent;
31 31
 import javax.swing.event.InternalFrameListener;
32 32
 import uk.org.ownage.dmdirc.commandparser.CommandManager;
33 33
 import uk.org.ownage.dmdirc.commandparser.QueryCommandParser;
34
-import uk.org.ownage.dmdirc.parser.ChannelInfo;
35 34
 import uk.org.ownage.dmdirc.parser.ClientInfo;
36 35
 import uk.org.ownage.dmdirc.parser.IRCParser;
37 36
 import uk.org.ownage.dmdirc.ui.MainFrame;
@@ -42,7 +41,6 @@ import uk.org.ownage.dmdirc.parser.callbacks.interfaces.INickChanged;
42 41
 import uk.org.ownage.dmdirc.parser.callbacks.interfaces.IPrivateAction;
43 42
 import uk.org.ownage.dmdirc.parser.callbacks.interfaces.IPrivateMessage;
44 43
 import uk.org.ownage.dmdirc.ui.QueryFrame;
45
-import uk.org.ownage.dmdirc.ui.ServerFrame;
46 44
 import uk.org.ownage.dmdirc.ui.input.TabCompleter;
47 45
 import uk.org.ownage.dmdirc.ui.messages.ColourManager;
48 46
 
@@ -87,7 +85,7 @@ public class Query implements IPrivateAction, IPrivateMessage, INickChanged,
87 85
         ClassLoader cldr = this.getClass().getClassLoader();
88 86
         URL imageURL = cldr.getResource("uk/org/ownage/dmdirc/res/query.png");
89 87
         imageIcon = new ImageIcon(imageURL);
90
-               
88
+        
91 89
         frame = new QueryFrame(new QueryCommandParser(this.server, this));
92 90
         MainFrame.getMainFrame().addChild(frame);
93 91
         frame.addInternalFrameListener(this);
@@ -95,7 +93,7 @@ public class Query implements IPrivateAction, IPrivateMessage, INickChanged,
95 93
         frame.open();
96 94
         
97 95
         TabCompleter tabCompleter = new TabCompleter(server.getTabCompleter());
98
-        tabCompleter.addEntries(CommandManager.getQueryCommandNames());        
96
+        tabCompleter.addEntries(CommandManager.getQueryCommandNames());
99 97
         frame.setTabCompleter(tabCompleter);
100 98
         
101 99
         try {
@@ -317,7 +315,7 @@ public class Query implements IPrivateAction, IPrivateMessage, INickChanged,
317 315
      */
318 316
     public void addLine(final String messageType, final Object... args) {
319 317
         frame.addLine(messageType, args);
320
-    }        
318
+    }
321 319
     
322 320
     /**
323 321
      * Retrieves the icon used by the query frame

+ 3
- 3
src/uk/org/ownage/dmdirc/commandparser/ChannelCommandParser.java Voir le fichier

@@ -64,7 +64,7 @@ public class ChannelCommandParser extends CommandParser {
64 64
      * @param origin The window in which the command was typed
65 65
      * @param command The command to be executed
66 66
      * @param args The arguments to the command
67
-     */    
67
+     */
68 68
     protected void executeCommand(CommandWindow origin, Command command, String... args) {
69 69
         if (command instanceof ChannelCommand) {
70 70
             ((ChannelCommand) command).execute(origin, server, channel, args);
@@ -80,7 +80,7 @@ public class ChannelCommandParser extends CommandParser {
80 80
      * @param origin The window in which the command was typed
81 81
      * @param command The command the user tried to execute
82 82
      * @param args The arguments passed to the command
83
-     */    
83
+     */
84 84
     protected void handleInvalidCommand(CommandWindow origin, String command, String... args) {
85 85
         origin.addLine("Unknown command: "+command+"/"+args.length);
86 86
     }
@@ -90,7 +90,7 @@ public class ChannelCommandParser extends CommandParser {
90 90
      * means it is sent to the server/channel/user as-is, with no further processing.
91 91
      * @param origin The window in which the command was typed
92 92
      * @param line The line input by the user
93
-     */    
93
+     */
94 94
     protected void handleNonCommand(CommandWindow origin, String line) {
95 95
         channel.sendLine(line);
96 96
     }

+ 0
- 2
src/uk/org/ownage/dmdirc/commandparser/Command.java Voir le fichier

@@ -22,8 +22,6 @@
22 22
 
23 23
 package uk.org.ownage.dmdirc.commandparser;
24 24
 
25
-import uk.org.ownage.dmdirc.Server;
26
-
27 25
 /**
28 26
  * Represents a generic command
29 27
  * @author chris

+ 2
- 2
src/uk/org/ownage/dmdirc/commandparser/CommandParser.java Voir le fichier

@@ -104,7 +104,7 @@ abstract public class CommandParser {
104 104
      * @param line The line to be parsed
105 105
      * @param usedCtrl Whether the user used the control key or not
106 106
      */
107
-    public void parseCommand(CommandWindow origin, String line, boolean usedCtrl) {    
107
+    public void parseCommand(CommandWindow origin, String line, boolean usedCtrl) {
108 108
         if (usedCtrl) {
109 109
             handleNonCommand(origin, line);
110 110
         } else {
@@ -129,7 +129,7 @@ abstract public class CommandParser {
129 129
      * @param args The arguments passed to the command
130 130
      */
131 131
     abstract protected void handleInvalidCommand(CommandWindow origin, String command, String... args);
132
-
132
+    
133 133
     /**
134 134
      * Called when the input was a line of text that was not a command. This normally
135 135
      * means it is sent to the server/channel/user as-is, with no further processing.

+ 1
- 1
src/uk/org/ownage/dmdirc/commandparser/CommandWindow.java Voir le fichier

@@ -42,6 +42,6 @@ public interface CommandWindow {
42 42
      * @param messageType The type of this message
43 43
      * @param args The arguments for the message
44 44
      */
45
-    public void addLine(String messageType, Object... args);    
45
+    public void addLine(String messageType, Object... args);
46 46
     
47 47
 }

+ 3
- 3
src/uk/org/ownage/dmdirc/commandparser/QueryCommandParser.java Voir le fichier

@@ -64,7 +64,7 @@ public class QueryCommandParser extends CommandParser {
64 64
      * @param origin The window in which the command was typed
65 65
      * @param command The command to be executed
66 66
      * @param args The arguments to the command
67
-     */    
67
+     */
68 68
     protected void executeCommand(CommandWindow origin, Command command, String... args) {
69 69
         if (command instanceof QueryCommand) {
70 70
             ((QueryCommand) command).execute(origin, server, query, args);
@@ -80,7 +80,7 @@ public class QueryCommandParser extends CommandParser {
80 80
      * @param origin The window in which the command was typed
81 81
      * @param command The command the user tried to execute
82 82
      * @param args The arguments passed to the command
83
-     */    
83
+     */
84 84
     protected void handleInvalidCommand(CommandWindow origin, String command, String... args) {
85 85
         origin.addLine("Unknown command: "+command+"/"+args.length);
86 86
     }
@@ -90,7 +90,7 @@ public class QueryCommandParser extends CommandParser {
90 90
      * means it is sent to the server/channel/user as-is, with no further processing.
91 91
      * @param origin The window in which the command was typed
92 92
      * @param line The line input by the user
93
-     */    
93
+     */
94 94
     protected void handleNonCommand(CommandWindow origin, String line) {
95 95
         query.sendLine(line);
96 96
     }

+ 3
- 4
src/uk/org/ownage/dmdirc/commandparser/ServerCommand.java Voir le fichier

@@ -22,16 +22,15 @@
22 22
 
23 23
 package uk.org.ownage.dmdirc.commandparser;
24 24
 
25
-import uk.org.ownage.dmdirc.Channel;
26 25
 import uk.org.ownage.dmdirc.Server;
27 26
 
28 27
 /**
29
- * Represents a generic server command. Server commands are associated with 
28
+ * Represents a generic server command. Server commands are associated with
30 29
  * a server instance.
31 30
  * @author chris
32 31
  */
33 32
 public abstract class ServerCommand extends Command {
34
-       
33
+    
35 34
     /** Creates a new instance of ChannelCommand */
36 35
     public ServerCommand() {
37 36
         super();
@@ -42,6 +41,6 @@ public abstract class ServerCommand extends Command {
42 41
      * @param origin The window in which the command was typed
43 42
      * @param server The server instance that this command is being executed on
44 43
      * @param args Arguments passed to this command
45
-     */    
44
+     */
46 45
     public abstract void execute(CommandWindow origin, Server server, String... args);
47 46
 }

Chargement…
Annuler
Enregistrer