Consistently capitalize RuneLite
This commit is contained in:
@@ -44,12 +44,12 @@ public class ClientLoader
|
||||
{
|
||||
if (isOutdated)
|
||||
{
|
||||
log.info("Runelite is outdated - fetching vanilla client");
|
||||
log.info("RuneLite is outdated - fetching vanilla client");
|
||||
return Optional.of(loadVanilla());
|
||||
}
|
||||
|
||||
log.debug("Runelite is up to date");
|
||||
return Optional.of(loadRunelite());
|
||||
log.debug("RuneLite is up to date");
|
||||
return Optional.of(loadRuneLite());
|
||||
}
|
||||
catch (IOException | ClassNotFoundException | InstantiationException | IllegalAccessException e)
|
||||
{
|
||||
@@ -65,7 +65,7 @@ public class ClientLoader
|
||||
}
|
||||
}
|
||||
|
||||
private Applet loadRunelite() throws ClassNotFoundException, IOException, InstantiationException, IllegalAccessException
|
||||
private Applet loadRuneLite() throws ClassNotFoundException, IOException, InstantiationException, IllegalAccessException
|
||||
{
|
||||
ConfigLoader config = new ConfigLoader();
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import net.runelite.http.api.RuneliteAPI;
|
||||
import net.runelite.http.api.RuneLiteAPI;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
@@ -51,7 +51,7 @@ public class ConfigLoader
|
||||
.url(CONFIG_URL)
|
||||
.build();
|
||||
|
||||
try (Response response = RuneliteAPI.CLIENT.newCall(request).execute();
|
||||
try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute();
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(response.body().byteStream())))
|
||||
{
|
||||
String str;
|
||||
|
||||
@@ -58,7 +58,7 @@ public class RuneLite
|
||||
private static OptionSet options;
|
||||
|
||||
@Inject
|
||||
private RuneliteProperties properties;
|
||||
private RuneLiteProperties properties;
|
||||
|
||||
@Inject
|
||||
private PluginManager pluginManager;
|
||||
@@ -98,13 +98,13 @@ public class RuneLite
|
||||
|
||||
PROFILES_DIR.mkdirs();
|
||||
|
||||
setInjector(Guice.createInjector(new RuneliteModule()));
|
||||
setInjector(Guice.createInjector(new RuneLiteModule()));
|
||||
injector.getInstance(RuneLite.class).start();
|
||||
}
|
||||
|
||||
public void start() throws Exception
|
||||
{
|
||||
// Load Runelite or Vanilla client
|
||||
// Load RuneLite or Vanilla client
|
||||
final boolean hasRs = !getOptions().has("no-rs");
|
||||
final Optional<Applet> optionalClient = hasRs
|
||||
? new ClientLoader().loadRs()
|
||||
|
||||
@@ -36,7 +36,6 @@ import net.runelite.api.Client;
|
||||
import net.runelite.client.account.SessionManager;
|
||||
import net.runelite.client.chat.ChatMessageManager;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.config.RuneliteConfig;
|
||||
import net.runelite.client.game.ItemManager;
|
||||
import net.runelite.client.menus.MenuManager;
|
||||
import net.runelite.client.plugins.PluginManager;
|
||||
@@ -44,9 +43,10 @@ import net.runelite.client.task.Scheduler;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
|
||||
import net.runelite.client.util.QueryRunner;
|
||||
import net.runelite.client.config.RuneLiteConfig;
|
||||
|
||||
@Slf4j
|
||||
public class RuneliteModule extends AbstractModule
|
||||
public class RuneLiteModule extends AbstractModule
|
||||
{
|
||||
@Override
|
||||
protected void configure()
|
||||
@@ -59,7 +59,7 @@ public class RuneliteModule extends AbstractModule
|
||||
bind(InfoBoxManager.class);
|
||||
bind(Scheduler.class);
|
||||
bind(PluginManager.class);
|
||||
bind(RuneliteProperties.class);
|
||||
bind(RuneLiteProperties.class);
|
||||
bind(SessionManager.class);
|
||||
}
|
||||
|
||||
@@ -83,16 +83,16 @@ public class RuneliteModule extends AbstractModule
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
RuneliteConfig provideConfig(ConfigManager configManager)
|
||||
RuneLiteConfig provideConfig(ConfigManager configManager)
|
||||
{
|
||||
return configManager.getConfig(RuneliteConfig.class);
|
||||
return configManager.getConfig(RuneLiteConfig.class);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
EventBus provideEventBus()
|
||||
{
|
||||
return new EventBus(RuneliteModule::eventExceptionHandler);
|
||||
return new EventBus(RuneLiteModule::eventExceptionHandler);
|
||||
}
|
||||
|
||||
private static void eventExceptionHandler(Throwable exception, SubscriberExceptionContext context)
|
||||
@@ -34,7 +34,7 @@ import javax.inject.Singleton;
|
||||
|
||||
@Singleton
|
||||
@Slf4j
|
||||
public class RuneliteProperties
|
||||
public class RuneLiteProperties
|
||||
{
|
||||
private static final String RUNELITE_TITLE = "runelite.title";
|
||||
private static final String RUNELITE_VERSION = "runelite.version";
|
||||
@@ -42,7 +42,7 @@ public class RuneliteProperties
|
||||
private final Properties properties = new Properties();
|
||||
|
||||
@Inject
|
||||
public RuneliteProperties()
|
||||
public RuneLiteProperties()
|
||||
{
|
||||
InputStream in = getClass().getResourceAsStream("runelite.properties");
|
||||
try
|
||||
@@ -32,7 +32,7 @@ import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.http.api.RuneliteAPI;
|
||||
import net.runelite.http.api.RuneLiteAPI;
|
||||
import net.runelite.http.api.ws.WebsocketGsonFactory;
|
||||
import net.runelite.http.api.ws.WebsocketMessage;
|
||||
import net.runelite.http.api.ws.messages.Handshake;
|
||||
@@ -72,7 +72,7 @@ public class WSClient extends WebSocketListener implements AutoCloseable
|
||||
public void connect()
|
||||
{
|
||||
Request request = new Request.Builder()
|
||||
.url(RuneliteAPI.getWsEndpoint())
|
||||
.url(RuneLiteAPI.getWsEndpoint())
|
||||
.build();
|
||||
|
||||
webSocket = client.newWebSocket(request, this);
|
||||
|
||||
@@ -46,9 +46,9 @@ import net.runelite.api.ChatMessageType;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.MessageNode;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.client.config.RuneliteConfig;
|
||||
import net.runelite.client.events.ResizeableChanged;
|
||||
import net.runelite.client.events.VarbitChanged;
|
||||
import net.runelite.client.config.RuneLiteConfig;
|
||||
|
||||
@Slf4j
|
||||
@Singleton
|
||||
@@ -57,12 +57,12 @@ public class ChatMessageManager
|
||||
private final Map<ChatMessageType, Set<ChatColor>> colorCache = new HashMap<>();
|
||||
private final Provider<Client> clientProvider;
|
||||
private final ScheduledExecutorService executor;
|
||||
private final RuneliteConfig config;
|
||||
private final RuneLiteConfig config;
|
||||
private int transparancyVarbit = -1;
|
||||
private final Queue<QueuedMessage> queuedMessages = new ConcurrentLinkedQueue<>();
|
||||
|
||||
@Inject
|
||||
public ChatMessageManager(Provider<Client> clientProvider, ScheduledExecutorService executor, RuneliteConfig config)
|
||||
public ChatMessageManager(Provider<Client> clientProvider, ScheduledExecutorService executor, RuneLiteConfig config)
|
||||
{
|
||||
this.clientProvider = clientProvider;
|
||||
this.executor = executor;
|
||||
|
||||
@@ -222,7 +222,7 @@ public class ConfigManager
|
||||
|
||||
try (FileOutputStream out = new FileOutputStream(propertiesFile))
|
||||
{
|
||||
properties.store(out, "Runelite configuration");
|
||||
properties.store(out, "RuneLite configuration");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ package net.runelite.client.config;
|
||||
|
||||
@ConfigGroup(
|
||||
keyName = "runelite",
|
||||
name = "Runelite",
|
||||
description = "Configuration for Runelite client options"
|
||||
name = "RuneLite",
|
||||
description = "Configuration for RuneLite client options"
|
||||
)
|
||||
public interface RuneliteConfig extends Config
|
||||
public interface RuneLiteConfig extends Config
|
||||
{
|
||||
@ConfigItem(
|
||||
keyName = "chatCommandsRecolorEnabled",
|
||||
@@ -45,7 +45,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.RuneLite;
|
||||
import net.runelite.client.config.Config;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.config.RuneliteConfig;
|
||||
import net.runelite.client.config.RuneLiteConfig;
|
||||
|
||||
@Singleton
|
||||
@Slf4j
|
||||
@@ -53,7 +53,7 @@ public class PluginWatcher extends Thread
|
||||
{
|
||||
private static final File BASE = RuneLite.PLUGIN_DIR;
|
||||
|
||||
private final RuneliteConfig runeliteConfig;
|
||||
private final RuneLiteConfig runeliteConfig;
|
||||
private final PluginManager pluginManager;
|
||||
private final WatchService watchService;
|
||||
private final WatchKey watchKey;
|
||||
@@ -62,7 +62,7 @@ public class PluginWatcher extends Thread
|
||||
private ConfigManager configManager;
|
||||
|
||||
@Inject
|
||||
public PluginWatcher(RuneliteConfig runeliteConfig, PluginManager pluginManager) throws IOException
|
||||
public PluginWatcher(RuneLiteConfig runeliteConfig, PluginManager pluginManager) throws IOException
|
||||
{
|
||||
this.runeliteConfig = runeliteConfig;
|
||||
this.pluginManager = pluginManager;
|
||||
|
||||
@@ -58,7 +58,7 @@ import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.GameState;
|
||||
import net.runelite.client.RuneliteProperties;
|
||||
import net.runelite.client.RuneLiteProperties;
|
||||
import org.pushingpixels.substance.api.skin.SubstanceGraphiteLookAndFeel;
|
||||
import org.pushingpixels.substance.internal.ui.SubstanceRootPaneUI;
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ClientUI extends JFrame
|
||||
private TrayIcon trayIcon;
|
||||
|
||||
private final Applet client;
|
||||
private final RuneliteProperties properties;
|
||||
private final RuneLiteProperties properties;
|
||||
private JPanel container;
|
||||
private JPanel navContainer;
|
||||
private PluginToolbar pluginToolbar;
|
||||
@@ -96,7 +96,7 @@ public class ClientUI extends JFrame
|
||||
ICON = icon;
|
||||
}
|
||||
|
||||
public static ClientUI create(RuneliteProperties properties, Applet client)
|
||||
public static ClientUI create(RuneLiteProperties properties, Applet client)
|
||||
{
|
||||
// Force heavy-weight popups/tooltips.
|
||||
// Prevents them from being obscured by the game applet.
|
||||
@@ -131,7 +131,7 @@ public class ClientUI extends JFrame
|
||||
return new ClientUI(properties, client);
|
||||
}
|
||||
|
||||
private ClientUI(RuneliteProperties properties, Applet client)
|
||||
private ClientUI(RuneLiteProperties properties, Applet client)
|
||||
{
|
||||
this.properties = properties;
|
||||
this.client = client;
|
||||
|
||||
@@ -27,12 +27,12 @@ package net.runelite.client;
|
||||
import com.google.inject.Guice;
|
||||
import org.junit.Test;
|
||||
|
||||
public class RuneliteModuleTest
|
||||
public class RuneLiteModuleTest
|
||||
{
|
||||
@Test
|
||||
public void testConfigure()
|
||||
{
|
||||
Guice.createInjector(new RuneliteModule());
|
||||
Guice.createInjector(new RuneLiteModule());
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ConfigManagerTest
|
||||
|
||||
@Mock
|
||||
@Bind
|
||||
RuneliteConfig runeliteConfig;
|
||||
RuneLiteConfig runeliteConfig;
|
||||
|
||||
@Inject
|
||||
ConfigManager manager;
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import joptsimple.OptionSet;
|
||||
import net.runelite.client.RuneLite;
|
||||
import net.runelite.client.RuneliteModule;
|
||||
import net.runelite.client.RuneLiteModule;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
@@ -61,7 +61,7 @@ public class PluginManagerTest
|
||||
{
|
||||
RuneLite.setOptions(mock(OptionSet.class));
|
||||
|
||||
Injector injector = Guice.createInjector(new RuneliteModule(),
|
||||
Injector injector = Guice.createInjector(new RuneLiteModule(),
|
||||
BoundFieldModule.of(this));
|
||||
RuneLite.setInjector(injector);
|
||||
// test with no client bound
|
||||
@@ -82,7 +82,7 @@ public class PluginManagerTest
|
||||
{
|
||||
List<Module> modules = new ArrayList<>();
|
||||
modules.add(new GraphvizModule());
|
||||
modules.add(new RuneliteModule());
|
||||
modules.add(new RuneLiteModule());
|
||||
|
||||
PluginManager pluginManager = new PluginManager();
|
||||
pluginManager.loadCorePlugins();
|
||||
|
||||
Reference in New Issue
Block a user