The highest level command parser now generates the context, regardless of
who executes it. So a global command executed in a channel window will get
a ChannelCommandContext, whereas before it got a plain CommandContext.
Commands that don't expect other contexts will work as before, because the
inheritence tree of contexts mirorrs the command parser (e.g., if a
ServerCommandParser executes a command, you can guarantee its context will
be a sublcass of ServerCommandContext).
This fixes the /set command never allowing --channel.
Change-Id: I86e3c9f0bfedecb5c6b538e2309528c9e71f5eb3
Fixes-issue: CLIENT-424
Reviewed-on: http://gerrit.dmdirc.com/3085
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
These are a hold-over from when the core had to have a back-and-forth with
the UI in order to close a window.
Provide stub implementations in FrameContainer, deprecate them, and remove
any unecessary overrides in the core.
Change-Id: Icf9bfc6bc40b66135d161a5047d01d46b2171234
Reviewed-on: http://gerrit.dmdirc.com/3008
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Fix URIParser (has apparently been broken forever).
Add unit tests URI Parser.
Change-Id: I329f958024f70288f42862c02f9b2d7a4ff072ea
Reviewed-on: http://gerrit.dmdirc.com/2967
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
Doesn't make much sense having things calling static methods on a
random command.
This removes the long-deprecated "--ssl" flag for the newserver
command.
Change-Id: Ie75658c3bcf5c495dcc8b0548f080e1a12ac4a52
Reviewed-on: http://gerrit.dmdirc.com/2966
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Anywhere that doesn't just work with a Connection, cast back to a Server for
now. These can be tidied up later.
Change-Id: I02a54b0bcfaef08d5757cc015c356f9779ec0371
Depends-On: Id55c3611173be7ed79fae8f9e976996d713b8646
Reviewed-on: http://gerrit.dmdirc.com/2950
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Remove ctor that was only used in tests.
Use Connection interface rather than requiring a Server.
Change-Id: Id7fa18cab27302045f60c32b478173de99a5df4d
Reviewed-on: http://gerrit.dmdirc.com/2925
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
This allows them to be injected with all their dependencies, removing
some deprecated singleton methods or constructor usages.
Change-Id: Ie2960171e29fa4069747ca9a6cd8b427ffc73003
Depends-On: I06b391f62bf6e72b0f24d2dda91e36242564fdff
Reviewed-on: http://gerrit.dmdirc.com/2915
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
This hides most of the dependencies from the ServerManager.
Change-Id: I18e416a99244ad42ae35b30409aeb92f2c7454f4
Reviewed-on: http://gerrit.dmdirc.com/2892
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
- 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
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>
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>
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>
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>