Skip to content

Commit

Permalink
Remove the debug console window
Browse files Browse the repository at this point in the history
  • Loading branch information
DanVanAtta committed Dec 14, 2020
1 parent 74fc335 commit b4b885d
Show file tree
Hide file tree
Showing 17 changed files with 2 additions and 652 deletions.
Expand Up @@ -138,7 +138,6 @@ public abstract class ClientSetting<T> implements GameSetting<T> {
new BooleanClientSetting("SHOW_CHAT_TIME");
public static final BooleanClientSetting showCommentLog =
new BooleanClientSetting("SHOW_COMMENT_LOG");
public static final ClientSetting<Boolean> showConsole = new BooleanClientSetting("SHOW_CONSOLE");
public static final BooleanClientSetting soundEnabled =
new BooleanClientSetting("SOUND_ENABLED", true);
public static final ClientSetting<Boolean> firstTimeThisVersion =
Expand Down
Expand Up @@ -278,16 +278,6 @@ public SelectionComponent<JComponent> newSelectionComponent() {
}
},

SHOW_CONSOLE_BINDING(
"Show Console",
SettingType.GAME,
"Shows the TripleA console, closing the window will turn this setting off") {
@Override
public SelectionComponent<JComponent> newSelectionComponent() {
return booleanRadioButtons(ClientSetting.showConsole);
}
},

MAP_LIST_OVERRIDE_BINDING(
"Map List Override",
SettingType.TESTING,
Expand Down
Expand Up @@ -2,7 +2,6 @@

import games.strategy.engine.player.Player;
import games.strategy.triplea.ai.pro.AbstractProAi;
import games.strategy.triplea.settings.ClientSetting;
import games.strategy.triplea.ui.TripleAFrame;
import java.awt.event.KeyEvent;
import java.util.Set;
Expand All @@ -24,8 +23,5 @@ final class DebugMenu extends JMenu {
add(SwingAction.of("Show Hard AI Logs", AbstractProAi::showSettingsWindow))
.setMnemonic(KeyEvent.VK_X);
}

add(SwingAction.of("Show Console", () -> ClientSetting.showConsole.setValueAndFlush(true)))
.setMnemonic(KeyEvent.VK_C);
}
}
Expand Up @@ -89,10 +89,6 @@ public LobbyMenu(final LobbyFrame frame) {
"Send Bug Report",
'B',
() -> SwingComponents.newOpenUrlConfirmationDialog(UrlConstants.GITHUB_ISSUES))
.addMenuItem(
"Open Debug Console", //
'C',
() -> ClientSetting.showConsole.setValueAndFlush(true))
.build());
}
}
Expand Up @@ -2,7 +2,6 @@

import games.strategy.engine.data.GameData;
import games.strategy.triplea.UrlConstants;
import games.strategy.triplea.settings.ClientSetting;
import games.strategy.triplea.ui.UiContext;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
Expand All @@ -20,9 +19,6 @@ public final class HelpMenu {
"Send Bug Report",
e -> SwingComponents.newOpenUrlConfirmationDialog(UrlConstants.GITHUB_ISSUES));

private static final Action openDebugConsole =
SwingAction.of("Open Debug Console", e -> ClientSetting.showConsole.setValueAndFlush(true));

private static final Action gameLicenseMenu =
SwingAction.of(
"License",
Expand Down Expand Up @@ -50,8 +46,6 @@ public static JMenu buildMenu(final UiContext uiContext, final GameData gameData

menu.add(gameLicenseMenu).setMnemonic(KeyEvent.VK_I);

menu.add(openDebugConsole).setMnemonic(KeyEvent.VK_C);

menu.add(bugReportMenu).setMnemonic(KeyEvent.VK_B);

return menu;
Expand Down
3 changes: 0 additions & 3 deletions game-core/src/main/java/org/triplea/debug/ErrorMessage.java
Expand Up @@ -7,7 +7,6 @@
import java.awt.event.WindowEvent;
import java.net.URI;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.logging.LogManager;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
Expand Down Expand Up @@ -36,7 +35,6 @@
public enum ErrorMessage {
INSTANCE;

private static final String DEFAULT_LOGGER = "";
private final JFrame windowReference = new JFrame("TripleA Error");
private final JEditorPaneWithClickableLinks errorMessage = new JEditorPaneWithClickableLinks("");
private final AtomicBoolean isVisible = new AtomicBoolean(false);
Expand Down Expand Up @@ -99,7 +97,6 @@ public static void initialize() {
+ "be errors rendering swing components. Check the call flow to this point and make "
+ "sure we do not enable error reporting unless we are in a non-headless environment");
INSTANCE.enableErrorPopup = true;
LogManager.getLogManager().getLogger(DEFAULT_LOGGER).addHandler(new ErrorMessageHandler());
}

/**
Expand Down
45 changes: 0 additions & 45 deletions game-core/src/main/java/org/triplea/debug/ErrorMessageHandler.java

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit b4b885d

Please sign in to comment.