Selaa lähdekoodia

Merge pull request #613 from csmith/tidying

Deprecate things that should be replaced by events
pull/615/head
Greg Holmes 8 vuotta sitten
vanhempi
commit
795a31d18f

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

@@ -116,6 +116,7 @@ public class ChannelMap {
116 116
      * @param date        The time of origin of the message.
117 117
      * @param args        The arguments for the message.
118 118
      */
119
+    @Deprecated
119 120
     public void addLineToAll(final String messageType, final Date date, final Object... args) {
120 121
         channels.values().forEach(c -> c.addLine(messageType, date, args));
121 122
     }

+ 4
- 0
src/com/dmdirc/FrameContainer.java Näytä tiedosto

@@ -308,6 +308,7 @@ public abstract class FrameContainer implements WindowModel {
308 308
     }
309 309
 
310 310
     @Override
311
+    @Deprecated
311 312
     public void addLine(final String type, final Date timestamp, final Object... args) {
312 313
         if (type != null && !type.isEmpty()) {
313 314
             addLine(Formatter.formatMessage(getConfigManager(), type, args), timestamp);
@@ -315,11 +316,13 @@ public abstract class FrameContainer implements WindowModel {
315 316
     }
316 317
 
317 318
     @Override
319
+    @Deprecated
318 320
     public void addLine(final String type, final Object... args) {
319 321
         addLine(type, new Date(), args);
320 322
     }
321 323
 
322 324
     @Override
325
+    @Deprecated
323 326
     public void addLine(final String line, final Date timestamp) {
324 327
         for (final String myLine : line.split("\n")) {
325 328
             getBackBuffer().getDocument().addText(
@@ -411,6 +414,7 @@ public abstract class FrameContainer implements WindowModel {
411 414
      * @param messageType The type of message that is being sent
412 415
      * @param args        The arguments for the message
413 416
      */
417
+    @Deprecated
414 418
     public void handleNotification(final Date date, final String messageType, final Object... args) {
415 419
         checkState(writable);
416 420
         messageSinkManager.get().dispatchMessage(this, date, messageType, args);

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

@@ -762,6 +762,7 @@ public class Server extends FrameContainer implements Connection {
762 762
     }
763 763
 
764 764
     @Override
765
+    @Deprecated
765 766
     public void addLineToAll(final String messageType, final Date date,
766 767
             final Object... args) {
767 768
         groupChatManager.addLineToAll(messageType, date, args);

+ 1
- 0
src/com/dmdirc/interfaces/Connection.java Näytä tiedosto

@@ -49,6 +49,7 @@ public interface Connection {
49 49
      * @param date        The date at which the event occurred
50 50
      * @param args        The arguments of the message
51 51
      */
52
+    @Deprecated
52 53
     void addLineToAll(final String messageType, final Date date, final Object... args);
53 54
 
54 55
     /**

+ 3
- 0
src/com/dmdirc/interfaces/WindowModel.java Näytä tiedosto

@@ -150,6 +150,7 @@ public interface WindowModel {
150 150
      *
151 151
      * @since 0.6.4
152 152
      */
153
+    @Deprecated
153 154
     void addLine(String type, Date timestamp, Object... args);
154 155
 
155 156
     /**
@@ -159,6 +160,7 @@ public interface WindowModel {
159 160
      * @param type The message type to use
160 161
      * @param args The message's arguments
161 162
      */
163
+    @Deprecated
162 164
     void addLine(String type, Object... args);
163 165
 
164 166
     /**
@@ -170,6 +172,7 @@ public interface WindowModel {
170 172
      *
171 173
      * @since 0.6.4
172 174
      */
175
+    @Deprecated
173 176
     void addLine(String line, Date timestamp);
174 177
 
175 178
     /**

+ 1
- 0
src/com/dmdirc/ui/messages/sink/AllMessageSink.java Näytä tiedosto

@@ -32,6 +32,7 @@ import javax.inject.Inject;
32 32
 /**
33 33
  * A message sink which adds the message to all of the container's server's children.
34 34
  */
35
+@Deprecated
35 36
 public class AllMessageSink implements MessageSink {
36 37
 
37 38
     /** The pattern to use to match this sink. */

+ 1
- 0
src/com/dmdirc/ui/messages/sink/ChannelMessageSink.java Näytä tiedosto

@@ -37,6 +37,7 @@ import javax.inject.Inject;
37 37
  * for use if the channel does not exist. If no fallback is specified and the channel does not
38 38
  * exist, the message is dispatched to the source.
39 39
  */
40
+@Deprecated
40 41
 public class ChannelMessageSink implements MessageSink {
41 42
 
42 43
     /** The pattern to use to match this sink. */

+ 1
- 0
src/com/dmdirc/ui/messages/sink/CommonChannelsMessageSink.java Näytä tiedosto

@@ -38,6 +38,7 @@ import javax.inject.Inject;
38 38
  * channels with the user. If no fallback is specified and there are no common channels, the message
39 39
  * is dispatched to the source.
40 40
  */
41
+@Deprecated
41 42
 public class CommonChannelsMessageSink implements MessageSink {
42 43
 
43 44
     /** The pattern to use to match this sink. */

+ 1
- 0
src/com/dmdirc/ui/messages/sink/CustomWindowMessageSink.java Näytä tiedosto

@@ -35,6 +35,7 @@ import javax.inject.Inject;
35 35
 /**
36 36
  * A message sink which adds the message to a custom window, creating it if necessary.
37 37
  */
38
+@Deprecated
38 39
 public class CustomWindowMessageSink implements MessageSink {
39 40
 
40 41
     /** The pattern to use to match this sink. */

+ 1
- 0
src/com/dmdirc/ui/messages/sink/ForkMessageSink.java Näytä tiedosto

@@ -32,6 +32,7 @@ import javax.inject.Inject;
32 32
 /**
33 33
  * A message sink which allows the message to be forked into multiple other sinks.
34 34
  */
35
+@Deprecated
35 36
 public class ForkMessageSink implements MessageSink {
36 37
 
37 38
     /** The pattern to use to match this sink. */

+ 1
- 0
src/com/dmdirc/ui/messages/sink/FormatMessageSink.java Näytä tiedosto

@@ -32,6 +32,7 @@ import javax.inject.Inject;
32 32
 /**
33 33
  * A message sink which changes the format of the message and then re-dispatches it.
34 34
  */
35
+@Deprecated
35 36
 public class FormatMessageSink implements MessageSink {
36 37
 
37 38
     /** The pattern to use to match this sink. */

+ 1
- 0
src/com/dmdirc/ui/messages/sink/GroupMessageSink.java Näytä tiedosto

@@ -33,6 +33,7 @@ import javax.inject.Inject;
33 33
  * A message sink which changes the sink to the value of a named configuration setting to allow
34 34
  * grouping of sinks.
35 35
  */
36
+@Deprecated
36 37
 public class GroupMessageSink implements MessageSink {
37 38
 
38 39
     /** The pattern to use to match this sink. */

+ 1
- 0
src/com/dmdirc/ui/messages/sink/LastCommandMessageSink.java Näytä tiedosto

@@ -35,6 +35,7 @@ import javax.inject.Inject;
35 35
  * A message sink which adds the message to the window where a command matching the provided regex
36 36
  * was most recently executed. If no such window is found, falls back to the source.
37 37
  */
38
+@Deprecated
38 39
 public class LastCommandMessageSink implements MessageSink {
39 40
 
40 41
     /** The pattern to use to match this sink. */

+ 1
- 0
src/com/dmdirc/ui/messages/sink/MessageSink.java Näytä tiedosto

@@ -30,6 +30,7 @@ import java.util.regex.Pattern;
30 30
 /**
31 31
  * Represents a possible destination (sink) for a generic DMDirc message.
32 32
  */
33
+@Deprecated
33 34
 public interface MessageSink {
34 35
 
35 36
     /**

+ 1
- 0
src/com/dmdirc/ui/messages/sink/MessageSinkManager.java Näytä tiedosto

@@ -37,6 +37,7 @@ import static com.dmdirc.util.LogUtils.USER_ERROR;
37 37
 /**
38 38
  * Manages message sinks and facilitates dispatching of messages to sinks.
39 39
  */
40
+@Deprecated
40 41
 public class MessageSinkManager {
41 42
 
42 43
     private static final Logger LOG = LoggerFactory.getLogger(MessageSinkManager.class);

+ 1
- 0
src/com/dmdirc/ui/messages/sink/MessagesModule.java Näytä tiedosto

@@ -34,6 +34,7 @@ import dagger.Provides;
34 34
 /**
35 35
  * Module for dependency injecting the {@link MessageSinkManager} and its default sinks.
36 36
  */
37
+@Deprecated
37 38
 @Module(library = true, complete = false)
38 39
 public class MessagesModule {
39 40
 

+ 1
- 0
src/com/dmdirc/ui/messages/sink/NullMessageSink.java Näytä tiedosto

@@ -32,6 +32,7 @@ import javax.inject.Inject;
32 32
 /**
33 33
  * A message sink which does nothing with the message.
34 34
  */
35
+@Deprecated
35 36
 public class NullMessageSink implements MessageSink {
36 37
 
37 38
     /** The pattern to use to match this sink. */

+ 1
- 0
src/com/dmdirc/ui/messages/sink/SelfMessageSink.java Näytä tiedosto

@@ -32,6 +32,7 @@ import javax.inject.Inject;
32 32
 /**
33 33
  * A message sink which adds the message to the container that dispatched it.
34 34
  */
35
+@Deprecated
35 36
 public class SelfMessageSink implements MessageSink {
36 37
 
37 38
     /** The pattern to use to match this sink. */

+ 1
- 0
src/com/dmdirc/ui/messages/sink/ServerMessageSink.java Näytä tiedosto

@@ -32,6 +32,7 @@ import javax.inject.Inject;
32 32
 /**
33 33
  * A message sink which adds the message to the container's server.
34 34
  */
35
+@Deprecated
35 36
 public class ServerMessageSink implements MessageSink {
36 37
 
37 38
     /** The pattern to use to match this sink. */

+ 1
- 0
src/com/dmdirc/ui/messages/sink/StatusBarMessageSink.java Näytä tiedosto

@@ -36,6 +36,7 @@ import javax.inject.Inject;
36 36
 /**
37 37
  * A message sink which adds the message to the status bar.
38 38
  */
39
+@Deprecated
39 40
 public class StatusBarMessageSink implements MessageSink {
40 41
 
41 42
     /** The pattern to use to match this sink. */

Loading…
Peruuta
Tallenna