Stop swimming against the tide and accept what most of the rest of
the world does.
While it adds an annoying depth to the actual source code, it makes
the root directory nicer (no more 'test-res' dirs), means we don't
have to override the gradle config, and makes it nicer to work in
IDEA 2016.1.
Add a base class for events with a WindowModel source.
For #662, it makes sense to have a standard way to
get the source from events we may wish to filter.
This introduces a SourcedEvent interface, and adapts classes
to use it.
Instead of passing them in to the FrameContainer ctor, create
them afterwards.
This means the reference in FrameContainer can't be final but
removes the horrible setOwner() kludge that was previously in
CommandParser, and cuts down the deps needed to pass in to the
FrameContainer ctor.
Pass in a ScheduledExecutorService and use it for who timers and
reconnect timers.
Only run the who timer when we're connected, not the whole time.
This stops the Server ctor starting a timer.
Change-Id: Iea92d7046f33eda7666b8a2b739374345e8ea20d
Reviewed-on: http://gerrit.dmdirc.com/3419
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
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
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>
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>
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>