Bladeren bron

Remove ramaining addLine methods.

Closes #426
pull/643/head
Chris Smith 8 jaren geleden
bovenliggende
commit
a3b2815d16

+ 0
- 17
src/com/dmdirc/FrameContainer.java Bestand weergeven

@@ -23,8 +23,6 @@
23 23
 package com.dmdirc;
24 24
 
25 25
 import com.dmdirc.commandparser.parsers.CommandParser;
26
-import com.dmdirc.events.ClientLineAddedEvent;
27
-import com.dmdirc.events.DisplayPropertyMap;
28 26
 import com.dmdirc.events.FrameClosingEvent;
29 27
 import com.dmdirc.events.FrameComponentAddedEvent;
30 28
 import com.dmdirc.events.FrameComponentRemovedEvent;
@@ -38,7 +36,6 @@ import com.dmdirc.parser.common.CompositionState;
38 36
 import com.dmdirc.ui.input.TabCompleter;
39 37
 import com.dmdirc.ui.messages.BackBuffer;
40 38
 import com.dmdirc.ui.messages.BackBufferFactory;
41
-import com.dmdirc.ui.messages.Formatter;
42 39
 import com.dmdirc.ui.messages.UnreadStatusManager;
43 40
 import com.dmdirc.util.ChildEventBusManager;
44 41
 import com.dmdirc.util.collections.ListenerList;
@@ -46,7 +43,6 @@ import com.dmdirc.util.collections.ListenerList;
46 43
 import java.util.ArrayList;
47 44
 import java.util.Collection;
48 45
 import java.util.Collections;
49
-import java.util.Date;
50 46
 import java.util.HashSet;
51 47
 import java.util.List;
52 48
 import java.util.Optional;
@@ -297,19 +293,6 @@ public abstract class FrameContainer implements WindowModel {
297 293
         return backBuffer;
298 294
     }
299 295
 
300
-    @Override
301
-    @Deprecated
302
-    public void addLine(final String type, final Object... args) {
303
-        if (type != null && !type.isEmpty()) {
304
-            final String line = Formatter.formatMessage(getConfigManager(), type, args);
305
-            final long time = new Date().getTime();
306
-            for (final String myLine : line.split("\n")) {
307
-                getBackBuffer().getDocument().addText(time, DisplayPropertyMap.EMPTY, myLine);
308
-                eventBus.publishAsync(new ClientLineAddedEvent(this, myLine));
309
-            }
310
-        }
311
-    }
312
-
313 296
     @Override
314 297
     public void sendLine(final String line) {
315 298
         throw new UnsupportedOperationException("Container doesn't override sendLine");

+ 0
- 16
src/com/dmdirc/commandparser/commands/Command.java Bestand weergeven

@@ -49,22 +49,6 @@ public abstract class Command {
49 49
         return controller;
50 50
     }
51 51
 
52
-    /**
53
-     * Sends a line, if appropriate, to the specified target.
54
-     *
55
-     * @param target   The command window to send the line to
56
-     * @param isSilent Whether this command is being silenced or not
57
-     * @param type     The type of message to send
58
-     * @param args     The arguments of the message
59
-     */
60
-    @Deprecated
61
-    protected final void sendLine(@Nullable final WindowModel target,
62
-            final boolean isSilent, final String type, final Object... args) {
63
-        if (!isSilent && target != null) {
64
-            target.addLine(type, args);
65
-        }
66
-    }
67
-
68 52
     /**
69 53
      * Sends an output line, if appropriate, to the specified target.
70 54
      *

+ 0
- 10
src/com/dmdirc/interfaces/WindowModel.java Bestand weergeven

@@ -140,16 +140,6 @@ public interface WindowModel {
140 140
      */
141 141
     BackBuffer getBackBuffer();
142 142
 
143
-    /**
144
-     * Adds a line to this container's window. If the window is null for some reason, the line is
145
-     * silently discarded.
146
-     *
147
-     * @param type The message type to use
148
-     * @param args The message's arguments
149
-     */
150
-    @Deprecated
151
-    void addLine(String type, Object... args);
152
-
153 143
     /**
154 144
      * Sends a line of text to this container's source.
155 145
      *

Laden…
Annuleren
Opslaan