In order to help make saving and restoring docking layouts easier, I created a patch
that does several things:
1) Changes .xml files saved in .jedit/DockableWindowManager to save a comma-separated
list of dockables at each position, with the current dockble surrounded by square
brackets, e.g. BOTTOM=error-list,task-list,\[console\]. This allows layouts to actually
save an entire docking layout, rather than just the current dockable at each position.
2) Added save and restore layout buttons to the general option's docking pane to enable
explicit saving and loading
I would like to simply commit my changes, but before I do that I need to extend it
to work with frameworks other than jEdit's default framework and do a little additional
debugging, but I wanted to release this so that I can get some feedback (particularly
on the layout of the docking option pane).
I'm also doing this in order to make setting preferred layouts for plugin packages
more viable, when they are eventually implemented.
As a side note, I think docking config files in the settings folder should be saved
a level deeper, such as in ~/.jedit/wm. It's more of an aesthetic reason than anything,
but having a folder called DockableWindowManager surrounded by dtds, jars, and macros
looks strange to me. I would prefer a lowercase, shorter name convention in the settings
folder. IMO, ~/.jedit/wm/DockableWindowManager is better than ~/.jedit/DockableWindowManager.
Submitted | kog13 - 2010-03-05 19:19:47 | Assigned | ezust |
---|---|---|---|
Priority | 5 | Labels | |
Status | pending | Group | |
Resolution | remind |
2010-03-07 12:31:19 *anonymous |
Unfortunately I will not have time soon to review your patch. Here's some feedback
based on the description only:
|
---|---|
2010-03-14 23:58:28 kog13 |
I completely re-worked the patch in order to ensure consistent behavior and to use
a better XML layout. I'm not going to bother adding any buttons for saving/loading
layouts to the general options window, although I may in the future, as the menu items
are kind of tucked away and are relatively difficult to find. The customizable docking
system of jEdit is one of the things I like most about it, so why not show it off? |
2010-03-16 20:14:48 *anonymous |
I don't think there's a reason to add buttons for that. Having these functions as jEdit actions, users can bind keyboard shortcuts or toolbar buttons for them using the Global Options dialog whenever they like. |
2010-03-17 18:54:41 kog13 |
True, but I believe that there should be some indicator in the Docking general options
that users can manually load and save them. Maybe some buttons linked to the existing
actions or just a message telling users where to find it. |
2010-06-08 05:05:23 ezust |
Shlomy, since you're the docking framework dude, it's your call whether to accept
or reject.
|
2010-06-08 05:05:23 ezust |
- **assigned_to**: nobody --> shlomy |
2010-06-12 06:57:46 *anonymous |
I reviewed the patch (code-only, no testing). I have a few small comments.
|
2010-06-12 07:17:48 *anonymous |
there's one more issue I forgot: If none of the windows are visible in a docking position
(i.e. there are several windows at that position, but the button of the visible one
was clicked and the entire position was minimized), the size of the docking position
won't be registered in the XML with this patch.
|
2010-06-12 18:02:05 kog13 |
I added a small fix that sets sizes to a default value if none is set for any dockable. Will this be enough? I don't see why it would need to be more complicated than that. |
2010-06-12 19:09:35 *anonymous |
I don't think it will be enough. Users typically adjust the size of a docking position
according to the current dockable in it. If they hide that docking position (usually
for allowing more space to the text area), they expect to restore the size later when
they show it.
|
2010-06-20 02:23:26 kog13 |
Since the size belongs to each panel and not the dockables on those panels, I updated
the patch to include four <panel> tags in addition to the list of dockables. The dockable
tags denote each window, its location, and whether or not it's visible (defaulting
to false); the panel tags remember which size should be used when one of it dockables
is shown.
|
2010-10-11 16:58:00 kog13 |
With the talk going around of releasing 4.4, I wanted to get around to finishing up
this patch so that it can hopefully be included soon. |
2010-10-12 04:50:40 *anonymous |
1. I don't think that sending a DEACTIVATED message is unnecessary. It pretty much
depends on the usage of these messages by plugins, and I recall that there are heavy
plugins that will not get rid of their data without seeing this message. Maybe you
don't have such plugins installed or didn't check the memory allocation.
|
2010-10-13 22:03:50 kog13 |
1. I added a DEACTIVATED edit bus message to DockableWindowManagerImpl's undockDockableWindow()
method. |
2010-10-14 06:45:42 *anonymous |
1. Great, thanks. Does that replace the PROPERTIES_CHANGED message, or is it sent
after PROPERTIES_CHANGED? I'm not sure, but I think the PROPERTIES_CHANGED is not
needed in that case.
|
2010-10-14 19:00:57 kog13 |
1. I believe the PROPERTIES_CHANGED message is still necessary. When I tested it,
removing PROPERTIES_CHANGED and attempting to load a blank docking layout left the
windows there; attempting to run something in console resulted in a NPE with the console
process, which I assume means it was successfully deactivated, but the windows stay
there unless PROPERTIES_CHANGED is sent as well. |
2010-10-14 19:19:40 *anonymous |
3. I don't see any reason to copy the files from the old directory to the new one,
since the format has changed. The file in the old directory can either be ignored,
or be converted. And yes, what you wrote is exactly what I have in mind. Note that
before your patch, the layout that users got was a mixture of properties and the perspective
file - the perspective specified the sizes of the docking areas, and the "current"
dockable in each area, while the properties specified which dockables are docked in
which areas. If you take the extra effort of converting the layout to the new version,
then take just a bit more effort and make it complete using the properties. If you
don't do this, you should completely ignore the perspective and start a new layout
using the properties only (and preferably show a dialog explaining this).
|
2010-10-15 17:51:35 kog13 |
The dockable window manager's config class now defaults to initializing window lists
and sizes based on the properties, but loading a layout resets it and then sets everything
based on the new layout. Effectively, this means that if a perspective is saved, it
is used; otherwise, everything is set based on the properties. |
2010-10-15 19:37:43 *anonymous |
Maybe there is no need. The layout will be set successfully the first time from the properties; the most noticeable (in my opinion) difference from the last layout that the user saw is that the current dockable in each area may be different. Since this only happens once, I guess this is okay without a converter or dialog. |
2010-10-24 06:35:37 kog13 |
wm.patch (18.4Kio) |
2010-10-24 06:38:14 kog13 |
I uploaded the new version of the patch. I haven't updated the README yet, but if
this version gets approved, then I'll update it and submit the final patch. |
2014-04-25 20:37:41.642000 ezust |
in 2010 shlomy says: "2. There are also existing actions for saving / loading docking
layouts using the View -> Docking menu. Make sure these work too, and that your patch
doesn't duplicate these actions."
|
2014-04-25 21:15:55.037000 ezust |
- **assigned_to**: Alan Ezust |
2014-04-27 00:13:07.240000 ezust |
I tried to test it out today, but some of the hunks failed.
|
2014-04-27 00:13:21.436000 ezust |
- **status**: open --> pending-remind |