+ Added file updating
This commit is contained in:
@@ -30,6 +30,8 @@ public class CommandBenchmark extends Command
|
|||||||
@Override
|
@Override
|
||||||
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
|
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
|
||||||
{
|
{
|
||||||
|
framework.Update();
|
||||||
|
|
||||||
if(input.args == null || input.args.length() == 0)
|
if(input.args == null || input.args.length() == 0)
|
||||||
{
|
{
|
||||||
String output = HelpText();
|
String output = HelpText();
|
||||||
|
|||||||
@@ -28,6 +28,14 @@ public class BenchmarkFramework
|
|||||||
return ExecuteCommand(input.key, input);
|
return ExecuteCommand(input.key, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Update()
|
||||||
|
{
|
||||||
|
synchronized(benchmarkManager)
|
||||||
|
{
|
||||||
|
benchmarkManager.Update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Registers a command
|
// Registers a command
|
||||||
private void RegisterCommand(String commandName, BenchmarkCommand command)
|
private void RegisterCommand(String commandName, BenchmarkCommand command)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -174,7 +174,10 @@ public class BenchmarkManager
|
|||||||
private void OnRescan(MonitoredFile file)
|
private void OnRescan(MonitoredFile file)
|
||||||
{
|
{
|
||||||
// For now, all we need is to note that something was adjusted.
|
// For now, all we need is to note that something was adjusted.
|
||||||
if(file.path.endsWith(extension))
|
if(file.path.toString().contains(extension))
|
||||||
|
{
|
||||||
|
BenchmarkLog.Log("File status changed: " + file.path);
|
||||||
needsUpdate = true;
|
needsUpdate = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user