Skip to content

Commit

Permalink
Remove ramaining addLine methods.
Browse files Browse the repository at this point in the history
Closes #426
  • Loading branch information
csmith committed Feb 16, 2016
1 parent f6b4724 commit a3b2815
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 43 deletions.
17 changes: 0 additions & 17 deletions src/com/dmdirc/FrameContainer.java
Expand Up @@ -23,8 +23,6 @@
package com.dmdirc;

import com.dmdirc.commandparser.parsers.CommandParser;
import com.dmdirc.events.ClientLineAddedEvent;
import com.dmdirc.events.DisplayPropertyMap;
import com.dmdirc.events.FrameClosingEvent;
import com.dmdirc.events.FrameComponentAddedEvent;
import com.dmdirc.events.FrameComponentRemovedEvent;
Expand All @@ -38,15 +36,13 @@
import com.dmdirc.ui.input.TabCompleter;
import com.dmdirc.ui.messages.BackBuffer;
import com.dmdirc.ui.messages.BackBufferFactory;
import com.dmdirc.ui.messages.Formatter;
import com.dmdirc.ui.messages.UnreadStatusManager;
import com.dmdirc.util.ChildEventBusManager;
import com.dmdirc.util.collections.ListenerList;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Optional;
Expand Down Expand Up @@ -297,19 +293,6 @@ public BackBuffer getBackBuffer() {
return backBuffer;
}

@Override
@Deprecated
public void addLine(final String type, final Object... args) {
if (type != null && !type.isEmpty()) {
final String line = Formatter.formatMessage(getConfigManager(), type, args);
final long time = new Date().getTime();
for (final String myLine : line.split("\n")) {
getBackBuffer().getDocument().addText(time, DisplayPropertyMap.EMPTY, myLine);
eventBus.publishAsync(new ClientLineAddedEvent(this, myLine));
}
}
}

@Override
public void sendLine(final String line) {
throw new UnsupportedOperationException("Container doesn't override sendLine");
Expand Down
16 changes: 0 additions & 16 deletions src/com/dmdirc/commandparser/commands/Command.java
Expand Up @@ -49,22 +49,6 @@ protected CommandController getController() {
return controller;
}

/**
* Sends a line, if appropriate, to the specified target.
*
* @param target The command window to send the line to
* @param isSilent Whether this command is being silenced or not
* @param type The type of message to send
* @param args The arguments of the message
*/
@Deprecated
protected final void sendLine(@Nullable final WindowModel target,
final boolean isSilent, final String type, final Object... args) {
if (!isSilent && target != null) {
target.addLine(type, args);
}
}

/**
* Sends an output line, if appropriate, to the specified target.
*
Expand Down
10 changes: 0 additions & 10 deletions src/com/dmdirc/interfaces/WindowModel.java
Expand Up @@ -140,16 +140,6 @@ public interface WindowModel {
*/
BackBuffer getBackBuffer();

/**
* Adds a line to this container's window. If the window is null for some reason, the line is
* silently discarded.
*
* @param type The message type to use
* @param args The message's arguments
*/
@Deprecated
void addLine(String type, Object... args);

/**
* Sends a line of text to this container's source.
*
Expand Down

0 comments on commit a3b2815

Please sign in to comment.