Take in a ConfigManager, instead of using a singleton IdentityManager.
This also means that tab completer settings such as case-sensitivity and
allowing empty results can be set per-window rather than globally.
Change-Id: I75d668e954c22186a2d15d917a7c66ccef04f342
Reviewed-on: http://gerrit.dmdirc.com/2749
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
No need for singleton junk any more, use an action factory.
Change-Id: I5174da7bdb59cadb96274f2d2c348d88bb87c09a
Reviewed-on: http://gerrit.dmdirc.com/2727
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
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>
Show ClientComponent messages in the status bar for now, instead
of showing a dialog on a random UI.
Change-Id: Ic2c0c5147f62d87633da4ec4b91149fe67d5b1fd
Reviewed-on: http://gerrit.dmdirc.com/2720
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Things need to quit! Without using global state!
Change-Id: Id6d237f386c6f35844136ceb64b7c46f0af76765
Reviewed-on: http://gerrit.dmdirc.com/2715
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
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
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>
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>
Remove some 'final' modifiers for CommandParser methods.
Modify the Logger class so it only calls into the ErrorManager if
it actually needs it. The ErrorManager constructor requires an
IdentityManager which causes any test that executes a Logger.assert
line to require most of the client is constructed, regardless of
what the test is actually doing.
Change-Id: I63879db5c13517cfa60941fce73a2ba01e63f1cd
Reviewed-on: http://gerrit.dmdirc.com/2681
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
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
(There's nothing particularly wrong with this, but it keeps showing
up when I try to find usages of Main to remove.)
Change-Id: I291ca91fc7e80e9dab40befa31424d9d7e0b62d1
Reviewed-on: http://gerrit.dmdirc.com/2665
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