Browse Source

Merge pull request #643 from csmith/master

Remove ramaining addLine methods.
pull/644/head
Greg Holmes 8 years ago
parent
commit
331d541057

+ 0
- 17
src/com/dmdirc/FrameContainer.java View File

23
 package com.dmdirc;
23
 package com.dmdirc;
24
 
24
 
25
 import com.dmdirc.commandparser.parsers.CommandParser;
25
 import com.dmdirc.commandparser.parsers.CommandParser;
26
-import com.dmdirc.events.ClientLineAddedEvent;
27
-import com.dmdirc.events.DisplayPropertyMap;
28
 import com.dmdirc.events.FrameClosingEvent;
26
 import com.dmdirc.events.FrameClosingEvent;
29
 import com.dmdirc.events.FrameComponentAddedEvent;
27
 import com.dmdirc.events.FrameComponentAddedEvent;
30
 import com.dmdirc.events.FrameComponentRemovedEvent;
28
 import com.dmdirc.events.FrameComponentRemovedEvent;
38
 import com.dmdirc.ui.input.TabCompleter;
36
 import com.dmdirc.ui.input.TabCompleter;
39
 import com.dmdirc.ui.messages.BackBuffer;
37
 import com.dmdirc.ui.messages.BackBuffer;
40
 import com.dmdirc.ui.messages.BackBufferFactory;
38
 import com.dmdirc.ui.messages.BackBufferFactory;
41
-import com.dmdirc.ui.messages.Formatter;
42
 import com.dmdirc.ui.messages.UnreadStatusManager;
39
 import com.dmdirc.ui.messages.UnreadStatusManager;
43
 import com.dmdirc.util.ChildEventBusManager;
40
 import com.dmdirc.util.ChildEventBusManager;
44
 import com.dmdirc.util.collections.ListenerList;
41
 import com.dmdirc.util.collections.ListenerList;
46
 import java.util.ArrayList;
43
 import java.util.ArrayList;
47
 import java.util.Collection;
44
 import java.util.Collection;
48
 import java.util.Collections;
45
 import java.util.Collections;
49
-import java.util.Date;
50
 import java.util.HashSet;
46
 import java.util.HashSet;
51
 import java.util.List;
47
 import java.util.List;
52
 import java.util.Optional;
48
 import java.util.Optional;
297
         return backBuffer;
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
     @Override
296
     @Override
314
     public void sendLine(final String line) {
297
     public void sendLine(final String line) {
315
         throw new UnsupportedOperationException("Container doesn't override sendLine");
298
         throw new UnsupportedOperationException("Container doesn't override sendLine");

+ 0
- 16
src/com/dmdirc/commandparser/commands/Command.java View File

49
         return controller;
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
      * Sends an output line, if appropriate, to the specified target.
53
      * Sends an output line, if appropriate, to the specified target.
70
      *
54
      *

+ 0
- 10
src/com/dmdirc/interfaces/WindowModel.java View File

140
      */
140
      */
141
     BackBuffer getBackBuffer();
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
      * Sends a line of text to this container's source.
144
      * Sends a line of text to this container's source.
155
      *
145
      *

Loading…
Cancel
Save