浏览代码

Remove a bunch of deprecated methods.

Change-Id: Ia4cf947dd33272021b10d2dc4093f383277eefd2
Depends-On: I06531664f45d26298d989b9ac82d614c67da8c55
Reviewed-on: http://gerrit.dmdirc.com/2775
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
tags/0.8
Chris Smith 10 年前
父节点
当前提交
f680720ea3

+ 1
- 28
src/com/dmdirc/addons/ui_swing/UIUtilities.java 查看文件

@@ -28,7 +28,6 @@ import com.dmdirc.addons.ui_swing.components.DMDircUndoableEditListener;
28 28
 import com.dmdirc.logger.ErrorLevel;
29 29
 import com.dmdirc.logger.Logger;
30 30
 import com.dmdirc.ui.Colour;
31
-import com.dmdirc.util.ReturnableThread;
32 31
 
33 32
 import java.awt.Color;
34 33
 import java.awt.Font;
@@ -250,7 +249,7 @@ public final class UIUtilities {
250 249
             if (SwingUtilities.isEventDispatchThread()) {
251 250
                 return returnable.call();
252 251
             } else {
253
-                final FutureTask<T> task = new FutureTask<T>(returnable);
252
+                final FutureTask<T> task = new FutureTask<>(returnable);
254 253
                 SwingUtilities.invokeAndWait(task);
255 254
                 return task.get();
256 255
             }
@@ -259,32 +258,6 @@ public final class UIUtilities {
259 258
         }
260 259
     }
261 260
 
262
-    /**
263
-     * Invokes and waits for the specified runnable, executed on the EDT.
264
-     *
265
-     * @param <T> The return type of the returnable thread
266
-     * @param returnable Thread to be executed
267
-     * @return Result from the compelted thread
268
-     *
269
-     * @deprecated In favour of {@link #invokeAndWait(java.util.concurrent.Callable) }
270
-     */
271
-    @Deprecated
272
-    public static <T> T invokeAndWait(final ReturnableThread<T> returnable) {
273
-        if (SwingUtilities.isEventDispatchThread()) {
274
-            returnable.run();
275
-        } else {
276
-            try {
277
-                SwingUtilities.invokeAndWait(returnable);
278
-            } catch (InterruptedException ex) {
279
-                //Ignore
280
-            } catch (InvocationTargetException ex) {
281
-                Logger.appError(ErrorLevel.HIGH, "Unable to execute thread.", ex);
282
-            }
283
-        }
284
-
285
-        return returnable.getObject();
286
-    }
287
-
288 261
     /**
289 262
      * Queues the runnable to be executed on the EDT.
290 263
      *

+ 3
- 2
src/com/dmdirc/addons/ui_swing/dialogs/actioneditor/ActionSubstitutionsPanel.java 查看文件

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.addons.ui_swing.dialogs.actioneditor;
24 24
 
25
+import com.dmdirc.actions.ActionManager;
25 26
 import com.dmdirc.actions.ActionSubstitutor;
26 27
 import com.dmdirc.interfaces.actions.ActionType;
27 28
 import com.dmdirc.addons.ui_swing.components.substitutions.Substitution;
@@ -71,10 +72,10 @@ public class ActionSubstitutionsPanel extends SubstitutionsPanel<ActionType> {
71 72
             /** {@inheritDoc} */
72 73
             @Override
73 74
             public void run() {
74
-                substitutions = new ArrayList<SubstitutionLabel>();
75
+                substitutions = new ArrayList<>();
75 76
 
76 77
                 if (type != null) {
77
-                    final ActionSubstitutor sub = new ActionSubstitutor(type);
78
+                    final ActionSubstitutor sub = new ActionSubstitutor(ActionManager.getActionManager(), type);
78 79
 
79 80
                     for (final Entry<String, String> entry : sub.getComponentSubstitutions().
80 81
                             entrySet()) {

+ 3
- 2
src/com/dmdirc/addons/ui_swing/dialogs/aliases/AliasSubstitutionsPanel.java 查看文件

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.addons.ui_swing.dialogs.aliases;
24 24
 
25
+import com.dmdirc.actions.ActionManager;
25 26
 import com.dmdirc.actions.ActionSubstitutor;
26 27
 import com.dmdirc.actions.CoreActionType;
27 28
 import com.dmdirc.interfaces.actions.ActionType;
@@ -66,10 +67,10 @@ public class AliasSubstitutionsPanel extends SubstitutionsPanel<ActionType>  {
66 67
             /** {@inheritDoc} */
67 68
             @Override
68 69
             public void run() {
69
-                substitutions = new ArrayList<SubstitutionLabel>();
70
+                substitutions = new ArrayList<>();
70 71
 
71 72
                 if (type != null) {
72
-                    final ActionSubstitutor sub = new ActionSubstitutor(type);
73
+                    final ActionSubstitutor sub = new ActionSubstitutor(ActionManager.getActionManager(), type);
73 74
 
74 75
                     for (final Entry<String, String> entry : sub.getComponentSubstitutions().
75 76
                             entrySet()) {

+ 1
- 1
src/com/dmdirc/addons/ui_swing/dialogs/prefs/URLConfigPanel.java 查看文件

@@ -265,7 +265,7 @@ public class URLConfigPanel extends JPanel implements
265 265
             new StandardInputDialog(controller, parentWindow,
266 266
                     ModalityType.MODELESS, "New URL handler",
267 267
                     "Please enter the name of the new protocol.",
268
-                    new URLProtocolValidator()) {
268
+                    new URLProtocolValidator(controller.getGlobalConfig())) {
269 269
 
270 270
                 /** Serial version UID. */
271 271
                 private static final long serialVersionUID = 1;

正在加载...
取消
保存