Selaa lähdekoodia

ZOMG style fixes

git-svn-id: http://svn.dmdirc.com/trunk@1704 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5
Gregory Holmes 17 vuotta sitten
vanhempi
commit
739f6b6e93
29 muutettua tiedostoa jossa 78 lisäystä ja 37 poistoa
  1. 1
    1
      src/com/dmdirc/Channel.java
  2. 1
    1
      src/com/dmdirc/CipherUtils.java
  3. 2
    1
      src/com/dmdirc/IconManager.java
  4. 1
    1
      src/com/dmdirc/Query.java
  5. 1
    1
      src/com/dmdirc/Raw.java
  6. 1
    1
      src/com/dmdirc/Server.java
  7. 1
    1
      src/com/dmdirc/actions/Action.java
  8. 1
    0
      src/com/dmdirc/actions/CoreActionComponent.java
  9. 1
    1
      src/com/dmdirc/actions/wrappers/ActionWrapper.java
  10. 4
    4
      src/com/dmdirc/actions/wrappers/AliasWrapper.java
  11. 26
    0
      src/com/dmdirc/actions/wrappers/package-info.java
  12. 1
    0
      src/com/dmdirc/commandparser/IntelligentCommand.java
  13. 1
    1
      src/com/dmdirc/commandparser/commands/channel/ChannelSettings.java
  14. 1
    1
      src/com/dmdirc/commandparser/commands/channel/SetNickColour.java
  15. 2
    2
      src/com/dmdirc/commandparser/commands/global/Active.java
  16. 2
    2
      src/com/dmdirc/commandparser/commands/global/Ifplugin.java
  17. 1
    1
      src/com/dmdirc/commandparser/commands/global/LoadPlugin.java
  18. 1
    1
      src/com/dmdirc/commandparser/commands/global/Notify.java
  19. 1
    1
      src/com/dmdirc/commandparser/commands/global/Set.java
  20. 1
    1
      src/com/dmdirc/commandparser/commands/server/Ctcp.java
  21. 1
    1
      src/com/dmdirc/commandparser/commands/server/Echo.java
  22. 1
    1
      src/com/dmdirc/commandparser/commands/server/Help.java
  23. 1
    1
      src/com/dmdirc/config/ConfigManager.java
  24. 7
    7
      src/com/dmdirc/config/ConfigTarget.java
  25. 1
    1
      src/com/dmdirc/config/IdentityManager.java
  26. 5
    0
      src/com/dmdirc/logger/ErrorLevel.java
  27. 4
    3
      src/com/dmdirc/logger/ErrorManager.java
  28. 5
    0
      src/com/dmdirc/logger/ErrorStatus.java
  29. 2
    1
      src/com/dmdirc/logger/Logger.java

+ 1
- 1
src/com/dmdirc/Channel.java Näytä tiedosto

@@ -48,9 +48,9 @@ import com.dmdirc.parser.callbacks.interfaces.IChannelQuit;
48 48
 import com.dmdirc.parser.callbacks.interfaces.IChannelTopic;
49 49
 import com.dmdirc.parser.callbacks.interfaces.IChannelUserModeChanged;
50 50
 import com.dmdirc.ui.ChannelFrame;
51
-import com.dmdirc.ui.interfaces.InputWindow;
52 51
 import com.dmdirc.ui.MainFrame;
53 52
 import com.dmdirc.ui.input.TabCompleter;
53
+import com.dmdirc.ui.interfaces.InputWindow;
54 54
 import com.dmdirc.ui.messages.ColourManager;
55 55
 import com.dmdirc.ui.messages.Formatter;
56 56
 import com.dmdirc.ui.messages.Styliser;

+ 1
- 1
src/com/dmdirc/CipherUtils.java Näytä tiedosto

@@ -34,8 +34,8 @@ import java.security.NoSuchAlgorithmException;
34 34
 import java.security.spec.AlgorithmParameterSpec;
35 35
 import java.security.spec.InvalidKeySpecException;
36 36
 import java.security.spec.KeySpec;
37
-import javax.crypto.BadPaddingException;
38 37
 
38
+import javax.crypto.BadPaddingException;
39 39
 import javax.crypto.Cipher;
40 40
 import javax.crypto.IllegalBlockSizeException;
41 41
 import javax.crypto.NoSuchPaddingException;

+ 2
- 1
src/com/dmdirc/IconManager.java Näytä tiedosto

@@ -27,6 +27,7 @@ import java.awt.Toolkit;
27 27
 import java.io.File;
28 28
 import java.io.IOException;
29 29
 import java.net.URL;
30
+
30 31
 import javax.swing.Icon;
31 32
 import javax.swing.ImageIcon;
32 33
 
@@ -123,4 +124,4 @@ public final class IconManager {
123 124
         return imageURL;
124 125
     }
125 126
     
126
-}
127
+}

+ 1
- 1
src/com/dmdirc/Query.java Näytä tiedosto

@@ -34,10 +34,10 @@ import com.dmdirc.parser.callbacks.CallbackNotFound;
34 34
 import com.dmdirc.parser.callbacks.interfaces.INickChanged;
35 35
 import com.dmdirc.parser.callbacks.interfaces.IPrivateAction;
36 36
 import com.dmdirc.parser.callbacks.interfaces.IPrivateMessage;
37
-import com.dmdirc.ui.interfaces.InputWindow;
38 37
 import com.dmdirc.ui.MainFrame;
39 38
 import com.dmdirc.ui.QueryFrame;
40 39
 import com.dmdirc.ui.input.TabCompleter;
40
+import com.dmdirc.ui.interfaces.InputWindow;
41 41
 
42 42
 import java.io.Serializable;
43 43
 

+ 1
- 1
src/com/dmdirc/Raw.java Näytä tiedosto

@@ -29,8 +29,8 @@ import com.dmdirc.parser.callbacks.CallbackNotFound;
29 29
 import com.dmdirc.parser.callbacks.interfaces.IDataIn;
30 30
 import com.dmdirc.parser.callbacks.interfaces.IDataOut;
31 31
 import com.dmdirc.ui.CustomInputFrame;
32
-import com.dmdirc.ui.interfaces.InputWindow;
33 32
 import com.dmdirc.ui.MainFrame;
33
+import com.dmdirc.ui.interfaces.InputWindow;
34 34
 
35 35
 import java.io.Serializable;
36 36
 

+ 1
- 1
src/com/dmdirc/Server.java Näytä tiedosto

@@ -58,10 +58,10 @@ import com.dmdirc.parser.callbacks.interfaces.IPrivateMessage;
58 58
 import com.dmdirc.parser.callbacks.interfaces.IPrivateNotice;
59 59
 import com.dmdirc.parser.callbacks.interfaces.ISocketClosed;
60 60
 import com.dmdirc.parser.callbacks.interfaces.IUserModeChanged;
61
-import com.dmdirc.ui.interfaces.InputWindow;
62 61
 import com.dmdirc.ui.MainFrame;
63 62
 import com.dmdirc.ui.ServerFrame;
64 63
 import com.dmdirc.ui.input.TabCompleter;
64
+import com.dmdirc.ui.interfaces.InputWindow;
65 65
 import com.dmdirc.ui.interfaces.ServerWindow;
66 66
 import com.dmdirc.ui.interfaces.Window;
67 67
 import com.dmdirc.ui.messages.Formatter;

+ 1
- 1
src/com/dmdirc/actions/Action.java Näytä tiedosto

@@ -28,8 +28,8 @@ import com.dmdirc.commandparser.CommandParser;
28 28
 import com.dmdirc.commandparser.GlobalCommandParser;
29 29
 import com.dmdirc.logger.ErrorLevel;
30 30
 import com.dmdirc.logger.Logger;
31
-import com.dmdirc.ui.interfaces.InputWindow;
32 31
 import com.dmdirc.ui.MainFrame;
32
+import com.dmdirc.ui.interfaces.InputWindow;
33 33
 import com.dmdirc.ui.interfaces.Window;
34 34
 
35 35
 import java.io.File;

+ 1
- 0
src/com/dmdirc/actions/CoreActionComponent.java Näytä tiedosto

@@ -30,6 +30,7 @@ import com.dmdirc.parser.ChannelClientInfo;
30 30
 import java.awt.Color;
31 31
 import java.awt.event.KeyEvent;
32 32
 import java.util.GregorianCalendar;
33
+
33 34
 import javax.swing.KeyStroke;
34 35
 
35 36
 /**

+ 1
- 1
src/com/dmdirc/actions/wrappers/ActionWrapper.java Näytä tiedosto

@@ -53,4 +53,4 @@ public interface ActionWrapper {
53 53
      */
54 54
     String getGroupName();
55 55
     
56
-}
56
+}

+ 4
- 4
src/com/dmdirc/actions/wrappers/AliasWrapper.java Näytä tiedosto

@@ -30,7 +30,7 @@ import com.dmdirc.actions.ActionManager;
30 30
  * 
31 31
  * @author chris
32 32
  */
33
-public class AliasWrapper implements ActionWrapper {
33
+public final class AliasWrapper implements ActionWrapper {
34 34
     
35 35
     /** Singleton instance of the alias wrapper. */
36 36
     private static AliasWrapper me;
@@ -57,12 +57,12 @@ public class AliasWrapper implements ActionWrapper {
57 57
     }
58 58
     
59 59
     /** {@inheritDoc} */
60
-    public void registerAction(Action action) {
60
+    public void registerAction(final Action action) {
61 61
         System.out.println("Registered action: " + action.getName());
62 62
     }
63 63
     
64 64
     /** {@inheritDoc} */
65
-    public void unregisterAction(Action action) {
65
+    public void unregisterAction(final Action action) {
66 66
         throw new UnsupportedOperationException("Not supported yet.");
67 67
     }
68 68
     
@@ -71,4 +71,4 @@ public class AliasWrapper implements ActionWrapper {
71 71
         return "aliases";
72 72
     }
73 73
     
74
-}
74
+}

+ 26
- 0
src/com/dmdirc/actions/wrappers/package-info.java Näytä tiedosto

@@ -0,0 +1,26 @@
1
+/*
2
+ * Copyright (c) 2006-2007 Chris Smith, Shane Mc Cormack, Gregory Holmes
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+/**
24
+ * Action wrappers.
25
+ */
26
+package com.dmdirc.actions.wrappers;

+ 1
- 0
src/com/dmdirc/commandparser/IntelligentCommand.java Näytä tiedosto

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.commandparser;
24 24
 
25 25
 import com.dmdirc.ui.input.AdditionalTabTargets;
26
+
26 27
 import java.util.List;
27 28
 
28 29
 /**

+ 1
- 1
src/com/dmdirc/commandparser/commands/channel/ChannelSettings.java Näytä tiedosto

@@ -26,8 +26,8 @@ import com.dmdirc.Channel;
26 26
 import com.dmdirc.Server;
27 27
 import com.dmdirc.commandparser.ChannelCommand;
28 28
 import com.dmdirc.commandparser.CommandManager;
29
-import com.dmdirc.ui.interfaces.InputWindow;
30 29
 import com.dmdirc.ui.dialogs.channelsetting.ChannelSettingsDialog;
30
+import com.dmdirc.ui.interfaces.InputWindow;
31 31
 
32 32
 /**
33 33
  * Opens the channel settings window for the channel.

+ 1
- 1
src/com/dmdirc/commandparser/commands/channel/SetNickColour.java Näytä tiedosto

@@ -82,7 +82,7 @@ public final class SetNickColour extends ChannelCommand {
82 82
         offset++;
83 83
         
84 84
         if (target == null) {
85
-            sendLine(origin, isSilent, "commandError", "No such nickname ("+args[offset-1]+")!");
85
+            sendLine(origin, isSilent, "commandError", "No such nickname (" + args[offset - 1] + ")!");
86 86
         } else if (args.length <= offset) {
87 87
             // We're removing the colour
88 88
             if (nicklist) {

+ 2
- 2
src/com/dmdirc/commandparser/commands/global/Active.java Näytä tiedosto

@@ -24,11 +24,11 @@ package com.dmdirc.commandparser.commands.global;
24 24
 
25 25
 import com.dmdirc.commandparser.CommandManager;
26 26
 import com.dmdirc.commandparser.GlobalCommand;
27
-import com.dmdirc.ui.interfaces.InputWindow;
28 27
 import com.dmdirc.ui.MainFrame;
28
+import com.dmdirc.ui.interfaces.InputWindow;
29 29
 
30 30
 /**
31
- * The Active command issues a command to the active window
31
+ * The Active command issues a command to the active window.
32 32
  * @author chris
33 33
  */
34 34
 public final class Active extends GlobalCommand {

+ 2
- 2
src/com/dmdirc/commandparser/commands/global/Ifplugin.java Näytä tiedosto

@@ -37,7 +37,7 @@ import java.util.List;
37 37
 
38 38
 /**
39 39
  * The if plugin command allows the user to execute commands based on whether
40
- * or not a plugin is loaded
40
+ * or not a plugin is loaded.
41 41
  *
42 42
  * @author chris
43 43
  */
@@ -108,7 +108,7 @@ public final class Ifplugin extends GlobalCommand implements IntelligentCommand
108 108
     }
109 109
 
110 110
     /** {@inheritDoc} */
111
-    public AdditionalTabTargets getSuggestions(int arg, List<String> previousArgs) {
111
+    public AdditionalTabTargets getSuggestions(final int arg, final List<String> previousArgs) {
112 112
         final AdditionalTabTargets res = new AdditionalTabTargets();
113 113
         
114 114
         if (arg == 0) {

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/LoadPlugin.java Näytä tiedosto

@@ -85,7 +85,7 @@ public final class LoadPlugin extends GlobalCommand implements IntelligentComman
85 85
     }
86 86
 
87 87
     /** {@inheritDoc} */
88
-    public AdditionalTabTargets getSuggestions(int arg, List<String> previousArgs) {
88
+    public AdditionalTabTargets getSuggestions(final int arg, final List<String> previousArgs) {
89 89
         final AdditionalTabTargets res = new AdditionalTabTargets();
90 90
         
91 91
         if (arg == 0) {

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/Notify.java Näytä tiedosto

@@ -23,8 +23,8 @@
23 23
 package com.dmdirc.commandparser.commands.global;
24 24
 
25 25
 import com.dmdirc.Config;
26
-import com.dmdirc.commandparser.GlobalCommand;
27 26
 import com.dmdirc.commandparser.CommandManager;
27
+import com.dmdirc.commandparser.GlobalCommand;
28 28
 import com.dmdirc.ui.interfaces.InputWindow;
29 29
 import com.dmdirc.ui.messages.ColourManager;
30 30
 

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/Set.java Näytä tiedosto

@@ -172,7 +172,7 @@ public final class Set extends GlobalCommand implements IntelligentCommand {
172 172
     }
173 173
     
174 174
     /** {@inheritDoc} */
175
-    public AdditionalTabTargets getSuggestions(int arg, List<String> previousArgs) {
175
+    public AdditionalTabTargets getSuggestions(final int arg, final List<String> previousArgs) {
176 176
         final AdditionalTabTargets res = new AdditionalTabTargets();
177 177
         
178 178
         if (arg == 0) {

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/Ctcp.java Näytä tiedosto

@@ -93,7 +93,7 @@ public final class Ctcp extends ServerCommand implements IntelligentCommand {
93 93
     }
94 94
     
95 95
     /** {@inheritDoc} */
96
-    public AdditionalTabTargets getSuggestions(int arg, List<String> previousArgs) {
96
+    public AdditionalTabTargets getSuggestions(final int arg, final List<String> previousArgs) {
97 97
         final AdditionalTabTargets res = new AdditionalTabTargets();
98 98
         
99 99
         if (arg == 1) {

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/Echo.java Näytä tiedosto

@@ -25,8 +25,8 @@ package com.dmdirc.commandparser.commands.server;
25 25
 import com.dmdirc.Server;
26 26
 import com.dmdirc.commandparser.CommandManager;
27 27
 import com.dmdirc.commandparser.ServerCommand;
28
-import com.dmdirc.ui.interfaces.InputWindow;
29 28
 import com.dmdirc.ui.MainFrame;
29
+import com.dmdirc.ui.interfaces.InputWindow;
30 30
 import com.dmdirc.ui.interfaces.Window;
31 31
 
32 32
 /**

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/Help.java Näytä tiedosto

@@ -27,8 +27,8 @@ import com.dmdirc.commandparser.Command;
27 27
 import com.dmdirc.commandparser.CommandManager;
28 28
 import com.dmdirc.commandparser.ServerCommand;
29 29
 import com.dmdirc.ui.ChannelFrame;
30
-import com.dmdirc.ui.interfaces.InputWindow;
31 30
 import com.dmdirc.ui.QueryFrame;
31
+import com.dmdirc.ui.interfaces.InputWindow;
32 32
 
33 33
 import java.util.Collections;
34 34
 import java.util.List;

+ 1
- 1
src/com/dmdirc/config/ConfigManager.java Näytä tiedosto

@@ -193,7 +193,7 @@ public final class ConfigManager implements Serializable, ConfigChangeListener {
193 193
     }
194 194
     
195 195
     /**
196
-     * Returns the name of all known options
196
+     * Returns the name of all known options.
197 197
      *
198 198
      * @return A list of options
199 199
      */

+ 7
- 7
src/com/dmdirc/config/ConfigTarget.java Näytä tiedosto

@@ -32,13 +32,6 @@ import java.io.Serializable;
32 32
  */
33 33
 public final class ConfigTarget implements Comparable, Serializable {
34 34
     
35
-    /**
36
-     * A version number for this class. It should be changed whenever the class
37
-     * structure is changed (or anything else that would prevent serialized
38
-     * objects being unserialized with the new class).
39
-     */
40
-    private static final long serialVersionUID = 1;
41
-    
42 35
     /** Indicates that the target is the global default config. */
43 36
     public static final int TYPE_GLOBALDEFAULT = 0;
44 37
     /** Indicates that the target is a global config source. */
@@ -52,6 +45,13 @@ public final class ConfigTarget implements Comparable, Serializable {
52 45
     /** Indicates that the target targets a channel. */
53 46
     public static final int TYPE_CHANNEL = 5;
54 47
     
48
+    /**
49
+     * A version number for this class. It should be changed whenever the class
50
+     * structure is changed (or anything else that would prevent serialized
51
+     * objects being unserialized with the new class).
52
+     */
53
+    private static final long serialVersionUID = 1;
54
+    
55 55
     /** The type of this target. */
56 56
     private int type = 1;
57 57
     /** The data of this target. */

+ 1
- 1
src/com/dmdirc/config/IdentityManager.java Näytä tiedosto

@@ -74,7 +74,7 @@ public final class IdentityManager {
74 74
         final String base = "com/dmdirc/config/defaults/";
75 75
         
76 76
         final String[] urls = {"asuka", "snircd", "bahamut", "hyperion",
77
-        "generic", "defaults"};
77
+        "generic", "defaults", };
78 78
         
79 79
         for (String url : urls) {
80 80
             try {

+ 5
- 0
src/com/dmdirc/logger/ErrorLevel.java Näytä tiedosto

@@ -38,6 +38,11 @@ public enum ErrorLevel {
38 38
     /** toString value of the item. */
39 39
     private String value;
40 40
     
41
+    /** 
42
+     * Instantiates the enum. 
43
+     *
44
+     * @param value toString value
45
+     */
41 46
     ErrorLevel(final String value) {
42 47
         this.value = value;
43 48
     }

+ 4
- 3
src/com/dmdirc/logger/ErrorManager.java Näytä tiedosto

@@ -37,6 +37,7 @@ import java.util.LinkedList;
37 37
 import java.util.List;
38 38
 import java.util.Timer;
39 39
 import java.util.TimerTask;
40
+
40 41
 import javax.swing.event.EventListenerList;
41 42
 
42 43
 /**
@@ -100,7 +101,7 @@ public final class ErrorManager implements Serializable {
100 101
     }
101 102
     
102 103
     /**
103
-     * Returns a list of errors
104
+     * Returns a list of errors.
104 105
      *
105 106
      * @return Error list
106 107
      */
@@ -156,7 +157,7 @@ public final class ErrorManager implements Serializable {
156 157
     /**
157 158
      * Sends an error to the developers.
158 159
      *
159
-     * @param ProgramError error to be sent
160
+     * @param error ProgramError to be sent
160 161
      */
161 162
     @SuppressWarnings("PMD.SystemPrintln")
162 163
     private static void sendErrorInternal(final ProgramError error) {
@@ -258,7 +259,7 @@ public final class ErrorManager implements Serializable {
258 259
     }
259 260
     
260 261
     /**
261
-     * Fired when an error is deleted
262
+     * Fired when an error is deleted.
262 263
      *
263 264
      * @param error Error that has been deleted
264 265
      */

+ 5
- 0
src/com/dmdirc/logger/ErrorStatus.java Näytä tiedosto

@@ -38,6 +38,11 @@ public enum ErrorStatus {
38 38
     /** toString value of the item. */
39 39
     private String value;
40 40
     
41
+    /** 
42
+     * Instantiates the enum. 
43
+     *
44
+     * @param value toString value
45
+     */
41 46
     ErrorStatus(final String value) {
42 47
         this.value = value;
43 48
     }

+ 2
- 1
src/com/dmdirc/logger/Logger.java Näytä tiedosto

@@ -24,6 +24,7 @@ package com.dmdirc.logger;
24 24
 
25 25
 import com.dmdirc.Config;
26 26
 import com.dmdirc.ui.dialogs.error.FatalErrorDialog;
27
+
27 28
 import java.io.File;
28 29
 import java.io.FileNotFoundException;
29 30
 import java.io.FileOutputStream;
@@ -74,7 +75,7 @@ public final class Logger {
74 75
      *
75 76
      * @param level Severity of the error
76 77
      * @param message Brief error description
77
-     * @param error Cause of error
78
+     * @param exception Cause of error
78 79
      * @param sendable Whether the error is sendable
79 80
      */
80 81
     private static void error(final ErrorLevel level,

Loading…
Peruuta
Tallenna