Plugins shouldn't be required to have getters and setters for
something that's constant.
Change-Id: I99ebc7d10f558008a7889252cc3c96f39747303e
Reviewed-on: http://gerrit.dmdirc.com/2860
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Getting hold of a CommandController is annoying and fiddly,
so add a CommandHelper class to hide that away from plugins.
Allow registering of a command given just its class/info.
Change-Id: Ia208db1f23e3356d83a87ff2372e4f7aa49b24cc
Reviewed-on: http://gerrit.dmdirc.com/2854
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
We can't support multiple parents with the new DI framework,
and looking at the code it seems they never fully worked anyway.
Change-Id: I053a57b82f77e9f570efdc463f86dd6653355a3e
Depends-On: If8938f708244ed20d8d9e1c481ecb76bd2c0fac5
Reviewed-on: http://gerrit.dmdirc.com/2849
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
New dependency-injection supporting methods, and ample javadoc.
Stub the methods out in BasePlugin so everything carries on working.
Change-Id: Iaea88b091a4680c568f8e55a75a3b0d97c9842eb
Reviewed-on: http://gerrit.dmdirc.com/2846
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
- Don't have FrameContainers add themselves to the WindowManager in
the constructor.
- Don't make FrameContainers keep a reference to WindowManager just
to remove themselves when they're closed
- Instead have WindowManager register a FrameClosed listener and use
that to remove windows itself.
Change-Id: Iadbca8a28f7ef3372df7fda722a3cbba2a0fbad6
Depends-On: I0f60ac23438313cab49cdb86c089938f5ee44abc
Reviewed-on: http://gerrit.dmdirc.com/2842
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
FrameContainer shouldn't be responsible for exposing a WindowManager,
and shouldn't keep an IconManager reference just to pass it on to
other classes.
Change-Id: Id672fec154a19c999b078b3980681937f62bfb41
Reviewed-on: http://gerrit.dmdirc.com/2840
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Whoever creates windows should add them to the window manager
(which saves passing a 'focus' boolean into the constructor,
which is odd), and fire the relevant action event.
Change-Id: I97d143c5250df734fa3adca0c7da4d76a5c87e8b
Reviewed-on: http://gerrit.dmdirc.com/2833
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
This removes some static references and simplifies the
constructors of some of our model classes quite a bit.
Change-Id: Ic1644412a4956aa01b67e1129be47420c7a47b46
Reviewed-on: http://gerrit.dmdirc.com/2832
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Don't manually iterate servers and look up the global window,
instead just use the WindowManager to find writable root windows.
This also fixes a bug whereby aliases were never removed from
the global window.
Change-Id: I8e009e03b1d48646a01b683d20712fd042628349
Reviewed-on: http://gerrit.dmdirc.com/2834
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Allows injection of the global ConfigManager instead of having
to get an IdentityManager and call getGlobalConfig...().
Change-Id: Ifa79919e201c418c99899ce5a0a815ac646e5a77
Reviewed-on: http://gerrit.dmdirc.com/2830
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Introduces a ConfigProviderMigrator interface, which allows
migration of a ConfigProvider. This allows the owner of
the provider to migrate it, and pass around an instance,
while prevent any other user accidentally migrating it.
e.g. Server can own a ConfigProviderMigrator, and only
expose the inner ConfigProvider, so noone else can migrate
it to a different target.
Change-Id: I2a78947f60ba42c6877433c897ef458cead6a3e3
Fixes-Issue: CLIENT-408
Reviewed-on: http://gerrit.dmdirc.com/2828
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Errors that happen before the IdentityManager is configured
are useful to be able to see.
Change-Id: Iad6c54182aa101528e8bb2169ed08249f650f39c
Reviewed-on: http://gerrit.dmdirc.com/2827
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Remove the remaining WindowManager singleton refs.
Add a GlobalWindowManager to keep state and references, rather than
use static methods on GlobalWindow.
Minor tidying.
Change-Id: I65b84082f0a07cdc9e4c05263f6c5c77282e9b04
Reviewed-on: http://gerrit.dmdirc.com/2818
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
When we split an outgoing query we displayed the whole line
locally for each split part going not, not the actual part.
Change-Id: I99e1ef3ce3f0c8a36b6b4a88d3ba9329bf693403
Fixes-issue: CLIENT-384
Reviewed-on: http://gerrit.dmdirc.com/2810
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Constructors shouldn't be leaking references to themselves all over
the place.
Change-Id: I4568a354e5dbd2561c247ff4b80badb781394662
Reviewed-on: http://gerrit.dmdirc.com/2808
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
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>
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>