Makes more sense to just bite the bullet and have FrameContainers
require a URLBuilder so they can make an IconManager, rather than
have every caller pass one in.
Also removes the silly map which would've only ever had one entry,
and stops us making 19 million icon managers for giggles.
Change-Id: I3b95185db3f7e6ef09a6c4f91cd28c88d2c601ba
Depends-On: Ida8887d4065db2f26080986a4c426c6de700d65c
Reviewed-on: http://gerrit.dmdirc.com/3107
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
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>
Make the IdentityManager responsible for adding the initial
identities to a ConfigManager.
Change-Id: I91520e208b06d40385729b4d7adee8bb7f1141cb
Reviewed-on: http://gerrit.dmdirc.com/3083
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
This allows things to create ConfigManagers without being exposed
to the underlying implementation.
Change-Id: I50e916909d83c6bd95dfbd1d61c446caade3ec02
Reviewed-on: http://gerrit.dmdirc.com/3079
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
I think this fixes plugins not updating - the PluginManager was
using an UpdateManager while the rest of the client used a
CachingUpdateManager, which because of the way the bindings are
implemented were backed by different DMDircUpdateManagers.
Change-Id: Ic609631f7152475a0370326197fe25b82efc377e
Reviewed-on: http://gerrit.dmdirc.com/3067
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Keep the existing hackery until the plugins that call it are updated.
Change-Id: Ia7e89f9d3de662451ccbec04eabf453478e256c1
Reviewed-on: http://gerrit.dmdirc.com/3028
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Replace core windowClosing impls with just close()
The base implementation of close() fires listeners then immediately
calls windowClosing(). There's no point in doing that, so we can
just override close() and free our resources after calling the super
method.
Change-Id: I87b6df3128026c77d6015f8146061aa56627e50d
Reviewed-on: http://gerrit.dmdirc.com/3011
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Use a listener for the GlobalWindow manager (which allows it to
hold the singleton instance itself, which makes a lot more sense).
Don't pointlessly null parsers.
Change-Id: Ifebce78cbd524bfffd72a6c5bcea2926c7483cf1
Reviewed-on: http://gerrit.dmdirc.com/3009
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>
There's no need to clear the server reference - if the channel has
been removed then it will be eligible for GC. If the whole server
is going then the whole group of objects will be eligible for GC.
Update to latest version of findbugs and depend on jsr305 to get
@Nonnull annotation and apply it to the methods which are now
guaranteeing non-null returns.
Change-Id: Ibdcf43e64910440ba5efeb7e090edb72afd858e3
Reviewed-on: http://gerrit.dmdirc.com/2982
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Add some caching of IconManagers to combat issue #CLIENT-419 somewhat until we have a real fix.
With this code, starting up my test DMDirc (which loads a global window, and attempts to connect to a twitter:// server with a raw window) goes from creating to 30 IconManagers on startup and 4 every reconnect, to 8 on startup and none when reconnecting which is a start at least.
Change-Id: I9523a0165731bf294cb874ad9e088413d17882b8
Reviewed-on: http://gerrit.dmdirc.com/2972
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>
Use Guava's Preconditions instead, which throw appropriate exceptions
rather than AssertionErrors (whose idea was that?!)
Also fix weirdness in CommandArguments where start was allowed to be
1 greater than end when getting words.
Change-Id: Icce38e36da6507f645fb8b3b872dfe2c60c43ea7
Reviewed-on: http://gerrit.dmdirc.com/2961
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Swing UI + Apple is too tangled up to do it using nice DI atm :(
Change-Id: Ie06dc705e78b6475cda01cfc1850dcb732ebcdcc
Reviewed-on: http://gerrit.dmdirc.com/2957
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>