Kaynağa Gözat

Style fixes.

Change-Id: Ib37854e542193ee859cbe30e953e6cb48a1f110e
Reviewed-on: http://gerrit.dmdirc.com/3310
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
changes/10/3310/2
Chris Smith 10 yıl önce
ebeveyn
işleme
af5e767849

+ 3
- 2
src/com/dmdirc/addons/freedesktop_notifications/FDManager.java Dosyayı Görüntüle

@@ -65,8 +65,9 @@ public class FDManager implements ConfigChangeListener {
65 65
     private boolean stripcodes;
66 66
 
67 67
     @Inject
68
-    public FDManager(@GlobalConfig final AggregateConfigProvider config,
69
-            @UserConfig ConfigProvider userConfig,
68
+    public FDManager(
69
+            @GlobalConfig final AggregateConfigProvider config,
70
+            @UserConfig final ConfigProvider userConfig,
70 71
             @PluginDomain(FreeDesktopNotificationsPlugin.class) final String domain,
71 72
             final PluginFilesHelper filesHelper) {
72 73
         this.domain = domain;

+ 5
- 5
src/com/dmdirc/addons/scriptplugin/ScriptCommand.java Dosyayı Görüntüle

@@ -60,7 +60,7 @@ public class ScriptCommand extends Command implements IntelligentCommand {
60 60
     /** Plugin settings domain. */
61 61
     private final String domain;
62 62
     /** Manager used to retrieve script engines. */
63
-    private final ScriptEngineManager ScriptEngineManager;
63
+    private final ScriptEngineManager scriptEngineManager;
64 64
     /** Script directory. */
65 65
     private final String scriptDirectory;
66 66
     /** Script manager to handle scripts. */
@@ -86,7 +86,7 @@ public class ScriptCommand extends Command implements IntelligentCommand {
86 86
         super(commandController);
87 87
         this.globalConfig = globalConfig;
88 88
         this.domain = domain;
89
-        this.ScriptEngineManager = scriptEngineManager;
89
+        this.scriptEngineManager = scriptEngineManager;
90 90
         this.scriptDirectory = scriptDirectory;
91 91
         this.scriptManager = scriptManager;
92 92
     }
@@ -127,12 +127,12 @@ public class ScriptCommand extends Command implements IntelligentCommand {
127 127
                         final String baseFile = scriptDirectory + '/'
128 128
                                 + globalConfig.getOption(domain, "eval.baseFile");
129 129
                         if (new File(baseFile).exists()) {
130
-                            wrapper = new ScriptEngineWrapper(ScriptEngineManager, baseFile);
130
+                            wrapper = new ScriptEngineWrapper(scriptEngineManager, baseFile);
131 131
                         } else {
132
-                            wrapper = new ScriptEngineWrapper(ScriptEngineManager, null);
132
+                            wrapper = new ScriptEngineWrapper(scriptEngineManager, null);
133 133
                         }
134 134
                     } else {
135
-                        wrapper = new ScriptEngineWrapper(ScriptEngineManager, null);
135
+                        wrapper = new ScriptEngineWrapper(scriptEngineManager, null);
136 136
                     }
137 137
                     wrapper.getScriptEngine().put("cmd_origin", origin);
138 138
                     wrapper.getScriptEngine().put("cmd_isSilent", args.isSilent());

+ 1
- 8
src/com/dmdirc/addons/ui_swing/MainFrame.java Dosyayı Görüntüle

@@ -64,8 +64,6 @@ import javax.swing.WindowConstants;
64 64
 
65 65
 import net.miginfocom.swing.MigLayout;
66 66
 
67
-import org.slf4j.LoggerFactory;
68
-
69 67
 import static com.dmdirc.addons.ui_swing.SwingPreconditions.checkOnEDT;
70 68
 
71 69
 /**
@@ -75,12 +73,7 @@ public class MainFrame extends JFrame implements WindowListener,
75 73
         ConfigChangeListener, SwingWindowListener, FrameInfoListener,
76 74
         NotificationListener {
77 75
 
78
-    private static final org.slf4j.Logger log = LoggerFactory.getLogger(MainFrame.class);
79
-    /**
80
-     * A version number for this class. It should be changed whenever the class structure is changed
81
-     * (or anything else that would prevent serialized objects being unserialized with the new
82
-     * class).
83
-     */
76
+    /** A version number for this class. */
84 77
     private static final long serialVersionUID = 9;
85 78
     /** Focus queue. */
86 79
     private final QueuedLinkedHashSet<TextFrame> focusOrder;

+ 10
- 3
src/com/dmdirc/addons/ui_swing/SwingController.java Dosyayı Görüntüle

@@ -68,8 +68,6 @@ import javax.swing.UnsupportedLookAndFeelException;
68 68
 
69 69
 import net.miginfocom.layout.PlatformDefaults;
70 70
 
71
-import org.slf4j.LoggerFactory;
72
-
73 71
 import dagger.ObjectGraph;
74 72
 
75 73
 /**
@@ -77,7 +75,6 @@ import dagger.ObjectGraph;
77 75
  */
78 76
 public class SwingController extends BaseCommandPlugin implements UIController {
79 77
 
80
-    private static final org.slf4j.Logger log = LoggerFactory.getLogger(MainFrame.class);
81 78
     /** Error dialog. */
82 79
     private ErrorListDialog errorDialog;
83 80
     /** This plugin's plugin info object. */
@@ -126,11 +123,21 @@ public class SwingController extends BaseCommandPlugin implements UIController {
126 123
         setAntiAlias();
127 124
     }
128 125
 
126
+    /**
127
+     * @return Global config object.
128
+     *
129
+     * @deprecated Should be injected.
130
+     */
129 131
     @Deprecated
130 132
     public AggregateConfigProvider getGlobalConfig() {
131 133
         return globalConfig;
132 134
     }
133 135
 
136
+    /**
137
+     * @return Global icon manager object.
138
+     *
139
+     * @deprecated Should be injected.
140
+     */
134 141
     @Deprecated
135 142
     public IconManager getIconManager() {
136 143
         return iconManager;

+ 10
- 0
src/com/dmdirc/addons/ui_swing/SwingManager.java Dosyayı Görüntüle

@@ -189,11 +189,21 @@ public class SwingManager {
189 189
         return firstRunExecutor.get();
190 190
     }
191 191
 
192
+    /**
193
+     * @return Feedback nag provider.
194
+     *
195
+     * @deprecated Should be injected.
196
+     */
192 197
     @Deprecated
193 198
     public Provider<FeedbackNag> getFeedbackNagProvider() {
194 199
         return feedbackNagProvider;
195 200
     }
196 201
 
202
+    /**
203
+     * @return URL dialog factory.
204
+     *
205
+     * @deprecated Should be injected.
206
+     */
197 207
     @Deprecated
198 208
     public URLDialogFactory getUrlDialogFactory() {
199 209
         return urlDialogFactory;

+ 4
- 0
src/com/dmdirc/addons/ui_swing/components/frames/ComponentCreator.java Dosyayı Görüntüle

@@ -39,6 +39,8 @@ import javax.swing.JComponent;
39 39
 
40 40
 /**
41 41
  * Utility class to create frame components.
42
+ *
43
+ * @deprecated Not really compatible with dependency injection. Replace.... somehow.
42 44
  */
43 45
 @Deprecated
44 46
 public class ComponentCreator {
@@ -52,6 +54,8 @@ public class ComponentCreator {
52 54
      * @param owner      container
53 55
      *
54 56
      * @return Set of initialised components
57
+     *
58
+     * @deprecated Not really compatible with dependency injection. Replace.... somehow.
55 59
      */
56 60
     @Deprecated
57 61
     public Set<JComponent> initFrameComponents(

+ 11
- 11
src/com/dmdirc/addons/ui_swing/components/statusbar/MessageLabel.java Dosyayı Görüntüle

@@ -53,7 +53,7 @@ import org.slf4j.LoggerFactory;
53 53
 public class MessageLabel extends JPanel implements StatusBarComponent,
54 54
         MouseListener {
55 55
 
56
-    private static final org.slf4j.Logger log = LoggerFactory.getLogger(MessageLabel.class);
56
+    private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(MessageLabel.class);
57 57
     /** Serial version UID. */
58 58
     private static final long serialVersionUID = 1;
59 59
     /** Default status bar message. */
@@ -104,11 +104,11 @@ public class MessageLabel extends JPanel implements StatusBarComponent,
104 104
      * @param message Message object to show
105 105
      */
106 106
     public void setMessage(final StatusMessage message) {
107
-        log.info("Adding message to queue {}", message);
107
+        LOG.info("Adding message to queue {}", message);
108 108
         queue.add(message);
109
-        log.debug("Queue size: {}", queue.size());
109
+        LOG.debug("Queue size: {}", queue.size());
110 110
         if (queue.size() == 1) {
111
-            log.info("Showing only messsage {}", message);
111
+            LOG.info("Showing only messsage {}", message);
112 112
             currentMessage = message;
113 113
             updateCurrentMessage();
114 114
         }
@@ -122,7 +122,7 @@ public class MessageLabel extends JPanel implements StatusBarComponent,
122 122
 
123 123
             @Override
124 124
             public void run() {
125
-                log.info("Updating current message: {}", currentMessage);
125
+                LOG.info("Updating current message: {}", currentMessage);
126 126
                 if (currentMessage.getIconType() == null) {
127 127
                     label.setIcon(null);
128 128
                 } else {
@@ -132,11 +132,11 @@ public class MessageLabel extends JPanel implements StatusBarComponent,
132 132
                         currentMessage.getMessage(), getWidth()));
133 133
                 if (messageTimer != null && (System.currentTimeMillis()
134 134
                         - messageTimer.scheduledExecutionTime()) <= 0) {
135
-                    log.debug("Cancelling message timer.");
135
+                    LOG.debug("Cancelling message timer.");
136 136
                     messageTimer.cancel();
137 137
                 }
138 138
                 if (!defaultMessage.equals(currentMessage)) {
139
-                    log.debug("Starting new message timer.");
139
+                    LOG.debug("Starting new message timer.");
140 140
                     messageTimer = new MessageTimerTask(MessageLabel.this);
141 141
                     new Timer("SwingStatusBar messageTimer").schedule(
142 142
                             messageTimer, new Date(System.currentTimeMillis()
@@ -150,16 +150,16 @@ public class MessageLabel extends JPanel implements StatusBarComponent,
150 150
      * Removes the message from the status bar.
151 151
      */
152 152
     public void clearMessage() {
153
-        log.info("Adding message to history {}", currentMessage);
153
+        LOG.info("Adding message to history {}", currentMessage);
154 154
         historyLabel.addMessage(currentMessage);
155
-        log.debug("Queue size: {}", queue.size());
155
+        LOG.debug("Queue size: {}", queue.size());
156 156
         if (queue.size() <= 1) {
157 157
             queue.remove();
158
-            log.info("Reverting to default message.");
158
+            LOG.info("Reverting to default message.");
159 159
             currentMessage = defaultMessage;
160 160
         } else {
161 161
             currentMessage = queue.poll();
162
-            log.info("Showing next message in queue: {}", currentMessage);
162
+            LOG.info("Showing next message in queue: {}", currentMessage);
163 163
         }
164 164
         updateCurrentMessage();
165 165
     }

+ 1
- 1
src/com/dmdirc/addons/ui_swing/dialogs/profiles/ProfileManagerDialog.java Dosyayı Görüntüle

@@ -22,8 +22,8 @@
22 22
 
23 23
 package com.dmdirc.addons.ui_swing.dialogs.profiles;
24 24
 
25
-import com.dmdirc.actions.wrappers.Profile;
26 25
 import com.dmdirc.ClientModule.GlobalConfig;
26
+import com.dmdirc.actions.wrappers.Profile;
27 27
 import com.dmdirc.addons.ui_swing.MainFrame;
28 28
 import com.dmdirc.addons.ui_swing.components.renderers.PropertyListCellRenderer;
29 29
 import com.dmdirc.addons.ui_swing.components.text.TextLabel;

Loading…
İptal
Kaydet