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.
This allows windows to be uniquely identified and shared with
clients that are running outside of the DMDirc process (e.g.
a web UI, or a remote instance).
Despite its name and description, the WindowManager relied on
each FrameContainer having a reference to its parents and all
its children.
The WindowManager now stores this information itself, and so
the FrameContainer methods can be gradually phased out.
I didn't think they were that important, really.
Change-Id: I3b9d2aa76702b764d95bce2cccc0e6a56856b4c9
Reviewed-on: http://gerrit.dmdirc.com/3468
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
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
- 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
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>
Make UIs responsible for their own selection handling.
This removes the core concept of an active window,
and as such the 'active' notification target has
been removed. Fixes CLIENT-214.
Change-Id: Ieddf71114e55e0d3e3b040751d21a5523d4438d4
Depends-On: I9a135fb48b197bb555f470d3052f2ebc9a0a426c
Reviewed-on: http://gerrit.dmdirc.com/1948
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Highlights:
- FrameContainers are now generic, according to their window type
- Writable frame containers now handle their tab completers
- Redirect plugin works again
- Windows are no longer actively requested from the UI; the UI
creates and adds them in response to events from the WindowManager
fixes issue 3997, fixes issue 4000, fixes issue 4012, fixes issue 4030
fixes issue 4027, fixes issue 4028, fixes issue 4029, fixes issue 4031
fixes issue 4032, fixes issue 4033
Change-Id: Ife307728e46bd3b6dcd189be6886ab8b6fbd9212
Reviewed-on: http://gerrit.dmdirc.com/1144
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
Automatic-Compile: Gregory Holmes <greg@dmdirc.com>