If we add or remove components while an update check is ongoing
we used to throw a CME. This could happen either when the client
is first starting and in the process of adding components, or
if some listener decided to add/remove components as they were
being checked.
Change-Id: I200a3b4804bd7e815a4f053ca596b41f7c4c4c24
Fixes-issue: CLIENT-404
Reviewed-on: http://gerrit.dmdirc.com/2795
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Make Servers use it to break their dependency on AliasWrapper,
which was odd and annoying.
Change-Id: I1c515b65d88049bd9288e1334e5ebe5fa9c31a80
Reviewed-on: http://gerrit.dmdirc.com/2792
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Pass in identity controller, action controller and their directory.
This means the tests can stub out most things.
Change-Id: Ia42c0b913654dcd9fd0d460fd2c8a0bd0a4976a3
Reviewed-on: http://gerrit.dmdirc.com/2787
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
This will make it easier to modify actions to have their
dependencies passed in, and be less generally horrible.
Change-Id: Iea79ea52732aec0fe430f16b31ae681e95474bce
Reviewed-on: http://gerrit.dmdirc.com/2784
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Move static factory methods into IdentityFactory, and replace
almost every use of Identity with ConfigProvider.
Depends-On: I6a32f3592cb5fc3df99a23eee62ae961ce0fc143
Change-Id: I66b382d54b77ef030d88448e456a83eb98aca216
Reviewed-on: http://gerrit.dmdirc.com/2777
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Instead of manually tracking dependencies and creating them in
CommandLoader, just have a module to provide a set of commands
that we can load.
This makes it stupidly easy to add dependencies in commands.
Also rename the /set command from Set because that's just
confusing.
Change-Id: I7967609e356de3c17d0942ebc913be438debe49c
Reviewed-on: http://gerrit.dmdirc.com/2722
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Have Dagger provide most of the classes which we give to SimpleInjector
for plugins, instead of doing a weird dance involving lots of global
state and horribleness.
Change-Id: I1d15796c85f90ac22b65a952ab1a5fca0fe0b337
Reviewed-on: http://gerrit.dmdirc.com/2714
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Get rid of all the Main.getPluginManager() references.
Change-Id: I2a377ce00423af5c560e0fd840948568d771b566
Reviewed-on: http://gerrit.dmdirc.com/2712
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Don't use a dummy UI and massive chunks of real objects.
Change-Id: I73ecf45760397d477137f13f1bdb210fa25cad97
Reviewed-on: http://gerrit.dmdirc.com/2710
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Remove HelpTest because it's a pretty lame test, not (and never
will be) an actual unit test, and a PITA to maintain.
Change-Id: Ibc15984a694a7b284e206ab337211ce471ac1913
Reviewed-on: http://gerrit.dmdirc.com/2706
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
As the tests now take about 3 seconds there's no point using clover
to try and reduce how many we run. This simplifies the build file
and will hopefully fix the double-test issues.
Change-Id: I1f689e8c5a1620a79fa64574d91012be207b1468
Fixes-issue: INFRA-62
Reviewed-on: http://gerrit.dmdirc.com/2702
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Rework how Logger/ErrorManager interact so they can be half
mocked out (or, at least, used in a thread-safe-ish manner).
Change-Id: Ia5899640bdc101793819dab88c3fe6038a759abb
Reviewed-on: http://gerrit.dmdirc.com/2695
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Fully initialise the PluginManager instead of passing around
one in various states of existance.
Move plugin extraction logic into a CorePluginExtractor class.
Inject UpdateManager where appropriate.
Change-Id: I6c15f7682cccd93b40dcc189a0a8466d067095f0
Reviewed-on: http://gerrit.dmdirc.com/2692
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Make the ColourManager into a proper class so it can have
dependencies, just like a real boy.
Change-Id: Ib49f046f7dee6f240cb0970603b4fcd3d71f3cba
Reviewed-on: http://gerrit.dmdirc.com/2696
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Pass the MSM into Main so it actually gets created, as the few
places that refer to it aren't being inflated by dagger yet.
Change-Id: Ic92f88aac29d4c68fdbc062a582b3e44ecd23637
Reviewed-on: http://gerrit.dmdirc.com/2691
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
No need for Main to do it - might as well get a fully-initialised
manager when we ask for one.
Change-Id: I55ed29bbc0270a5c610184572e58b0270055e0bc
Reviewed-on: http://gerrit.dmdirc.com/2690
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Separate out the constructor and initialisation logic in line
with other managers.
Change-Id: Ie5d2f12b838213a6500f0a87e44e56254b8d5916
Reviewed-on: http://gerrit.dmdirc.com/2689
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Create a proper LifecycleController implementation that can be
injected, move the interface to the interfaces package, and
then inject the CommandLoader instead of creating it in Main.
Change-Id: I4236b4668301f585544c8c6a9f17c39771290ea5
Reviewed-on: http://gerrit.dmdirc.com/2688
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Introduce a new dagger module that exposes the results of the
command line parser, such as the config directory.
This will let us inject the relevant directories into managers
and simplify the creation logic.
Change-Id: I9548f6ab11d76e03f25c0cd2a164032073b9ffd1
Reviewed-on: http://gerrit.dmdirc.com/2686
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Shane Mc Cormack <shane@dmdirc.com>
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>