Browse Source

Remove annotations library.

Change-Id: I93945d27c14569581d0d0dcd7dcc32fe6eb32fee
Reviewed-on: http://gerrit.dmdirc.com/3731
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
changes/31/3731/4
Greg Holmes 9 years ago
parent
commit
32d11c6692

+ 0
- 1
ivy.xml View File

@@ -19,7 +19,6 @@
19 19
         <dependency org="org.slf4j" name="slf4j-api" rev="1.+" conf="main->default" />
20 20
 
21 21
         <!-- Main - ui_swing -->
22
-        <dependency org="com.dmdirc" name="annotations" rev="[0.6.1,)" conf="main->default" />
23 22
         <dependency org="com.miglayout" name="miglayout-swing" rev="4.+" conf="main->default" />
24 23
         <dependency org="org.swinglabs" name="jxlayer" rev="3.+" conf="main->default" />
25 24
         <dependency org="com.greboid.libraries" name="locksupport" rev="latest.release" conf="main->default" />

+ 4
- 5
src/com/dmdirc/addons/ui_swing/components/addonbrowser/DataLoaderWorker.java View File

@@ -33,7 +33,6 @@ import com.dmdirc.interfaces.config.AggregateConfigProvider;
33 33
 import com.dmdirc.logger.ErrorLevel;
34 34
 import com.dmdirc.updater.manager.UpdateManager;
35 35
 import com.dmdirc.util.URLBuilder;
36
-import com.dmdirc.util.annotations.factory.Unbound;
37 36
 import com.dmdirc.util.io.ConfigFile;
38 37
 import com.dmdirc.util.io.DownloadListener;
39 38
 import com.dmdirc.util.io.Downloader;
@@ -112,10 +111,10 @@ public class DataLoaderWorker
112 111
             final UpdateManager updateManager,
113 112
             @SuppressWarnings("qualifiers") @Directory(DirectoryType.TEMPORARY) final String tempDirectory,
114 113
             final EventBus eventBus,
115
-            @Unbound final AddonTable table,
116
-            @Unbound final boolean download,
117
-            @Unbound final BrowserWindow browserWindow,
118
-            @Unbound final JScrollPane scrollPane) {
114
+            final AddonTable table,
115
+            final boolean download,
116
+            final BrowserWindow browserWindow,
117
+            final JScrollPane scrollPane) {
119 118
         super(eventBus);
120 119
         this.downloader = downloader;
121 120
         this.globalConfig = globalConfig;

+ 2
- 3
src/com/dmdirc/addons/ui_swing/components/addonbrowser/InstallWorker.java View File

@@ -27,7 +27,6 @@ import com.dmdirc.addons.ui_swing.components.LoggingSwingWorker;
27 27
 import com.dmdirc.commandline.CommandLineOptionsModule.Directory;
28 28
 import com.dmdirc.commandline.CommandLineOptionsModule.DirectoryType;
29 29
 import com.dmdirc.plugins.PluginManager;
30
-import com.dmdirc.util.annotations.factory.Unbound;
31 30
 import com.dmdirc.util.io.Downloader;
32 31
 
33 32
 import com.google.common.eventbus.EventBus;
@@ -63,8 +62,8 @@ public class InstallWorker extends LoggingSwingWorker<String, Void> {
63 62
             @SuppressWarnings("qualifiers") @Directory(DirectoryType.THEMES) final String themeDirectory,
64 63
             final PluginManager pluginManager,
65 64
             final EventBus eventBus,
66
-            @Unbound final AddonInfo info,
67
-            @Unbound final InstallerWindow window) {
65
+            final AddonInfo info,
66
+            final InstallerWindow window) {
68 67
         super(eventBus);
69 68
         this.downloader = downloader;
70 69
         this.info = info;

+ 1
- 4
src/com/dmdirc/addons/ui_swing/dialogs/url/URLDialog.java View File

@@ -31,8 +31,6 @@ import com.dmdirc.addons.ui_swing.injection.MainWindow;
31 31
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
32 32
 import com.dmdirc.interfaces.config.ConfigProvider;
33 33
 import com.dmdirc.ui.core.util.URLHandler;
34
-import com.dmdirc.util.annotations.factory.Factory;
35
-import com.dmdirc.util.annotations.factory.Unbound;
36 34
 
37 35
 import java.awt.Window;
38 36
 import java.awt.event.ActionEvent;
@@ -44,7 +42,6 @@ import javax.swing.JButton;
44 42
 import net.miginfocom.swing.MigLayout;
45 43
 
46 44
 /** URL Protocol dialog. */
47
-@Factory(inject = true, singleton = true)
48 45
 public class URLDialog extends StandardDialog implements ActionListener {
49 46
 
50 47
     /** Serial version UID. */
@@ -70,7 +67,7 @@ public class URLDialog extends StandardDialog implements ActionListener {
70 67
      * @param urlHandler   The URL Handler to use to handle clicked links
71 68
      */
72 69
     public URLDialog(
73
-            @Unbound final URI url,
70
+            final URI url,
74 71
             @SuppressWarnings("qualifiers") @GlobalConfig final AggregateConfigProvider global,
75 72
             @SuppressWarnings("qualifiers") @UserConfig final ConfigProvider config,
76 73
             @SuppressWarnings("qualifiers") @MainWindow final Window parentWindow,

+ 61
- 0
src/com/dmdirc/addons/ui_swing/dialogs/url/URLDialogFactory.java View File

@@ -0,0 +1,61 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
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
+package com.dmdirc.addons.ui_swing.dialogs.url;
24
+
25
+import com.dmdirc.ClientModule;
26
+import com.dmdirc.addons.ui_swing.injection.MainWindow;
27
+import com.dmdirc.interfaces.config.AggregateConfigProvider;
28
+import com.dmdirc.interfaces.config.ConfigProvider;
29
+import com.dmdirc.ui.core.util.URLHandler;
30
+
31
+import java.awt.Window;
32
+import java.net.URI;
33
+
34
+import javax.inject.Inject;
35
+
36
+/**
37
+ * Factory for {@link URLDialogFactory}s
38
+ */
39
+public class URLDialogFactory {
40
+
41
+    private final AggregateConfigProvider global;
42
+    private final ConfigProvider config;
43
+    private final Window parentWindow;
44
+    private final URLHandler urlHandler;
45
+
46
+    @Inject
47
+    public URLDialogFactory(
48
+            @SuppressWarnings("qualifiers") @ClientModule.GlobalConfig final AggregateConfigProvider global,
49
+            @SuppressWarnings("qualifiers") @ClientModule.UserConfig final ConfigProvider config,
50
+            @SuppressWarnings("qualifiers") @MainWindow final Window parentWindow,
51
+            final URLHandler urlHandler) {
52
+        this.global = global;
53
+        this.config = config;
54
+        this.parentWindow = parentWindow;
55
+        this.urlHandler = urlHandler;
56
+    }
57
+
58
+    public URLDialog getURLDialog(final URI uri) {
59
+        return new URLDialog(uri, global, config, parentWindow, urlHandler);
60
+    }
61
+}

Loading…
Cancel
Save