Start off with the simple stuff, just providing unitialised managers
and having Main do all the wiring. Update the tests to match.
Change-Id: I0e86451a7a719d514fa1fed0c79aa4fe45134477
Reviewed-on: http://gerrit.dmdirc.com/2679
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Do the same as the IdentityManager, to make it easier to DI later.
Change-Id: I29e96fa04615fa86c028b384ccd26a7a53fee6cf
Reviewed-on: http://gerrit.dmdirc.com/2678
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Instead, have Main provide the instance which becomes the
singleton. This allows us to inject dependencies to it, and
construct it using dagger later, while keeping all of the
code that calls the static getIdentityManager() method working.
Change-Id: I4ceaa062c84509bed66824f39cca8e76d25d131c
Reviewed-on: http://gerrit.dmdirc.com/2677
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Currently we pass in an IdentityManager which it uses to
construct the plugin directory itself, which is odd...
Also keep the reference given to the IdentityManager and
use it in favour of singleton calls.
Change-Id: I1364af35271dbfd7bf42052ebaaabe9f6f764890
Reviewed-on: http://gerrit.dmdirc.com/2674
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Avoid static/singleton references, and use a temporary Provider<>
implementation that will eventually be replaced by Dagger.
Change-Id: Id1bda9437f71cc9ddceb0a9ed1ba38d4787f2226
Reviewed-on: http://gerrit.dmdirc.com/2671
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Allows us to pass in a sensible reference to things like the /exit
command, instead of a Main object or calling a method statically.
Change-Id: I3a794339cbf0c2052ff1d7bf377dacb6171bf1f7
Reviewed-on: http://gerrit.dmdirc.com/2662
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
URLBuilder can use a static reference for now, as it makes a lot
more sense than getting a PluginManager from an ActionManager(?!?!).
Eventually we'll need to rewrite URLBuilder to not be a bunch of
static methods, so it can be instansiated with a PluginManager.
Change-Id: I609153d236f82dfd632c7da27d841eb6f031e2dd
Reviewed-on: http://gerrit.dmdirc.com/2664
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Pass in the relevant dependencies in all cases except for the Quit
command, which does actually need a Main (but it can access it
statically, for now).
Change-Id: I056a0782b9d073622c04343ebba103d0880b9567
Reviewed-on: http://gerrit.dmdirc.com/2661
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Remove dependency on real ActionManager from test.
ActionComponentChain can be passed a simple mocked ActionManager,
instead of using a real ActionManager which requires half the
client to be initialised (via TestMain).
Change-Id: I294285d170e8facfa00e49683dd61068725d4f3e
Reviewed-on: http://gerrit.dmdirc.com/2657
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Remove all static/singleton references in the constructor so that
Servers can be instansiated sensibly without all the client existing.
Also change everything that creates a Server to use the appropriate
method in the ServerManager instead of doing it manually.
Depends-On: I3fff818d6e6694163660a36f47d60271d8f0e68e
Change-Id: I9842c20b4e4ff846c9bbf4858da794a843c3b053
Reviewed-on: http://gerrit.dmdirc.com/2655
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
This only exists to pass around global state, and is only used
by one plugin. It's nicer for now if that plugin just accesses
a singleton/static state directly until it can be injected,
rather than make lots of classes and tests depend on Main.
Change-Id: I8ed6e4c90b9c6bdbcaeb01fc276df5819cb47e1a
Depends-On: I4ec47f958b40eb0a03ab50d4a5611e00b0c83f39
Reviewed-on: http://gerrit.dmdirc.com/2656
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Don't ask Main for the config directory.
Remove getMain() from Main.
Everything that needs a main now either gets given it, or asks something else.
Unfortunately, a few more dependencies on the static IdentityManager.getIdentityManager()
were introduced, but they can be tackled separately.
Fix unit tests for the above.
Change-Id: I9e42ac7f74453b739209a681d0a31f50c1be2a04
Depends-On: Ib5a9fdea5a2e25d5471d0b849f4f65fa0286d1f8
Reviewed-on: http://gerrit.dmdirc.com/2520
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Ignore or remove tests that fail in a headless env
These need to be rewritten so the dependencies are mocked out
Change-Id: Id8890637da5483efaa112db7613e61fba366e878
Reviewed-on: http://gerrit.dmdirc.com/2378
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Sprinkle some annotations over the CommandManager
More fiddling with NB7.1 settings
Change-Id: I2a0b751798249d4cc3e527f6d2e5525d1936f0e1
Reviewed-on: http://gerrit.dmdirc.com/2278
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Make popup menu items take a manager, remove dependency on
identity system from their tests
Change-Id: I5b05900fed0a35469694677667528e2ac4aeed8f
Reviewed-on: http://gerrit.dmdirc.com/2162
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>